Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .text
- global main
- main:
- call _open
- call _read
- call _write
- mov eax, 0
- ret
- _read:
- mov eax, 3
- mov ebx, esi
- mov ecx, str
- mov edx, 999
- int 0x80
- _open:
- mov eax, 5
- mov ebx, file_write:
- mov eax, 4
- mov ebx, 1
- mov ecx, str
- mov edx, 999
- int 0x80
- call _n
- _n:
- mov eax, 4
- mov ebx, 1
- mov ecx, 0xa
- mov edx, 1
- int 0x80
- _exit:
- mov eax, 1
- mov ebx, 0
- int 0x80
- section .data
- file: db './ex_1.S'
- section .bss
- str: resb 999
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement