Virgil Dupras
dd6ce1b8fe
Avoid using (xentry) outside xcomp config
2020-04-23 12:09:31 -04:00
Virgil Dupras
fcd77f80ab
Use blk's boot.z80
2020-04-22 21:49:44 -04:00
Virgil Dupras
338769a0a8
z80a: add PUSH0, PUSH1, PUSHZ, macros
2020-04-22 19:03:32 -04:00
Virgil Dupras
7464c67c80
boot: fix (roll)
...
It didn't work for values over 0xff. Duh!
2020-04-22 10:47:23 -04:00
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...
2020-04-21 20:40:23 -04:00
Virgil Dupras
372524fd19
Move xcomp to blocks
2020-04-21 20:30:14 -04:00
Virgil Dupras
446ce574cd
Add words "'S" and "S0"
2020-04-21 07:45:23 -04:00
Virgil Dupras
ae14c55feb
boot: a little dereferencing to make things a bit faster
2020-04-20 23:30:08 -04:00
Virgil Dupras
e569e40665
Forth-ify 2DUP 2OVER 2SWAP
...
2DROP was left in boot.z80 because it's used in icore.
2020-04-20 23:18:57 -04:00
Virgil Dupras
0438cb92fe
Add word "ROLL"
2020-04-20 23:06:39 -04:00
Virgil Dupras
4967c2add2
Merge z80c.fs and boot.fs into boot.z80
2020-04-20 21:27:34 -04:00
Virgil Dupras
41ed70f8cb
z80c: Add word "PICK"
2020-04-20 21:22:07 -04:00
Virgil Dupras
353d12c27d
boot: inline chkRS, make next a bit faster
2020-04-20 20:28:25 -04:00
Virgil Dupras
d466c6d95d
emul: make stage2 load z80a from blkfs
...
This allows us to remove forth/z80a.fs. Another big step towards
self-hosting!
2020-04-19 21:31:41 -04:00
Virgil Dupras
6ae65940d2
Update bootstrap bin
...
It seems that I had forgotten in an earlier commit.
2020-04-19 20:57:09 -04:00
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.
2020-04-18 19:39:28 -04:00
Virgil Dupras
c64a8a2e2b
drv/sdc: new unit to drive SD card through SPI relay
...
Goes through initialization in RC2014 emulator.
2020-04-18 11:11:11 -04:00
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...
2020-04-18 09:18:09 -04:00
Virgil Dupras
82044454d5
Merge branch 'master' into forth
2020-04-17 20:39:08 -04:00
Virgil Dupras
9c41744e46
emul/hw/rc2014: implement blk write in sdc
...
All of that should help me implement sdc support much faster in
Forth.
2020-04-17 20:19:55 -04:00
Virgil Dupras
7544b3834b
emul/hw/rc2014: implement blkread in sdc
...
I now get to "fls" in recipes/rc2014/sdcard!
2020-04-17 19:10:22 -04:00
Virgil Dupras
ae470397d7
emul/hw/rc2014: add sdc emulator (wip)
...
so far, it goes through initialization with the rc2014/sdcard recipe.
2020-04-17 15:11:32 -04:00
Virgil Dupras
9edab10a3a
blk: add dirty flag and auto write blocks on fetch
...
Also, fix some PSP leaks related to LOAD.
2020-04-16 20:59:20 -04:00
Virgil Dupras
eefa8e6de5
Add word "BLK!"
...
as well as emulator support for it. We can now write an edited
block back to "blkfs".
2020-04-16 17:22:18 -04:00
Virgil Dupras
5d4155aa32
Add words 1+ 2+ 1- 2- and consts 0 1 -1
...
Saves quite a few bytes in the final binary.
2020-04-15 21:29:39 -04:00
Virgil Dupras
e1e634c815
boot: compaction
...
It's more hassle than it seems to move the stable ABI...
2020-04-15 20:57:46 -04:00
Virgil Dupras
a56ace4d3e
boot: optimize (br)
2020-04-15 20:03:56 -04:00
Virgil Dupras
0750e8d0c0
Use IY for IP instead of RAM+06
2020-04-15 17:01:15 -04:00
Virgil Dupras
2a84a426b4
Strip usages of IY register
2020-04-15 16:53:04 -04:00
Virgil Dupras
2b0186fd58
boot: make routine field 1b
...
I forgot to do it earlier. NOP having an opcode of 0, it didn't have
any effect.
2020-04-15 16:24:03 -04:00
Virgil Dupras
d2ec5e271c
Optimize boot binary's word execution code
...
Should be significantly faster now. Less push/popping and usage of
DE instead of IY.
2020-04-15 16:09:10 -04:00
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
e40c059c26
Make word routines all in the <0x100 range
2020-04-15 14:00:59 -04:00
Virgil Dupras
728e4ce123
Bring EXECUTE word outside of stable ABI
2020-04-15 13:36:28 -04:00
Virgil Dupras
2439f1ed86
Change SCMP for S=
...
Remove flagsToBC boot routine.
2020-04-15 12:19:58 -04:00
Virgil Dupras
16d5cd91de
emul: don't segfault on quit when there is no blkfs
2020-04-15 10:56:49 -04:00
Virgil Dupras
c40f336959
icore: extract "_pdacc" from "(parsed)"
...
Makes boot binary a bit bigger, but that "_pdacc" word will be
reused in high level apps.
2020-04-15 10:41:27 -04:00
Virgil Dupras
79acf92b28
emul: fix Makefile
2020-04-15 09:01:09 -04:00
Virgil Dupras
aec19e5c87
Add word "LOAD"
2020-04-14 18:15:07 -04:00
Virgil Dupras
a67101fb8b
Add word "EMPTY"
2020-04-14 16:07:07 -04:00
Virgil Dupras
b8dd86bd18
Move notes.txt in blk
2020-04-14 14:54:42 -04:00
Virgil Dupras
f59cac0588
blk: first steps
2020-04-14 09:07:20 -04:00
Virgil Dupras
d919a10265
Remove runbin
...
It's not used
2020-04-13 19:25:28 -04:00
Virgil Dupras
d08a9711c5
boot: make HERE point to RAMEND instead of CURRENT
...
The former was only used in the peculiar context of "/emul". The
regular case is actually HERE pointing to RAMEND on boot.
2020-04-13 11:43:15 -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
c515720e23
Revert "Remove link.fs"
...
Let's revisit the relinking approach, with LITA this time.
This reverts commit 6652125d47
.
2020-04-11 13:31:17 -04:00
Virgil Dupras
af3db1c3cf
Add word "LITA"
2020-04-11 13:13:20 -04:00
Virgil Dupras
3822182226
xcomp: shrink scope
...
It seems that xcomp can't manage to reliably compile core+ units.
Let's limit the role of xcomp to z80c+icore.
I'm getting a little desperate here. I'll revisit the link.fs approach
with a new idea I had...
2020-04-11 11:38:45 -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
a6efb65010
emul: extract capture mark from icore into xstop.fs
2020-04-10 14:16:45 -04:00