mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Rename .s to .S so preprocessor runs (https://stackoverflow.com/questions/33358825/gnu-assembler-preprocessor-define)
This commit is contained in:
parent
751f068486
commit
7bf906f369
2 changed files with 25 additions and 0 deletions
13
apps/crt0.S
Normal file
13
apps/crt0.S
Normal 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
|
||||
|
||||
12
apps/hello-asm/hello-asm.S
Normal file
12
apps/hello-asm/hello-asm.S
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue