Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .bss
- buff: resb 8192
- buffsize: equ $-buff
- section .text
- global _start
- _start:
- ;open file
- mov eax, 5
- pop ebx
- pop ebx
- pop ebx
- mov ecx, 0
- int 80h
- ;errors?
- test eax, eax
- jns file_function
- mov ebx, eax
- mov eax, 1
- int 80h
- ;read file
- file_function:
- mov ebx, eax
- mov eax, 3
- mov ecx, buff
- mov edx, buffsize
- int 80h
- ;errors?
- test eax, eax
- ;jz nextfile
- js errors
- ;print
- mov edx, eax
- mov eax, 4
- mov ebx, 1
- int 80h
- ;exit
- mov eax, 1
- mov ebx, 0
- int 80h
- errors:
- mov ebx, eax
- mov eax, 1
- int 80h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement