initial commit

main
magical 2023-04-16 10:38:46 -07:00
commit 7bf0e225a3
4 changed files with 36 additions and 0 deletions

2
.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
/true
/false

14
Makefile 100644
View File

@ -0,0 +1,14 @@
TARGET ?= riscv64-linux-gnu
AS = $(TARGET)-as
LD = $(TARGET)-ld
.SUFFIXES:
all: true false
#all: cat echo
%: %.o
$(LD) -o $@ $<
%.o: %.s
$(AS) -o $@ $<

10
false.s 100644
View File

@ -0,0 +1,10 @@
.globl _start
.option rvc # enable compressed instructions
.text
_start:
li a7, 93 # sys_exit
li a0, 1
ecall

10
true.s 100644
View File

@ -0,0 +1,10 @@
.globl _start
.option rvc # enable compressed instructions
.text
_start:
li a7, 93 # sys_exit
li a0, 0
ecall