demo
This commit is contained in:
parent
917ba6b619
commit
41a17c3428
2 changed files with 11 additions and 0 deletions
6
demo/hello.c
Normal file
6
demo/hello.c
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
int printf(const char* format, ...);
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("hello world %d\n", 42);
|
||||||
|
return 0;
|
||||||
|
}
|
5
run.sh
Normal file
5
run.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
gcc boot.c boot-lib.c &&
|
||||||
|
./a.out < $1 > $1.s &&
|
||||||
|
riscv64-linux-gnu-gcc-12 -static $1.s boot-lib.c -o $1.out &&
|
||||||
|
qemu-riscv64 $1.out
|
||||||
|
echo $?
|
Loading…
Add table
Add a link
Reference in a new issue