1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-14 14:28:07 +11:00
Commit Graph

1468 Commits

Author SHA1 Message Date
Virgil Dupras
dee7eea497 Move link.fs to blkfs 2020-04-26 14:37:54 -04:00
Virgil Dupras
4d8574c1fe recipe/rc2014: use core libs from blkfs 2020-04-26 13:57:44 -04:00
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.
2020-04-26 10:24:09 -04:00
Virgil Dupras
0e3cf7fa02 Add word ," 2020-04-26 09:01:49 -04:00
Virgil Dupras
4b7247a971 emul: use LATEST instead of binary size as start addr in stage
More reliable.
2020-04-26 08:37:12 -04:00
Virgil Dupras
898684a795 emul: merge pre.fs and emul.fs into stage1.fs 2020-04-25 22:45:53 -04:00
Virgil Dupras
bc3aabc84e Update z80c.bin's LATEST during xcomp instead of using slatest 2020-04-25 22:02:44 -04:00
Virgil Dupras
6f896caf7a Copy core words to blkfs 2020-04-25 21:54:07 -04:00
Virgil Dupras
6767012ebd recipe/rc2014/selfhost: new recipe 2020-04-25 19:24:55 -04:00
Virgil Dupras
13771d8c92 xcomp: add XPACK 2020-04-25 16:02:47 -04:00
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.
2020-04-25 09:10:25 -04:00
Virgil Dupras
4160c8ebbf recipes/rc2014: busting the 8K limit again! 2020-04-25 08:15:17 -04:00
Virgil Dupras
5219887ad7 sdc: implement _crc16 in z80 2020-04-24 20:46:01 -04:00
Virgil Dupras
8d78ca9dac tests: add test_sdc
The SD card driver is a bit too slow to be bearable. I'll write
_crc16 in z80 and see how it goes.
2020-04-24 18:23:29 -04:00
Virgil Dupras
b5c370a936 emul: embed blkfs in forth binary
This will allow us to read from blkfs in tests.
2020-04-24 18:01:55 -04:00
Virgil Dupras
1bd191e86a Move /emul/forth/* to /emul
Less noisy this way
2020-04-24 17:53:58 -04:00
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.
2020-04-24 14:10:40 -04:00
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.
2020-04-24 12:10:07 -04:00
Virgil Dupras
a699c93509 Print word that wasn't found on "word not found" error 2020-04-24 10:59:59 -04:00
Virgil Dupras
f19a5e1f71 Remove recipes/rc2014/zasm
That becomes irrelevant in Forth
2020-04-24 10:59:28 -04:00
Virgil Dupras
44403c3d4c Move icore to blkfs
The way is clear for complete stage1 bootstrapping on the RC2014
target!
2020-04-23 15:14:14 -04:00
Virgil Dupras
8fbbf5209a Copy sdc driver to blkfs 2020-04-23 13:55:00 -04:00
Virgil Dupras
a19376df6c Copy ACIA driver to blkfs
We can get rid of acia.z80, but not of acia.fs yet, we still need it.
2020-04-23 12:42:41 -04:00
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
503dbe9a2c Copy boot.z80 to blkfs 2020-04-22 21:19:12 -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
2de1eabaa6 z80a: add LDIR, LDDR, and friends 2020-04-20 21:36:29 -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
58c017448f z80a: add JPccnn, 2020-04-20 21:18:33 -04:00
Virgil Dupras
353d12c27d boot: inline chkRS, make next a bit faster 2020-04-20 20:28:25 -04:00
Virgil Dupras
bf49ca2ed2 recipes/rc2014: fix Makefile
It didn't have z80a anymore.
2020-04-20 19:22:43 -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
0892193cbe Copy z80a.fs to disk blocks
I don't remove z80a.fs yet because build process needs it, but that
will change shortly.
2020-04-19 20:36:13 -04:00
Virgil Dupras
98191d0b0d recipes/rc2014/sdcard: now works under Forth! 2020-04-19 16:56:37 -04:00
Virgil Dupras
dfaa1dc101 link: add "offset" argument to RLDICT
As long as our target was the first word of the "user" dict, using
target's prev to compute offset was fine, but when the target is not
the first word, this system breaks down.

This is the case when, instead of including source code in our boot
binary, we paste it in Collapse OS' prompt.

Also, adjust RC2014 recipe to include stage 3 assembling instructions
with the "paste into prompt" method.
2020-04-19 16:28:40 -04:00
Virgil Dupras
29a6ee128d core: fix PSP leak in CASE..ENDCASE 2020-04-18 22:05:11 -04:00
Virgil Dupras
a2d89de557 drv/sdc: implement core words in z80
In addition to making the driver significantly faster, it allows us
to make SDC port configuration opaque to sdc.fs.
2020-04-18 20:33:51 -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
47a7133b8b drv/sdc: Implement "SDC@" as a BLK@ word
"0 LIST" in the RC2014 emulator w/ SD card works!
2020-04-18 18:00:13 -04:00
Virgil Dupras
f3c92684a0 link: improve reliability by never relinking last word
It's not possible to reliably determine its end and with some memory
initialization scenarios, it makes RLDICT fail.
2020-04-18 16:51:48 -04:00