RosettaCodeData/Task/Hello-world-Text/AArch64-Assembly/hello-world-text-2.aarch64
2026-02-01 16:33:20 -08:00

17 lines
494 B
Text

.global _start
.text
_start:
mov x8, #64 //64 is write
mov x0, #1 //1 is stdout
adr x1, msg //mov address of msg into x1
mov x2, #(msgend - msg) //msgend minus msg is the length of message
svc #0 //system call
mov x8, #93 //93 is exit
mov x0, xzr //0 is the exit code. xzr is the zero register
svc #0 //system call
msg:
.ascii "Hello world!\n"
msgend:
.align 4