Created
April 27, 2024 14:47
-
-
Save 0x4248/43889e9be5db9d714a6056605f818a21 to your computer and use it in GitHub Desktop.
A hello world program in ARM64 Linux
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
as hello_world.asm -o tmp | |
ld tmp -o program | |
./program |
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
.section .data | |
msg: | |
.ascii "Hello world\n" | |
len = . - msg | |
.section .text | |
.globl _start | |
_start: | |
mov x0, 1 | |
ldr x1, =msg | |
ldr x2, =len | |
mov x8, 64 | |
svc 0 | |
mov x8, 93 | |
mov x0, 0 | |
svc 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment