riscv_asm/hello.s

17 lines
305 B
ArmAsm
Raw Permalink Normal View History

2024-11-24 23:51:08 -05:00
.section .data
message:
.asciz "Hello from libzomutils!\n"
2024-11-23 00:46:33 -05:00
2024-11-24 23:51:08 -05:00
.section .text
.global _start
2024-11-23 00:46:33 -05:00
2024-11-24 23:51:08 -05:00
_start:
# Load the address of the message into a0 (first argument register)
la a0, message
2024-11-23 00:46:33 -05:00
2024-11-24 23:51:08 -05:00
# Call the puts function from libzomutils
call puts
2024-11-23 00:46:33 -05:00
2024-11-24 23:51:08 -05:00
# Exit the program
call exit