Last active
August 29, 2015 14:07
-
-
Save benjic/54d1161e54c2259cb964 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
; Declare global variables | |
section .data | |
hello: db 'Hello world!',10 | |
helloLen: equ $-hello | |
; Jump into the action | |
section .text | |
global _start | |
; Meat and potatoes | |
_start: | |
; Get ready for the sys call and give the stdout fd | |
mov eax,4 | |
mov ebx,1 | |
; Give string data | |
mov ecx,hello | |
mov edx,helloLen | |
; Hey kernel, satisfy me | |
int 80h | |
; Now I am done with you, kernel | |
mov eax,1 | |
mov ebx,0 | |
; kill me now | |
int 80h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment