diff --git a/demo/hello.c b/demo/hello.c new file mode 100644 index 0000000..4000513 --- /dev/null +++ b/demo/hello.c @@ -0,0 +1,6 @@ +int printf(const char* format, ...); + +int main() { + printf("hello world %d\n", 42); + return 0; +} \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..97cc6a2 --- /dev/null +++ b/run.sh @@ -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 $? \ No newline at end of file