bulk: changing experiments structure and how i use it.
This commit is contained in:
parent
20d4c9d3b7
commit
521c5b0063
20 changed files with 802 additions and 0 deletions
19
machine/riscv-asm/main.s
Normal file
19
machine/riscv-asm/main.s
Normal file
|
@ -0,0 +1,19 @@
|
|||
.global _start
|
||||
|
||||
_start:
|
||||
addi a7, x0, 64 # syscall write
|
||||
addi a0, x0, 1 # stdout fd
|
||||
la a1, str_helloworld # load label into reg: a1
|
||||
addi a2, x0, 13 # length of string
|
||||
ecall # call kernel
|
||||
|
||||
beqz x0, _exit # branch if = to zero
|
||||
|
||||
_exit:
|
||||
addi a7, x0, 93 # syscall exit
|
||||
addi a0, x0, 0 # exit code
|
||||
ecall # call kernel
|
||||
|
||||
|
||||
str_helloworld:
|
||||
.ascii "Hello World!\n"
|
Loading…
Add table
Add a link
Reference in a new issue