Virgil Dupras
931c812394
Remove cmp
Not worth the complexity and space.
4 vuotta sitten
Virgil Dupras
0b3a328e65
Add a layer of indirection for KEY
4 vuotta sitten
Virgil Dupras
446a58006d
Remove one of the 2 indirection layers for EMIT
2 was overkill
4 vuotta sitten
Virgil Dupras
3a27479f2b
fix stupid typo
I don't believe this, one hour of my life I'll never get back.
4 vuotta sitten
Virgil Dupras
2a578b3352
editor: implement F
4 vuotta sitten
Virgil Dupras
ecca70c7f3
Add layer of indirection to EMIT
This would allow things like temporary giving control to the *CL
line on the TRS-80. For example... A very far fetched example. Not
at all the only *raison d'etre* of the layer...
4 vuotta sitten
Virgil Dupras
5bf3baff05
editor: add edit buffer
Also, add word "C!+" and fix PSP leak in FILL.
4 vuotta sitten
Virgil Dupras
f38de1c151
Introduce the notion of Extra words
4 vuotta sitten
Virgil Dupras
0cf26547ff
Add words FLUSH and COPY
4 vuotta sitten
Virgil Dupras
581f04a4bc
Keep stage1 bootstrap bin instead of stage 0
XPACKed source needing to be kept in bootstrap bin didn't make
much sense. With the removal of stripfc, it makes more sense to keep
the compiled form of stage 1 in repository as a bootstrap binary.
Also, rename it to forth.bin.
4 vuotta sitten
Virgil Dupras
1b2c4b519e
icore: add BIN+
This allows us to write LATEST at proper offset in emul/stage1.fs in
cases where we set a nonzero BIN(.
4 vuotta sitten
Virgil Dupras
61b2e02351
xcomp: remove XOFF and use ORG and BIN( instead
4 vuotta sitten
Virgil Dupras
4501313410
Add [IF] .. [THEN]
Will be useful as kinds of "#ifdef"s during xcomp.
4 vuotta sitten
Virgil Dupras
2b2ccad96c
Add word FILL
4 vuotta sitten
Virgil Dupras
f605e2d85c
Give CASE's default branch access to its input value
ref #97
4 vuotta sitten
Virgil Dupras
295b4b6e0a
z80a: add BIN( parameter
Will be useful for assembling binaries for the TRS-80 which can't start
at addr 0.
4 vuotta sitten
Virgil Dupras
dee7eea497
Move link.fs to blkfs
4 vuotta sitten
Virgil Dupras
a2f164ecc3
emul: bootstrap to stage2 from within Collapse OS!
Big bootstrapping change which greatly reduces the role of the modern
operating system in the bootstrapping process.
4 vuotta sitten
Virgil Dupras
4b7247a971
emul: use LATEST instead of binary size as start addr in stage
More reliable.
4 vuotta sitten
Virgil Dupras
898684a795
emul: merge pre.fs and emul.fs into stage1.fs
4 vuotta sitten
Virgil Dupras
bc3aabc84e
Update z80c.bin's LATEST during xcomp instead of using slatest
4 vuotta sitten
Virgil Dupras
389b23fe1a
Change C<? mechanic
It's now a simple flag updated by the C< implementation. No more
routine pointer.
The goal is to avoid tons of "ok" during a LOAD operation.
4 vuotta sitten
Virgil Dupras
b5c370a936
emul: embed blkfs in forth binary
This will allow us to read from blkfs in tests.
4 vuotta sitten
Virgil Dupras
1bd191e86a
Move /emul/forth/* to /emul
Less noisy this way
4 vuotta sitten
Virgil Dupras
816563e2e3
Stop LOADing on ABORT
This is done by adding a "C<* override" layer that is reset to 0 on
ABORT.
The problem was that when ABORT happened during a LOAD, we had a
resetted RSP and started from a clean INTERPRET, but LOAD didn't
have the opportunity to restore C<*, which caused it to continue
interpreting from the faulty BLK.
With a C<* override, we don't need to *restore* C<*, we just need to
clear the override.
4 vuotta sitten
Virgil Dupras
af39b37dd1
Replace the "> " prompt with the more traditional "ok" one
This is more than cosmetic, it's also highly usable. The presence
or absence of the "ok" message allows us to know whether the command
aborted. Previously, the "> " prompt appeared when the system expected
a prompt in the INTERPRET context, whether the previous command aborted
or not.
Also, this allows us to get rid of that ugly FLAGS global variable.
4 vuotta sitten
Virgil Dupras
44403c3d4c
Move icore to blkfs
The way is clear for complete stage1 bootstrapping on the RC2014
target!
4 vuotta sitten
Virgil Dupras
dd6ce1b8fe
Avoid using (xentry) outside xcomp config
4 vuotta sitten
Virgil Dupras
fcd77f80ab
Use blk's boot.z80
4 vuotta sitten
Virgil Dupras
338769a0a8
z80a: add PUSH0, PUSH1, PUSHZ, macros
4 vuotta sitten
Virgil Dupras
7464c67c80
boot: fix (roll)
It didn't work for values over 0xff. Duh!
4 vuotta sitten
Virgil Dupras
7a0e63746f
parse: don't validate 0x and 0b lengths
It doesn't serve much purpose and takes up many precious bytes. And,
after all, parsed didn't do it either...
4 vuotta sitten
Virgil Dupras
372524fd19
Move xcomp to blocks
4 vuotta sitten
Virgil Dupras
446ce574cd
Add words "'S" and "S0"
4 vuotta sitten
Virgil Dupras
ae14c55feb
boot: a little dereferencing to make things a bit faster
4 vuotta sitten
Virgil Dupras
e569e40665
Forth-ify 2DUP 2OVER 2SWAP
2DROP was left in boot.z80 because it's used in icore.
4 vuotta sitten
Virgil Dupras
0438cb92fe
Add word "ROLL"
4 vuotta sitten
Virgil Dupras
4967c2add2
Merge z80c.fs and boot.fs into boot.z80
4 vuotta sitten
Virgil Dupras
41ed70f8cb
z80c: Add word "PICK"
4 vuotta sitten
Virgil Dupras
353d12c27d
boot: inline chkRS, make next a bit faster
4 vuotta sitten
Virgil Dupras
d466c6d95d
emul: make stage2 load z80a from blkfs
This allows us to remove forth/z80a.fs. Another big step towards
self-hosting!
4 vuotta sitten
Virgil Dupras
6ae65940d2
Update bootstrap bin
It seems that I had forgotten in an earlier commit.
4 vuotta sitten
Virgil Dupras
a70366aa43
drv/sdc: Implement SDC!
This has been tested in the RC2014 emulator. I could edit blocks with
the Block Editor and they would correctly be written to SDC.
4 vuotta sitten
Virgil Dupras
c64a8a2e2b
drv/sdc: new unit to drive SD card through SPI relay
Goes through initialization in RC2014 emulator.
4 vuotta sitten
Virgil Dupras
b062a9092a
parse: use "0<" instead of "0 <"
As I wrote in my "Clarify signed-ness" commit, "0 <" is broken.
Also, made this unit a bit more compact. The RC2014 stage1 can
really use some breathing room...
4 vuotta sitten
Virgil Dupras
9c41744e46
emul/hw/rc2014: implement blk write in sdc
All of that should help me implement sdc support much faster in
Forth.
4 vuotta sitten
Virgil Dupras
7544b3834b
emul/hw/rc2014: implement blkread in sdc
I now get to "fls" in recipes/rc2014/sdcard!
4 vuotta sitten
Virgil Dupras
ae470397d7
emul/hw/rc2014: add sdc emulator (wip)
so far, it goes through initialization with the rc2014/sdcard recipe.
4 vuotta sitten
Virgil Dupras
9edab10a3a
blk: add dirty flag and auto write blocks on fetch
Also, fix some PSP leaks related to LOAD.
4 vuotta sitten
Virgil Dupras
eefa8e6de5
Add word "BLK!"
as well as emulator support for it. We can now write an edited
block back to "blkfs".
4 vuotta sitten