-
-
Save alessandrocarminati/3def436774839d3bce1ad99b9cbb7628 to your computer and use it in GitHub Desktop.
Hello world like example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.global _start | |
.section .text | |
_start: | |
mov x8, 0x40 //sys_write | |
mov x0, 1 //stdout | |
adrp x1, msg //msg base addr | |
add x1, x1, msg //msg offs | |
mov x2, msg_size //msg len | |
svc #0 //syscall | |
mov x8, 0x5d //sys_exit | |
mov x0, #0 //exit code | |
svc #0 //syscall | |
msg: | |
.asciz "hello\n" | |
msg_end: | |
msg_size = msg_end - msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test results on native: