Commit Graph

33 Commits

Author SHA1 Message Date
Virgil Dupras
d8de8a058a Make word routine refs 1b instead of 2
Saves quite a bit of binary space. More than 300 bytes in forth1.bin
2020-04-15 15:16:11 -04:00
Virgil Dupras
b73e1a5f7a z80a: invert the meaning of IFZ, IFNZ, IFC, IFNC,
It is much less confusing when "IFZ," means "If Z is set, continue
into IF, else, jump to THEN,".
2020-04-15 12:20:09 -04:00
Virgil Dupras
7292d486dc z80a: add stuctured flow words
Allow us to rely a little less on labels. We now only need 4.
2020-04-13 20:34:53 -04:00
Virgil Dupras
d996dd8c9e Add one layer of indirection in subsystem memory management
This allows optional subsystems to not needlessly reserve too much
system memory and it also reduces offsets bookkeeping.
2020-04-12 20:42:00 -04:00
Virgil Dupras
6368cc3bac Remove (sysv)
Replace its usages with direct RAM+ offsets. The (sysv) mechanism was
incompatible with cross-compilation of a full interpreter.
2020-04-10 14:57:00 -04:00
Virgil Dupras
c56386af02 wip 2020-04-02 23:21:53 -04:00
Virgil Dupras
d0c5d3a741 Forth self-bootstraps!!!
This commit cuts Forth's dependency on zasm. It now self-assembles
its own boot-binary! Things are a bit messy now, I'll clean up
later.
2020-04-01 22:19:37 -04:00
Virgil Dupras
7d5b1f5cea forth: Forth-ify parseDecimal 2020-03-31 15:04:28 -04:00
Virgil Dupras
25814c0b8b forth: add label system to z80 assembler 2020-03-31 09:23:00 -04:00
Virgil Dupras
05045b2aa4 forth: move stable ABI stuff at the top of forth.asm
Now we're having a real nice and tidy forth.asm...
2020-03-30 21:02:19 -04:00
Virgil Dupras
36e200adbb forth: Forth-ify "SCPY" 2020-03-30 17:59:30 -04:00
Virgil Dupras
80985460d4 forth: remove JTBL
We refer to stable offset as direct numbers instead of offset to JTBL.
Simpler that way.
2020-03-30 17:05:00 -04:00
Virgil Dupras
8ef9e7d0da forth: Forth-ify "@" 2020-03-30 14:05:07 -04:00
Virgil Dupras
e0eaa8ba63 forth: Forth-ify "ABORT" 2020-03-28 10:11:52 -04:00
Virgil Dupras
8d8e1d93da forth: slightly improve assembler 2020-03-28 09:39:24 -04:00
Virgil Dupras
8f990ff954 forth: Forth-ify "IMMEDIATE" 2020-03-27 21:36:05 -04:00
Virgil Dupras
409a9f87e5 forth: replace "ROUTINE" with "JTBL" 2020-03-27 19:53:28 -04:00
Virgil Dupras
29dcddb8cd forth: improve assembler a bit 2020-03-27 18:38:42 -04:00
Virgil Dupras
684cb028ff forth: add words "[" and "]" 2020-03-27 15:25:20 -04:00
Virgil Dupras
e82f13acf1 forth: Forth-ify "I", "I'", "J" 2020-03-26 14:11:22 -04:00
Virgil Dupras
636407969d forth: Forth-ify "(emit)" 2020-03-26 12:05:48 -04:00
Virgil Dupras
52e6eaafc7 forth: Forth-ify "/MOD" 2020-03-25 22:51:23 -04:00
Virgil Dupras
6d8edeec63 forth: Forth-ify "C!" and "C@" 2020-03-25 17:52:51 -04:00
Virgil Dupras
66412a1c30 forth: Forth-ify "XOR" 2020-03-25 17:24:46 -04:00
Virgil Dupras
1871f7cdb4 forth: Forth-ify "OR" 2020-03-25 17:19:47 -04:00
Virgil Dupras
eb6a07a162 forth: Forth-ify "PC@" 2020-03-25 17:13:10 -04:00
Virgil Dupras
7beac94b5a forth: Forth-ify "PC!" 2020-03-25 17:07:15 -04:00
Virgil Dupras
f0ab57c8cc forth: Forth-ify "AND" 2020-03-24 22:09:52 -04:00
Virgil Dupras
d6516e2122 forth: Forth-ify "2*" stack management words 2020-03-24 14:44:10 -04:00
Virgil Dupras
67c55b0b2f forth: Forth-ify ROT, a native word!
This requires us to significantly adjust our build process, which
now has 3 stages.
2020-03-24 13:46:05 -04:00
Virgil Dupras
ca7c21d49f forth: make "(entry)" call WORD itself
Otherwise, when a defining word would be called outside a definition
itself, it would get the name of the last parsed word, that is,
itself!

For example, dummy.fs, instead of creating a "_______" entry, created
a "(entry)" entry...
2020-03-22 22:27:54 -04:00
Virgil Dupras
00de336976 forth: add "CODE"!!! 2020-03-22 12:08:50 -04:00
Virgil Dupras
33e47d4938 forth: begin z80 assembler 2020-03-21 21:23:13 -04:00