Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Program som skriver ut Hello World
- ; Konstanter
- lf equ 10 ; Linjeskift
- ; section .data ; Datasegment
- ; melding db 'Hello World!',lf
- ; lengde equ $ - melding
- section .text ; Kodesegment
- global _start
- _start:
- mov ecx,0x0 ; a = 0
- mov eax,0x0
- jmp _start+0x33
- cmp eax,0x9
- jg $+0x2
- add ecx,0x1
- jmp _start+0x2f
- sub ecx,0x1
- add eax,0x1
- cmp eax,0x13
- jle _start+0x1f
- mov edx,1 ;length is always 1
- add ecx,'0' ; convert number to ascii
- mov ebx,1
- mov eax,4 ; sys_write
- int 80h ; interrupt 128
- mov ebx,0
- mov eax,1 ; sys_exit
- int 80h ; interrupt 128
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement