_start:
mov %r0, $1 /* file descriptor: 1 is stdout */ ldr %r1, =msg /* message location (memory address) */ ldr %r2, =len /* message length (bytes) */ mov %r7, $4 /* write is syscall #4 */ swi $0 /* invoke syscall */
mov %r0, $0 /* exit status: 0 (good) */ mov %r7, $1 /* kernel syscall number: 1 is sys_exit */ swi $0 /* invoke syscall */
.data
msg:
.ascii "Hello, world!\n" len = . - msg
=== External Examples ===
"Hello World" in many different types of assembler: http://leto.net/code/asm/hw_assembler.php