diff options
Diffstat (limited to 'c/rvcontroller-libraries/rvcontroller-init.S')
| -rw-r--r-- | c/rvcontroller-libraries/rvcontroller-init.S | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/c/rvcontroller-libraries/rvcontroller-init.S b/c/rvcontroller-libraries/rvcontroller-init.S new file mode 100644 index 0000000..83cab9d --- /dev/null +++ b/c/rvcontroller-libraries/rvcontroller-init.S @@ -0,0 +1,26 @@ +#Assembly stub for C programs targeting RVController +#A product of Advanced Mesecons Devices, a Cheapie Systems company +#This is free and unencumbered software released into the public domain. +#See http://unlicense.org/ for more information + +#This file should always be linked first. +#RVController has a default reset vector of 0, +#therefore _start should end up as the first thing in the file. + +.section .text.startup +_start: + +# Set up stack pointer +li sp,0x10000 + +# Call main function +call main + +# Exit program +li a7,10 +ecall + +# Shouldn't ever get here, will crash if it does +ret + +.globl _start |
