Artifact 738c78695fd7307aecd648bde9aaafb4d57e98fc:
- File
freshlib/simpledebug/Win32/debug.asm
— part of check-in
[c81d07e941]
at
2013-02-12 10:34:50
on branch trunk
— Merged with FreshLib in order to get the latest version of FreshLib with changed license - to BSD 2-clause license.
Note: Fresh IDE itself is licensed under EUPL 1.1 (user: johnfound size: 1651) [more...]
; _______________________________________________________________________________________ ;| | ;| ..::FreshLib::.. Free, open source. Licensed under "BSD 2-clause" license." | ;|_______________________________________________________________________________________| ; ; Description: SimpleDebug library. ; ; Target OS: Win32 ; ; Dependencies: Not dependent on other libraries. ; ; Notes: ;_________________________________________________________________________________________ DBG_CHAR_NEWLINE equ $0d, $0a uglobal if used debug_con_handle debug_con_handle dd ? end if endg iglobal if used cConsoleTitle cConsoleTitle du 'Fresh simple debug console.', 0 end if endg if (defined options.DebugMode & options.DebugMode) | used Output initialize InitDebugConsole begin invoke AllocConsole invoke GetStdHandle, STD_ERROR_HANDLE mov [debug_con_handle], eax invoke SetConsoleTitleW, cConsoleTitle return endp end if proc Output, .ptrStr .dummy dd ? begin pushad stdcall __simpStrLength, [.ptrStr] lea eax, [.dummy] if GlobalAPI eq ascii invoke WriteConsole, [debug_con_handle], [.ptrStr], ecx, eax, 0 else invoke WriteConsoleA, [debug_con_handle], [.ptrStr], ecx, eax, 0 end if popad return endp proc GetTimestamp begin pushad invoke GetTickCount mov [esp+4*regEAX], eax popad return endp