section .data Message db "Hello World", 0Dh, 0Ah MessageLength EQU $-Message section .text Start: sub RSP, 8 sub RSP, 32 mov ECX, STD_OUTPUT_HANDLE call GetStdHandle mov qword [REL StandardHandle], RAX add RSP, 32 sub RSP, 32 + 8 + 8 mov RCX, qword [REL StandardHandle] lea RDX, [REL Message] mov R8, MessageLength lea R9, [REL Written] mov qword [RSP + 4 * 8], NULL call WriteFile add RSP, 48 xor ECX, ECX call ExitProcess