Skip to content

Instantly share code, notes, and snippets.

@kjensenxz
Created September 18, 2016 06:26
Show Gist options
  • Save kjensenxz/aeb5a71a65869069958e55c92cc82e56 to your computer and use it in GitHub Desktop.
Save kjensenxz/aeb5a71a65869069958e55c92cc82e56 to your computer and use it in GitHub Desktop.
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