Untitled

 avatar
unknown
plain_text
3 years ago
824 B
4
Indexable
section .data
string1 db "AAAABBBB" ; Reserve
space for 8 characters
section .text
global _start
_start:
mov rdx, 0x8 ; length of string is 8 bytes
mov rsi, dword string1 ; set rsi to pointer to string
mov rax, 0x0 ; syscall 1 is read
mov rdi, 0x0 ; stdin has a file descriptor of 0
syscall ; make the system call
mov rbx, dword string1 ; set rbx to pointer to string
mov rcx, [rbx] ; Put string value into rcx
add rcx, 0x0101010101010101 ; Add 1 to each byte, not fixing
rollover
mov [rbx], rcx ; Put modified byte on string
mov rdx, 0x8 ; length of string is 8 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 ; make the system call
Editor is loading...