News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Handle to console output

Started by Magnum, December 29, 2010, 10:51:16 PM

Previous topic - Next topic

Magnum

How do I get a handle to console output in order to send this to the screen?



ASSUME FS:NOTHING

.data?

dwBytes DWORD ?

.DATA

message   db 'Loose Cannon ',

'noun ', 

'Definition: ',

'1. indiscreet and unpredictable person: an unpredictable or indiscreet person, often causing
    trouble for colleagues or associates ( slang ) ','                                                               '

'2. (nautical) a cannon that breaks loose during battle a storm and causes serious damage to the ship
    and its crew ',

.CODE

start:

invoke WriteFile, ?, ADDR message, SIZEOF message, addr dwBytes, 0

invoke ExitProcess,0

end start

Have a great day,
                         Andy

jj2007

Check \masm32\m32lib\stdout.asm.

dedndave

even better - the console reference....
http://msdn.microsoft.com/en-us/library/ms682010%28v=VS.85%29.aspx
lots of good stuff there, Andy  :U

eventually, you will get to GetStdHandle

Magnum

Have a great day,
                         Andy