Created
September 18, 2016 06:26
-
-
Save kjensenxz/aeb5a71a65869069958e55c92cc82e56 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
global _start | |
_start: | |
add edx, 1 | |
cmp byte [msg + edx], 0 | |
jne _start | |
mov eax, 4 ; sys_write | |
mov ebx, 1 ; to stdout | |
mov ecx, msg | |
; edx already contains number of bytes | |
int 0x80 | |
mov eax, 1 ; sys_exit | |
xor ebx, ebx ; with 0 | |
int 0x80 | |
section .data | |
msg: db "Hello, world!", 0xA, 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment