uglobal
  debug_con_handle dd ?
endg


iglobal
  cConsoleTitle text 'Fresh simple debug console.'
endg


initialize InitDebugConsole
begin
        invoke  AllocConsole
        invoke  GetStdHandle, STD_OUTPUT_HANDLE
        mov     [debug_con_handle], eax
        invoke  SetConsoleTitle, cConsoleTitle
        return
endp



proc Output, .ptrStr
.dummy dd ?
begin
        pushad

        stdcall __simpStrLength, [.ptrStr]
        lea     eax, [.dummy]
        invoke  WriteConsole, [debug_con_handle], [.ptrStr], ecx, eax, 0

        popad
        return
endp



proc GetTimestamp
begin
        pushad
        invoke  GetTickCount
        mov     [esp+4*regEAX], eax
        popad
        return
endp




