;Written by Aleksander Krimsky
.386
.MODEL flat,stdcall 
.STACK 4096
STD_OUTPUT_HANDLE EQU -11
GetStdHandle PROTO nStdHandle:DWORD
WriteConsoleA PROTO hConsoleOutput:DWORD, 
					lpBuffer:PTR BYTE, 
					nNumberOfCharsToWrite:DWORD, 
					lpNumberOfCharsWritten:PTR DWORD, 
					lpReserved:DWORD 
ExitProcess PROTO dwExitCode:DWORD 

.data
charsWritten dd ? 
lpBuffer db "Hello World",13,10
nNumberOfCharsToWrite dd 13

.code
main PROC
	push STD_OUTPUT_HANDLE
	call GetStdHandle
	;INVOKE GetStdHandle, STD_OUTPUT_HANDLE
	push 0
	push offset charsWritten
	push nNumberOfCharsToWrite
	push offset lpBuffer
	push eax
	call WriteConsoleA  
	;INVOKE WriteConsoleA, eax, offset lpBuffer, nNumberOfCharsToWrite, offset charsWritten, 0
	push 0
	call ExitProcess
	;INVOKE ExitProcess, 0
main ENDP
END main