mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:38:06 +11:00
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
|
/runbin/runbin
|
||||||
/*/*-bin.h
|
/*/*-bin.h
|
||||||
/cfsin/zasm
|
/cfsin/zasm
|
||||||
|
/cfsin/user.h
|
||||||
|
@ -5,9 +5,10 @@ APPS = ../../apps
|
|||||||
ZASMBIN = zasm/zasm
|
ZASMBIN = zasm/zasm
|
||||||
ZASMSH = ../zasm.sh
|
ZASMSH = ../zasm.sh
|
||||||
SHELLAPPS = $(addprefix cfsin/, zasm)
|
SHELLAPPS = $(addprefix cfsin/, zasm)
|
||||||
|
CFSIN_CONTENTS = $(SHELLAPPS) cfsin/user.h
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: $(TARGETS) $(SHELLAPPS)
|
all: $(TARGETS) $(CFSIN_CONTENTS)
|
||||||
|
|
||||||
shell/kernel-bin.h: shell/shell_.asm $(ZASMBIN)
|
shell/kernel-bin.h: shell/shell_.asm $(ZASMBIN)
|
||||||
$(ZASMSH) $(KERNEL) < $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
|
$(ZASMSH) $(KERNEL) < $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
|
||||||
@ -34,6 +35,9 @@ $(CFSPACK):
|
|||||||
$(SHELLAPPS): $(ZASMBIN)
|
$(SHELLAPPS): $(ZASMBIN)
|
||||||
$(ZASMSH) $(KERNEL) $(APPS) shell/user.h < $(APPS)/$(notdir $@)/glue.asm > $@
|
$(ZASMSH) $(KERNEL) $(APPS) shell/user.h < $(APPS)/$(notdir $@)/glue.asm > $@
|
||||||
|
|
||||||
|
cfsin/user.h: shell/user.h
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
.PHONY: updatebootstrap
|
.PHONY: updatebootstrap
|
||||||
updatebootstrap: $(ZASMBIN) $(INCCFS)
|
updatebootstrap: $(ZASMBIN) $(INCCFS)
|
||||||
$(ZASMSH) $(KERNEL) < zasm/glue.asm > zasm/kernel.bin
|
$(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