public
Last active

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
BITS 32
org 0x08048000
ehdr:
db 0x7F, "ELF", 1, 1, 1, 0
times 8 db 0
dw 2
dw 3
dd 1
dd _start
dd phdr - $$
dd 0
dd 0
dw ehdrsize
dw phdrsize
dw 1
dw 0
dw 0
dw 0
dw 0
ehdrsize equ $ - ehdr
 
phdr:
dd 1
dd 0
dd $$
dd $$
dd filesize
dd filesize
dd 5
dd 0x1000
 
phdrsize equ $ - phdr
 
_start:
xor eax,eax
xor ebx,ebx
xor edx,edx
mov al, 4
inc bl
mov ecx, string_start
mov dl, string_len
int 0x80
mov al, 1
int 0x80
string_start:
db "Hello world", 0x0a
string_len equ $ - string_start
 
filesize equ $ - $$

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.