Skip to content

Instantly share code, notes, and snippets.

@benjic
Last active August 29, 2015 14:07
Show Gist options
  • Save benjic/54d1161e54c2259cb964 to your computer and use it in GitHub Desktop.
Save benjic/54d1161e54c2259cb964 to your computer and use it in GitHub Desktop.
; 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