Simple Startup
This commit is contained in:
17
hello.s
Normal file
17
hello.s
Normal file
@@ -0,0 +1,17 @@
|
||||
.section .text
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
li a0, 1 # file descriptor (stdout)
|
||||
la a1, msg # buffer address
|
||||
li a2, 14 # message length
|
||||
li a7, 64 # syscall: write
|
||||
ecall
|
||||
|
||||
li a0, 0 # exit code
|
||||
li a7, 93 # syscall: exit
|
||||
ecall
|
||||
|
||||
.section .rodata
|
||||
msg:
|
||||
.ascii "Hello, RISC-V\n"
|
||||
Reference in New Issue
Block a user