Last active
August 31, 2018 02:59
-
-
Save theKidOfArcrania/58dfa1fbd07f02055b2a7ae409735e32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; https://tinyurl.com/hello-in-asm | |
; | |
; Requires nasmx | |
; Linux: | |
; nasm -f elf64 hello.asm && gcc -o hello.o -o hello && ./hello | |
; Windows: (requires mingw) | |
; nasm -f win32 hello.asm && gcc -o hello.obj -o hello.exe && ./hello.exe | |
%include "nasmx.inc" | |
IMPORT printf | |
entry mainproc | |
section .data | |
msg: db "Hello, world", 0xa | |
section .text | |
PROC mainproc | |
LOCALS NONE | |
INVOKE printf, msg | |
ENDPROC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment