1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 20:18:04 +11:00
Commit Graph

1609 Commits

Author SHA1 Message Date
Virgil Dupras
8bb9230f49 z80a: make PUSH* macros use DE instead of BC
This is in preparation of using BC instead of IY for IP. I've
verified all PUSH* usage and none was problematic.
2020-07-05 17:36:31 -04:00
Virgil Dupras
293a561ab2 Fix SDC tests 2020-07-05 15:01:59 -04:00
Virgil Dupras
f2f520cacc Extract (br), (?br) and (loop)'s code out of stable ABI zone
There is now no more actual code in stable ABI, only references.
This makes refactoring of this code much easier. For example,
changing IY to BC as the IP register.
2020-07-05 14:57:18 -04:00
Virgil Dupras
daeb3b3c69 Extract (n) code from stable ABI 2020-07-05 14:16:24 -04:00
Virgil Dupras
a2f880b145 z80: remove popRS from stable ABI 2020-07-05 13:44:38 -04:00
Virgil Dupras
5705cd5c31 Extract EXIT code from stable ABI zone 2020-07-05 13:41:12 -04:00
Virgil Dupras
84202da6a6 z80: prettify 2020-07-05 13:15:26 -04:00
Virgil Dupras
4a91ee5c9c Extract (s) code from stable ABI zone
Only its jump addr remains.
2020-07-05 08:54:22 -04:00
Virgil Dupras
b626944273 z80: move back R* words to native words section
This allows us to refer to pushRS/popRS routines by labels, allowing
us to get rid of the pushRS reference in the stable ABI zone.
2020-07-05 08:15:50 -04:00
Virgil Dupras
650481f849 z80/8086: extract 2>R code from stable ABI zone
Only its jump at 0x33 remains.

I've also fixed a strange offset oddity in 8086's (n) placement.
It was off by 2, but strangely, it ran properly. Anyway, now it's
fixed.
2020-07-05 08:03:15 -04:00
Virgil Dupras
94cb76520a Refer to stable wordref by direct offset in "hot zone" immediates
Previously, it was impossible to cross-compile Collapse OS from a
binary-offsetted Collapse OS because stable ABI wordrefs would have
a wrongly offsetted address.

This solves the problem by replacing those wordrefs by direct,
hardcoded stable ABI offset references.
2020-07-05 07:09:11 -04:00
Virgil Dupras
2111f694f6 VE: 'g' becomes 'G' and 'g' selects line 2020-07-04 07:40:12 -04:00
Virgil Dupras
c2b507eaff tools: improve usability on OpenBSD
So far, I hadn't managed to run those tools properly on OpenBSD. I
was too confused by its stty peculiarities. I'm still confused, but
at least I managed to make them work... most of the time...
2020-07-02 11:36:53 -04:00
Virgil Dupras
a8302920cb tools/memdump: expect proper prompt 2020-06-30 11:06:59 -04:00
Virgil Dupras
fff893452d cvm: remove makefile duplicate recipe 2020-06-30 10:29:06 -04:00
Virgil Dupras
d97012ecae Fix makefile build-from-clean-repo glitches 2020-06-30 10:24:12 -04:00
Virgil Dupras
f09aa0603c rc2014: separate SPI relay and SDC drivers
My intention is to reuse the SPI relay to program AVR MCUs from a
RC2014.
2020-06-29 18:48:00 -04:00
Virgil Dupras
1ac7038863 avra: add TOC and instructions list 2020-06-29 08:01:39 -04:00
Virgil Dupras
74e211eeda Fix bugs in ed's U and VE's O/o
U didn't properly handle inserting on the last line and O's bounds
checks didn't make sense.
2020-06-28 20:34:39 -04:00
Virgil Dupras
5e01e6405a VE: add @ command 2020-06-28 20:19:42 -04:00
Virgil Dupras
5a2612a9c5 Add HERESTART xcomp config 2020-06-28 19:45:28 -04:00
Virgil Dupras
3068b58be5 Rename RAMSTART to SYSVARS
It's more descriptive this way. Also, I'll soon add a new HERESTART
config.
2020-06-28 18:49:30 -04:00
Virgil Dupras
9424770caa rc2014: add a declaration part to ACIA drivers
Driver configuration don't need their own words at runtime, we only
need to compile them as literals when compiling words.

Now that we have this "declaration blocks" pattern emerging, it
seems like a good idea to take advantage of this in drivers, both
for simplifying the xcomp unit and to make final binary slimmer.
2020-06-28 17:30:01 -04:00
Virgil Dupras
b8800be76f rc2014: improve SD card driver docs 2020-06-28 16:34:41 -04:00
Virgil Dupras
27025bf141 Slight adjustments to bootstrap docs 2020-06-28 07:42:20 -04:00
Virgil Dupras
5052efb60f VE: supress ed's output on E and X
Most of the time, this output would be hidden by the next screen
update, except when editing the last line.
2020-06-28 07:04:08 -04:00
Virgil Dupras
101193a78c avra: begin writing docs 2020-06-28 06:57:59 -04:00
Virgil Dupras
440ea43a88 z80a: make mnemonic names more uniform across assemblers
Initially, I used the same letters as those used in the z80 ref
docs, but it makes the different assemblers harder to use than they
should. Having consistent "argtype" rules across assemblers should
help.
2020-06-27 22:01:56 -04:00
Virgil Dupras
490c57834f emul: update README 2020-06-27 07:53:58 -04:00
Virgil Dupras
0eb9bd090a Move zasm.sh from emul to cvm 2020-06-27 07:44:43 -04:00
Virgil Dupras
785b375028 tests: separate tests that need to run on z80 vs those that don't 2020-06-27 07:41:42 -04:00
Virgil Dupras
ceabc9920f move avra.sh from emul to cvm
The stage binary is now there.
2020-06-27 07:32:19 -04:00
Virgil Dupras
a65f674c74 emul: build from "cvm" instead of from itself
The C VM now runs the show.
2020-06-26 22:08:45 -04:00
Virgil Dupras
1312817117 z80: make boot binary a 2-part process
Previously, recipes that began spitting binary contents before
loading block 282 would end up with VARIABLE code in their binary,
thus breaking them. We fix this by making this loading process
2-part.
2020-06-26 21:41:17 -04:00
Virgil Dupras
891e4f861a z80: fix chkPS's "stable ABI" form in binaries with offset
Before lblnext is set, we need to use BJP, instead of JPnn, for the
jump to work in binaries with offsets.
2020-06-26 21:24:12 -04:00
Virgil Dupras
b3e865d0fb recipes: use cvm's staging binary instead of emul's
Much faster!
2020-06-26 21:23:13 -04:00
Virgil Dupras
8a7fa77163 cvm: bootstraps itself! 2020-06-26 18:58:02 -04:00
Virgil Dupras
fc3919863f cvm: implement stack underflow errors 2020-06-26 17:55:10 -04:00
Virgil Dupras
9021e5f6e0 cvm: fix does 2020-06-26 17:35:21 -04:00
Virgil Dupras
36cb1389e6 Add a C implementation of native words
This will soon replace the libz80 based "forth" and
"stage" executables. This is much, much faster.
2020-06-26 15:50:13 -04:00
Virgil Dupras
e8f1464ae5 Re-add Michael Schierl's emulator link to README
I has removed it when I switched to Forth because it was emulating
the assembler version, but Michael updated it, so I relink it.

The JS VM part is so cool!
2020-06-24 06:51:43 -04:00
Virgil Dupras
20813f71b8 Remove discussion section from README
Having this information on the website is enough.
2020-06-24 06:27:33 -04:00
Virgil Dupras
8607c94922 Update CONTRIBUTING with instructions for sending patches 2020-06-23 22:11:06 -04:00
Virgil Dupras
fb695b67df Replace Travis CI with Sourcehut CI 2020-06-23 20:53:38 -04:00
Virgil Dupras
7eeec67ff5 Add extra words WIPED? and FREEBLKS? 2020-06-23 07:21:33 -04:00
Virgil Dupras
9ab5cda397 ed: rename I to i
Shadowing core "I" is too messy. As soon as ed is loaded in memory,
nothing else that isn't "i-aware" can be loaded anymore.

I guess that's why "contexts" exist in Starting Forth, but adding
this concept just for allowing the shadowing of core words seems
overkill to me. Renaming I to i in ed seems better.
2020-06-23 07:08:21 -04:00
Virgil Dupras
af339d8c6a VE: properly make buffer dirty on E and X 2020-06-23 06:53:30 -04:00
Virgil Dupras
2d9a07d215 blkunpack: don't include trailing empty lines
This was becoming heavy to manage.
2020-06-23 06:52:34 -04:00
Virgil Dupras
49d7a7f435 z80mbc2: add BLK support 2020-06-22 21:21:24 -04:00
Virgil Dupras
a7660fba0e z80mbc2: new recipe
ref #82
2020-06-22 19:09:41 -04:00