1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 02:48:05 +11:00
Commit Graph

110 Commits

Author SHA1 Message Date
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
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
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
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
af3db1c3cf Add word "LITA" 2020-04-11 13:13:20 -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
f62376bd0a boot: remove _bend
It's not needed anymore now that the boot binary is built in one pass.
2020-04-10 09:59:45 -04:00
Virgil Dupras
7aa1be070b emul: build boot binary in one pass
... instead of building boot.fs, and then z80c.fs/icore.fs in separate
passes. This strengten xcomp by making it support 2 completely separate
dicts (that is, the X dict is *not* connected to the system dict. The chain
now stops at EXIT def in boot.fs).
2020-04-10 09:55:58 -04:00
Virgil Dupras
e6d3638f4f Add CURRENT* and simplify xcomp 2020-04-09 12:01:08 -04:00
Virgil Dupras
1b6286dcfe Make (find) 2-layered, the lower layer having CURRENT as a param 2020-04-09 11:20:54 -04:00
Virgil Dupras
0c3067ed9a icore: simplify definition of ":" and ";" 2020-04-09 09:38:59 -04:00
Virgil Dupras
784b109652 So, why was ":" an immediate again? 2020-04-09 09:27:51 -04:00
Virgil Dupras
afed423530 Remove memory maps
It was a dead end. my new tentative solution is xcomp.
2020-04-09 09:21:55 -04:00
Virgil Dupras
68f359d6c2 Add xcomp unit for cross compilation
Memory mapping is a dead end too, solution has to be at a higher
level. xcomp is my new approach.
2020-04-09 08:23:53 -04:00
Virgil Dupras
2a2e3a64a4 Move IMMED? from z80c to icore 2020-04-08 20:09:32 -04:00
Virgil Dupras
a7a2f3d08b Move IMMEDIATE from z80c to core
This makes IMMEDIATE affected by memory mappings.
2020-04-08 19:43:44 -04:00
Virgil Dupras
64e441d059 Move SCPY from z80c to icore
This way, it can be affected by memory mappers.
2020-04-08 16:12:34 -04:00
Virgil Dupras
ba918d0fef Add memory maps 2020-04-07 20:54:10 -04:00
Virgil Dupras
521ff84ca4 Reserve some RAM for future features 2020-04-07 17:32:04 -04:00
Virgil Dupras
400f0ab0b0 boot: fix flagsToBC
Why did I ever think that using CM was a good idea? any comparison
with numbers more than 0x8000 apart would be wrong...
2020-04-07 11:26:37 -04:00
Virgil Dupras
d013c572ad Use proper RAM addr for HERE in SCPY 2020-04-04 07:34:38 -04:00
Virgil Dupras
80891d7ec1 Add in-memory bootstrapping system
This should help with the bootstrapping of non-emulated environment.
For example, I have a problem with the RC2014: I can't send it
bootstrap info until the ACIA is up. I need to find a way...
2020-04-03 20:13:11 -04:00
Virgil Dupras
b575d7f863 Move (print) and (uflw) from icore to core 2020-04-03 07:44:44 -04:00
Virgil Dupras
b162ef84f5 forth: fix broken RAM+ 2020-04-02 13:42:49 -04:00
Virgil Dupras
941791d609 forth: remove RAMSTART and RS_ADDR from stable ABI 2020-04-02 11:39:40 -04:00
Virgil Dupras
68a7be3707 forth: Remove RAM offsets from stable ABI
Doing this was a bit stupid. These offsets are constants. Moreover,
having them in stable ABI had us construct the boot binary from the
stable ABI of the host, making it very difficult to change RAMSTART
for a new system.
2020-04-02 10:20:51 -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
b7244f8985 forth: shrink forth.asm's binary size 2020-03-31 22:11:44 -04:00
Virgil Dupras
1e85d60d89 forth: Forth-ify "," 2020-03-31 16:32:50 -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
ce6e31dda1 forth: inline "strcmp" 2020-03-31 08:02:40 -04:00
Virgil Dupras
031bfc6d72 forth: setup SYSVNXT in Forth code 2020-03-30 21:48:56 -04:00
Virgil Dupras
e5ab0dd1c9 forth: a little bit of ASM routine inlining 2020-03-30 21:33:37 -04:00
Virgil Dupras
5c03b33982 forth: remove sysvarWord type
Not needed anymore. CONSTANT does the trick.
2020-03-30 21:19:48 -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
f366732424 forth: Forth-ify "DOES>" 2020-03-30 20:01:59 -04:00
Virgil Dupras
36e200adbb forth: Forth-ify "SCPY" 2020-03-30 17:59:30 -04:00
Virgil Dupras
5b01f797fc forth: Forth-ify "(find)" 2020-03-30 17:36:15 -04:00
Virgil Dupras
de3da19333 forth: Forth-ify "NOT" 2020-03-30 17:26:51 -04:00