mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:38:06 +11:00
forth: remove dummy.fs
All "stop pings" are now explicitly made at appropriate places. This fixes a problem I've introduced in the last commit where RAM+ was unexpectedly part of a stable ABI because of "HERE" usage in dummy.fs. This system will, anyways, soon change because boot.bin and z80c.bin will be built during the same process (but there's a bit of retooling to do before I get there).
This commit is contained in:
parent
68a7be3707
commit
2481ed4b66
@ -7,7 +7,7 @@ AVRABIN = zasm/avra
|
|||||||
SHELLAPPS = zasm ed
|
SHELLAPPS = zasm ed
|
||||||
SHELLTGTS = ${SHELLAPPS:%=cfsin/%}
|
SHELLTGTS = ${SHELLAPPS:%=cfsin/%}
|
||||||
# Those Forth source files are in a particular order
|
# Those Forth source files are in a particular order
|
||||||
FORTHSRCS = core.fs str.fs parse.fs readln.fs fmt.fs z80a.fs dummy.fs
|
FORTHSRCS = core.fs str.fs parse.fs readln.fs fmt.fs z80a.fs
|
||||||
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%}
|
FORTHSRC_PATHS = ${FORTHSRCS:%=../forth/%}
|
||||||
CFSIN_CONTENTS = $(SHELLTGTS) cfsin/user.h
|
CFSIN_CONTENTS = $(SHELLTGTS) cfsin/user.h
|
||||||
OBJS = emul.o libz80/libz80.o
|
OBJS = emul.o libz80/libz80.o
|
||||||
@ -42,7 +42,7 @@ forth/stage1dbg: forth/stage.c $(OBJS) forth/forth0-bin.h
|
|||||||
$(CC) -DDEBUG -DBOOT forth/stage.c $(OBJS) -o $@
|
$(CC) -DDEBUG -DBOOT forth/stage.c $(OBJS) -o $@
|
||||||
|
|
||||||
forth/core.bin: $(FORTHSRC_PATHS) forth/stage1
|
forth/core.bin: $(FORTHSRC_PATHS) forth/stage1
|
||||||
cat $(FORTHSRC_PATHS) | ./forth/stage1 | tee $@ > /dev/null
|
cat $(FORTHSRC_PATHS) ./forth/stop.fs | ./forth/stage1 | tee $@ > /dev/null
|
||||||
|
|
||||||
forth/forth1.bin: forth/forth0.bin forth/core.bin
|
forth/forth1.bin: forth/forth0.bin forth/core.bin
|
||||||
cat forth/forth0.bin forth/core.bin > $@
|
cat forth/forth0.bin forth/core.bin > $@
|
||||||
@ -104,7 +104,7 @@ updatebootstrap: $(ZASMBIN)
|
|||||||
.PHONY: fbootstrap
|
.PHONY: fbootstrap
|
||||||
fbootstrap: forth/stage2
|
fbootstrap: forth/stage2
|
||||||
cat ./forth/conf.fs ../forth/boot.fs | ./forth/stage2 > forth/boot.bin
|
cat ./forth/conf.fs ../forth/boot.fs | ./forth/stage2 > forth/boot.bin
|
||||||
cat ../forth/dummy.fs ../forth/z80c.fs forth/emul.fs ../forth/icore.fs ../forth/dummy.fs | ./forth/stage2 | tee forth/z80c.bin > /dev/null
|
cat ../forth/z80c.fs forth/emul.fs ../forth/icore.fs | ./forth/stage2 | tee forth/z80c.bin > /dev/null
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
2
emul/forth/stop.fs
Normal file
2
emul/forth/stop.fs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
(entry) _
|
||||||
|
H@ 256 /MOD 2 PC! 2 PC!
|
@ -1,13 +0,0 @@
|
|||||||
( When building a compiled dict, always include this unit at
|
|
||||||
the end of it so that Forth knows how to hook LATEST into
|
|
||||||
it. We don't use the word "(entry)" to avoid messing up
|
|
||||||
with icore setup. )
|
|
||||||
CREATE _
|
|
||||||
H@ 2 - HERE !
|
|
||||||
|
|
||||||
( After each dummy word like this, we poke IO port 2 with our
|
|
||||||
current HERE value. The staging executable needs it to know
|
|
||||||
what to dump. )
|
|
||||||
|
|
||||||
H@ 256 / 2 PC!
|
|
||||||
H@ 2 PC!
|
|
@ -252,3 +252,8 @@
|
|||||||
':' ' X 4 - C!
|
':' ' X 4 - C!
|
||||||
';' ' Y 4 - C!
|
';' ' Y 4 - C!
|
||||||
|
|
||||||
|
( Add dummy entry. we use CREATE because (entry) is, at this
|
||||||
|
point, broken. Adjust H@ durint port 2 ping. )
|
||||||
|
CREATE _
|
||||||
|
H@ 2 - 256 /MOD 2 PC! 2 PC!
|
||||||
|
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
expected to be defined in platform-specific code.
|
expected to be defined in platform-specific code.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
( dummy entry for dict hook )
|
||||||
|
(entry) _
|
||||||
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
|
||||||
( a b c -- b c a )
|
( a b c -- b c a )
|
||||||
CODE ROT
|
CODE ROT
|
||||||
HL POPqq, ( C )
|
HL POPqq, ( C )
|
||||||
|
Loading…
Reference in New Issue
Block a user