Created
January 13, 2022 13:14
-
-
Save cho0h5/04053a73a9348abeff6286c307ce18f6 to your computer and use it in GitHub Desktop.
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
.data | |
msg: | |
.ascii "hello, world\n" | |
len = . - msg | |
.text | |
.global _start | |
_start: | |
mov x0, #1 | |
ldr x1, =msg | |
ldr x2, =len | |
mov x8, #64 | |
svc #0 | |
mov x0, #0 | |
mov x8, #93 | |
; In Makefile | |
; default: main | |
; ./main | |
; | |
; main: main.s | |
; as -o main.o main.s | |
; ld -o main main.o | |
; | |
; clean: | |
; rm main.o | |
; rm main | |
svc #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment