-
TITLE Read From the Console (ReadConsole.asm)
.386
.MODEL flat,stdcall
INCLUDE SmallWin.inc
.STACK 4096
.data
BufSize = 80
buffer BYTE BufSize DUP(?)
stdInHandle HANDLE ?
bytesRead DWORD ?
.code
main PROC
INVOKE GetStdHandle, STD_INPUT_HANDLE
mov stdInHandle,eax
INVOKE ReadConsole, stdInHandle, ADDR buffer, BufSize, ADDR bytesRead, 0
INVOKE ExitProcess,0
main ENDP
END main