tools/emul/shell: copy user.h in its cfsin
This way, we can compile apps from within the shell that run on the shell.
This commit is contained in:
parent
bed7032ee5
commit
40b3d5e11e
1
tools/emul/.gitignore
vendored
1
tools/emul/.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
/runbin/runbin
|
||||
/*/*-bin.h
|
||||
/cfsin/zasm
|
||||
/cfsin/user.h
|
||||
|
@ -5,9 +5,10 @@ APPS = ../../apps
|
||||
ZASMBIN = zasm/zasm
|
||||
ZASMSH = ../zasm.sh
|
||||
SHELLAPPS = $(addprefix cfsin/, zasm)
|
||||
CFSIN_CONTENTS = $(SHELLAPPS) cfsin/user.h
|
||||
|
||||
.PHONY: all
|
||||
all: $(TARGETS) $(SHELLAPPS)
|
||||
all: $(TARGETS) $(CFSIN_CONTENTS)
|
||||
|
||||
shell/kernel-bin.h: shell/shell_.asm $(ZASMBIN)
|
||||
$(ZASMSH) $(KERNEL) < $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
|
||||
@ -34,6 +35,9 @@ $(CFSPACK):
|
||||
$(SHELLAPPS): $(ZASMBIN)
|
||||
$(ZASMSH) $(KERNEL) $(APPS) shell/user.h < $(APPS)/$(notdir $@)/glue.asm > $@
|
||||
|
||||
cfsin/user.h: shell/user.h
|
||||
cp $< $@
|
||||
|
||||
.PHONY: updatebootstrap
|
||||
updatebootstrap: $(ZASMBIN) $(INCCFS)
|
||||
$(ZASMSH) $(KERNEL) < zasm/glue.asm > zasm/kernel.bin
|
||||
|
12
tools/emul/cfsin/hello.asm
Normal file
12
tools/emul/cfsin/hello.asm
Normal file
@ -0,0 +1,12 @@
|
||||
.equ printstr 0x3c
|
||||
|
||||
.org 0x9000
|
||||
|
||||
ld hl, sAwesome
|
||||
call printstr
|
||||
xor a ; success
|
||||
ret
|
||||
|
||||
sAwesome:
|
||||
.db "Assembled from the shell", 0x0d, 0x0a, 0
|
||||
|
Loading…
Reference in New Issue
Block a user