This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
HelloWorld/Assembly/WinAPI.asm
2021-09-25 15:44:17 +02:00

28 lines
447 B
NASM

section .data
msg db "Hello World"
len equ $ - msg
handle db 0
written db 0
section .text
global start
extern _GetStdHandle@4
extern _ExitProcess@4
extern _WriteConsoleA@20
start:
push dword -11
call _GetStdHandle@4
mov [handle], eax
push dword 0
push written
push len
push msg
push dword [handle]
call _WriteConsoleA@20
push dword 0
call _ExitProcess@4