LibAsm/driver/strcpy_driver.S

35 lines
444 B
ArmAsm
Raw Normal View History

.include "lib/strcpy.S"
2025-01-24 18:49:33 +00:00
.intel_syntax noprefix
.globl _start
.text
_start:
mov rdi, offset str2
mov rsi, offset str1
call strcpy
# mov rsi, rax -- would copy the string start address to rsi
mov rax, 1
mov rdi, 1
mov rsi, offset str1
mov rdx, 14
syscall
# exit
mov rax, 60
mov rdi, 0
syscall
.bss
str1:
.skip 30
.data
str2:
.string "Hello, world!\n"