1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 17:38:06 +11:00

sdc: don't use ABORT"

ABORT" doesn't work in xcomp.

Also, improve xcomp docs and fix misdocumentation.
This commit is contained in:
Virgil Dupras 2020-09-24 12:26:43 -04:00
parent 25a35cf28e
commit 35840ad8e6
4 changed files with 29 additions and 4 deletions

View File

@ -1,4 +1,4 @@
: _err 0 (spie) ABORT" SDerr" ; : _err 0 (spie) LIT" SDerr" ERR ;
( Tight definition ahead, pre-comment. ( Tight definition ahead, pre-comment.

View File

@ -71,3 +71,28 @@ bootstrap.txt.
After you're done, you can run EMPTY to go back to a usable After you're done, you can run EMPTY to go back to a usable
system. system.
# Immediate compiling words trickyness
When using an immediate compiling word such as "IF" during
xcomp, things are a bit tricky for two reasons:
1. Immediates used during xcomp are from the host system.
2. The reference of the word(s) they compile is for the host
system.
Therefore, unless the compiled word (for example (?br) compiled
by IF) has exactly the same address in both the host and guest,
the resulting binary will be broken.
For this reason, we re-implement many of those compiling words
in xcomp overrides, hacking our way through, so that those
compiling words compile proper guest references. We don't do
this for all compiling words though. This means that some words
can't be used in core and drivers, for example, ABORT" and .".
How to know whether a word can be used?
1. If it's not an immediate compiling word, it's fine.
2. If its overriden in B270, it's fine.
3. Otherwise, you can't cross-compile it.

View File

@ -1,5 +1,5 @@
Zilog SIO driver Zilog SIO driver
Declarations at B587 Declarations at B607
Driver load range at B588-B590 Driver load range at B608-B610

View File

@ -84,7 +84,7 @@ and `SPI_CTL`, which are respectively `4` and `5` in our relay design.
You also need to tell the SDC subsystem which SPI device to activate by defining You also need to tell the SDC subsystem which SPI device to activate by defining
the `SDC_DEVID` (1, 2, 4, 8 for device 0, 1, 2 or 3) the `SDC_DEVID` (1, 2, 4, 8 for device 0, 1, 2 or 3)
You can then load the driver with `596 LOAD`. This driver provides You can then load the driver with `616 LOAD`. This driver provides
`(spix)` and `(spie)` which are then used in the SDC driver. `(spix)` and `(spie)` which are then used in the SDC driver.
The SDC driver is at B420. It gives you a load range. This means that what The SDC driver is at B420. It gives you a load range. This means that what