Virgil Dupras
8f990ff954
forth: Forth-ify "IMMEDIATE"
2020-03-27 21:36:05 -04:00
Virgil Dupras
41cd8086d4
forth: don't use "(entry)" in dummy.fs
...
Because icore.fs defines it in a "not-for-runtime" manner, dummy.fs
executing it had ill effects. We use a workaround instead.
2020-03-27 21:15:16 -04:00
Virgil Dupras
409a9f87e5
forth: replace "ROUTINE" with "JTBL"
2020-03-27 19:53:28 -04:00
Virgil Dupras
26871be6f2
forth: Forth-ify "C,"
2020-03-27 19:12:46 -04:00
Virgil Dupras
29dcddb8cd
forth: improve assembler a bit
2020-03-27 18:38:42 -04:00
Virgil Dupras
49101915fb
forth: Forth-ify "(entry)"
2020-03-27 16:52:42 -04:00
Virgil Dupras
799ea72974
forth: Forth-ify ":"!!!
...
Lifting ourselves by the bootstraps!
2020-03-27 16:21:34 -04:00
Virgil Dupras
7967c654e0
forth: Un-IMMEDIATE "ROUTINE"
...
It's not needed anymore
2020-03-27 15:51:28 -04:00
Virgil Dupras
f40c14715e
forth: take advantage of the new [] mode
2020-03-27 15:35:58 -04:00
Virgil Dupras
684cb028ff
forth: add words "[" and "]"
2020-03-27 15:25:20 -04:00
Virgil Dupras
839021e0f8
forth: Forth-ify "(print)"
2020-03-27 12:39:59 -04:00
Virgil Dupras
edcd80e3a6
forth: Forth-ify "(parse)"
2020-03-27 11:49:50 -04:00
Virgil Dupras
941224be94
forth: Forth-ify "-"
2020-03-27 11:36:58 -04:00
Virgil Dupras
005dd98fc2
forth: Forth-ify "R>" and ">R"
2020-03-27 11:27:40 -04:00
Virgil Dupras
1e7e696e4a
forth: Forth-ify ";"!!!
...
Ain't that not self-bootstrapping enough to your taste? Whoa, I'm
getting dizzy...
2020-03-27 09:32:03 -04:00
Virgil Dupras
dad0081123
forth: Forth-ify "INTERPRET"!!!
...
Now we're seriously getting into real boostrapping territory...
2020-03-27 08:23:45 -04:00
Virgil Dupras
cb3e6469b8
forth: make "(parsed)" support negative literals
...
This limitation was becoming annoying...
2020-03-26 14:47:17 -04:00
Virgil Dupras
40eda1d933
forth: Forth-ify "*"
2020-03-26 14:36:14 -04:00
Virgil Dupras
e82f13acf1
forth: Forth-ify "I", "I'", "J"
2020-03-26 14:11:22 -04:00
Virgil Dupras
cf2f6703bb
forth: make forth/forth.asm spit whole binary
...
emul/forth/stage{0,1}.asm now only configure constants and append
binaries.
2020-03-26 12:17:02 -04:00
Virgil Dupras
966f6df0c5
forth: Forth-ify "KEY"
2020-03-26 12:12:11 -04:00
Virgil Dupras
636407969d
forth: Forth-ify "(emit)"
2020-03-26 12:05:48 -04:00
Virgil Dupras
d1f572d2ed
forth: Word-ified "(print)"
2020-03-26 11:51:29 -04:00
Virgil Dupras
42abbe75aa
forth: remove 0 and 1 constants
...
They do save space (nearly 100b), but they complicate our Forth-ification
process. We'll re-add them later.
2020-03-26 11:05:58 -04:00
Virgil Dupras
6eaabb9bbe
forth: make word name of variable length
...
This allows us to save a whole 500 bytes on the final binary size!
This change comes after I took a look at the hex dump and saw that one letter
constants in z80a.fs took a lot of space.
2020-03-26 10:53:33 -04:00
Virgil Dupras
52e6eaafc7
forth: Forth-ify "/MOD"
2020-03-25 22:51:23 -04:00
Virgil Dupras
61bb22e8c9
forth: straighten out "/MOD"
...
The removal of the "divide" routine highlighted the fact that
nativeWord wasn't properly stabilized.
2020-03-25 21:49:09 -04:00
Virgil Dupras
c2d8fc845d
forth: bring ." and ABORT" down to core.fs level
2020-03-25 20:39:07 -04:00
Virgil Dupras
3e934a2a3b
forth: fix name conflict with "H" in core and z80a
2020-03-25 20:13:33 -04:00
Virgil Dupras
77ecbc4918
forth: Forth-ify "'" and "[']"
2020-03-25 20:06:06 -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
04a6784de4
forth: Forth-ify "(sysv)"
2020-03-25 08:39:44 -04:00
Virgil Dupras
3a08fa7e74
forth: add a stable ABI
2020-03-24 23:02:06 -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
5387e08437
forth: make bin staging process a bit less hackish
...
The goal being to add a new native code dict staging phase.
2020-03-22 21:46:43 -04:00
Virgil Dupras
ffe61a12f8
forth: make prev word field relative
...
This should help with upcoming challenges in bootstrapping z80 code
compiled through Forth.
2020-03-22 17:41:59 -04:00
Virgil Dupras
00de336976
forth: add "CODE"!!!
2020-03-22 12:08:50 -04:00
Virgil Dupras
46833f3819
forth: Forth-ify "LIT", "LITS", "LIT<"
2020-03-22 11:56:40 -04:00
Virgil Dupras
54fd5fbb2b
forth: Forth-ify "CREATE"
2020-03-22 11:49:09 -04:00
Virgil Dupras
1e886f5f34
forth: add word "ROUTINE"
2020-03-22 11:25:39 -04:00
Virgil Dupras
33e47d4938
forth: begin z80 assembler
2020-03-21 21:23:13 -04:00
Virgil Dupras
d5b6659507
forth: forgot to commit high.fs...
2020-03-21 21:22:07 -04:00
Virgil Dupras
ac914c3847
forth: consolidation
2020-03-21 18:40:30 -04:00
Virgil Dupras
f4b969986d
forth: Forth-ify ".""
2020-03-21 17:21:01 -04:00
Virgil Dupras
def4ebd7ea
forth: add word "LITS"
2020-03-21 16:31:53 -04:00
Virgil Dupras
145fdd8e05
forth: rename "LITS" to "LIT<"
2020-03-21 16:27:21 -04:00
Virgil Dupras
4627e1c977
forth: Forth-ify "ABORT""
2020-03-21 16:17:51 -04:00
Virgil Dupras
6487c713ef
forth: fix prompt in QUIT conditions
2020-03-21 15:22:37 -04:00
Virgil Dupras
9791c0957d
forth: make readline skip prompt when appropriate
2020-03-21 14:59:12 -04:00
Virgil Dupras
b47a3ee234
forth: add words "AND", "OR", "XOR"
2020-03-21 14:47:38 -04:00
Virgil Dupras
c1ece95089
forth: implement readline in Forth
...
The commit ended up being much bigger than anticipated. This was a long thread
of underlying complexities. This lead to the creation of interesting concepts
such as (sysv).
2020-03-21 12:57:49 -04:00
Virgil Dupras
2feb246334
forth: give WORD its own buffer
...
You'll soon see where I'm going with this...
2020-03-19 21:56:53 -04:00
Virgil Dupras
61abafbc1a
forth: a little housekeeping
2020-03-19 21:45:27 -04:00
Virgil Dupras
abb84b01db
forth: Word-ify "readword"
2020-03-19 21:40:35 -04:00
Virgil Dupras
5458a1f7ff
forth: a little housekeeping
2020-03-19 17:39:44 -04:00
Virgil Dupras
cf95bbcace
forth: inline kernel/stdio
2020-03-19 17:26:45 -04:00
Virgil Dupras
6134694513
forth: put all ASM code in the same file
2020-03-19 17:01:15 -04:00
Virgil Dupras
f420db135d
forth: a little house cleaning
2020-03-19 16:36:54 -04:00
Virgil Dupras
af5a97243a
forth: implement "0b" number parsing
2020-03-19 16:03:35 -04:00
Virgil Dupras
f0cbda1f2e
tests: add Forth tests
...
Modest first step
2020-03-19 15:43:48 -04:00
Virgil Dupras
b335e538b4
Move "forth" folder to project's root folder
...
It's not really an App.
2020-03-18 22:25:44 -04:00