ARM Program Sections
.section .data
helloMessage: .asciz "Hello, World!\n"
.section .text
.global main
main:
ldr x0, =helloMessage
bl printf
b exit
exit: // for linux (the type of emulator qemu uses)
mov x0, 0
mov x8, 93
svc 0
ret
Data
- Static heap data that is globally accessible
- Initialized before the program starts
Text
- Actual instructions
Main
- Where your custom instructions go
Exit
- Should be included verbatim in all of your programs
- lets the computer know that the code finished successfully