17 lines
484 B
ArmAsm
17 lines
484 B
ArmAsm
|
.section .text
|
||
|
.globl _hello
|
||
|
|
||
|
_hello:
|
||
|
# Write the string "Hello, World!\n" to stdout
|
||
|
la a0, msg # Load the address of the string into a0
|
||
|
li a7, 4 # syscall number for write
|
||
|
li a1, 13 # Length of the string
|
||
|
li a2, 1 # File descriptor: stdout
|
||
|
ecall # Make the system call to write
|
||
|
|
||
|
ret # Return from the function
|
||
|
|
||
|
.section .data
|
||
|
msg:
|
||
|
.ascii "Hello, World!\n"
|