Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BITS 64
- %define __NR_read 3
- %define __NR_write 4
- GLOBAL _start
- SECTION .bss
- %define bufsize 10240
- buffer resb bufsize
- SECTION .text
- _start:
- mov eax,__NR_read ; "read" function number
- xor ebx,ebx ; console read file descriptior (0)
- mov ecx,buffer ; buffer address
- mov edx,bufsize ; buffer size
- int 0x80 ; read from console (returns read bytes count in eax)
- mov edx, 2048 ; number of bytes to write
- mov eax,__NR_write ; "write" function number
- mov ebx,1 ; console write file descriptior
- ; buffer address (ecx) is not changed
- int 0x80 ; write to console
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement