...
1@ Hello World in ARM Assembly for Linux system
2
3.global _start
4
5_start:
6 mov r7, #4 @ Setup service call 4 (write)
7 mov r0, #1 @ param 1 - File descriptor 1 = stdout
8 ldr r1, =hello @ param 2 - address of string to print
9 mov r2, #13 @ param 3 - length of hello world string
10 svc 0 @ ask linux to write to stdout
11
12 mov r7, #1 @ Setup service call 1 (exit)
13 mov r0, #0 @ param 1 - 0 = normal exit
14 svc 0 @ ask linux to terminate us
15
16.data
17hello: .ascii "Hello World!\n"
View as plain text