mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Non-working c3 example
crt0.S comments are a problem and asm format is different
This commit is contained in:
parent
c691c3ebdf
commit
3efe58ac3c
2 changed files with 53 additions and 0 deletions
19
apps/c3-hello/hello.c3
Normal file
19
apps/c3-hello/hello.c3
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
//static uint32_t syscall(uint32_t id, uint32_t param) {
|
||||
// register uint32_t a0 asm("a0") = (uint32_t)(param);
|
||||
// register uint32_t a1 asm("a1");
|
||||
// register uint32_t a7 asm("a7") = (uint32_t)(id);
|
||||
//
|
||||
// asm volatile (
|
||||
// "ecall"
|
||||
// : "=r"(a1) // output
|
||||
// : "r"(a0), "r"(a7) // input
|
||||
// : "memory"
|
||||
// );
|
||||
// return a1;
|
||||
//}
|
||||
|
||||
fn void main() @export("main") {
|
||||
int x = 42;
|
||||
TBD
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue