This commit is contained in:
Toby Jaffey 2025-12-08 02:45:38 +00:00
parent 751f068486
commit 7bf906f369
2 changed files with 25 additions and 0 deletions

13
apps/crt0.S Normal file
View file

@ -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

View file

@ -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"