Untitled

 avatar
unknown
plain_text
3 years ago
588 B
3
Indexable
section .data
string1 db "AAAABBBBCCX"; Reserve space for 10 characters
section .text
global _start
_start:
mov rdx, 0xa ; length of string is 10 bytes
mov rsi, dword string1 ; set rsi to pointer to string
mov rax, 0x0 ; syscall 0 is read
mov rdi, 0x0 ; stdin has a file descriptor of 0
syscall ; make the system call
mov rdx, 0xa ; length of string is 10 bytes
mov rsi, dword string1 ; set rsi to pointer to string
mov rax, 0x1 ; syscall 1 is write
mov rdi, 0x1 ; stdout has a file descriptor of 1
syscall ; make the system call
mov rax, 0x3c ; syscall 3c is exit
syscall
Editor is loading...