Non-working c3 example

crt0.S comments are a problem and asm format is different
This commit is contained in:
Toby Jaffey 2025-12-08 13:17:26 +00:00
parent c691c3ebdf
commit 3efe58ac3c
2 changed files with 53 additions and 0 deletions

19
apps/c3-hello/hello.c3 Normal file
View 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
}