diff --git a/apps/crt0.S b/apps/crt0.S new file mode 100644 index 0000000..220fd7a --- /dev/null +++ b/apps/crt0.S @@ -0,0 +1,13 @@ +#include "uvm32_sys.h" +#include "uvm32_common_custom.h" +.section .initial_jump , "ax", %progbits +.global _start +.align 4 +_start: +# sp is already setup by vm +sw ra,12(sp) +jal ra, main +li a7, 0x138 #IOREQ_HALT (Rust assembler doesn't pick up def...) +ecall +.section .data + diff --git a/apps/hello-asm/hello-asm.S b/apps/hello-asm/hello-asm.S new file mode 100644 index 0000000..a38c926 --- /dev/null +++ b/apps/hello-asm/hello-asm.S @@ -0,0 +1,12 @@ +#include "uvm32_sys.h" +#include "uvm32_common_custom.h" +.section .initial_jump , "ax", %progbits +.global _start +_start: +la a0, str +li a7, IOREQ_PRINTLN +ecall +li a7, IOREQ_HALT +ecall +str: +.ascii "Hi\0"