Rename Inner core to Cross-compiled core
And refreshed description.
This commit is contained in:
parent
6beb082e29
commit
9ad7ee7a4b
2
blk/001
2
blk/001
@ -6,7 +6,7 @@ MASTER INDEX
|
||||
150 Extra words
|
||||
200 Z80 assembler 260 Cross compilation
|
||||
280 Z80 boot code 350 ACIA driver
|
||||
370 SD Card driver 390 Inner core
|
||||
370 SD Card driver 390 Cross-compiled core
|
||||
420 Core words 480 AT28 Driver
|
||||
490 TRS-80 Recipe 520 Fonts
|
||||
550 TI-84+ Recipe
|
||||
|
20
blk/390
20
blk/390
@ -1,16 +1,14 @@
|
||||
Inner core
|
||||
Cross-compiled core
|
||||
|
||||
This unit represents core definitions that happen right after
|
||||
native definitions. Before core.fs.
|
||||
This units contains core Collapse OS that are cross-compiled.
|
||||
During building, these come right after the boot binary (B280).
|
||||
|
||||
Unlike core.fs and its followers, this unit isn't self-
|
||||
sustained. Like native defs it uses the machinery of a full
|
||||
Forth interpreter, notably for flow structures.
|
||||
|
||||
Because of that, it has to obey specific rules:
|
||||
|
||||
1. It cannot compile a word from higher layers. Using
|
||||
immediates is fine though.
|
||||
Because this unit is designed to be cross-compiled, things are
|
||||
a little weird. It is compiling in the context of a full
|
||||
Forth interpreter with all bells and whistles (and z80
|
||||
assembler), but it has to obey strict rules:
|
||||
|
||||
1. It cannot compile a word from higher layers. Immediates are
|
||||
fine.
|
||||
|
||||
(cont.)
|
||||
|
28
blk/391
28
blk/391
@ -1,16 +1,16 @@
|
||||
2. If it references a word from this unit or from native
|
||||
definitions, these need to be properly offsetted because
|
||||
their offset at compile time are not the same as their
|
||||
runtime offsets.
|
||||
3. Anything they refer to in the boot binary has to be properly
|
||||
stabilized.
|
||||
4. Make sure that the words you compile are not overridden by
|
||||
the full interpreter.
|
||||
5. When using words as immediates, make sure that they're not
|
||||
defined in icore or, if they are, make sure that they are
|
||||
*not* offsetted
|
||||
2. Immediate words that have been cross compiled *cannot* be
|
||||
used. Only immediates from the host system can be used.
|
||||
3. If an immediate word compiles words, it can only be words
|
||||
that are part of the stable ABI.
|
||||
|
||||
All of this is because when cross compiling, all atom ref-
|
||||
erences are offsetted to the target system and are thus
|
||||
unusable directly. For the same reason, any reference to a word
|
||||
in the host system will obviously be wrong in the target
|
||||
system. More details in B260.
|
||||
|
||||
|
||||
|
||||
(cont.)
|
||||
This unit is loaded in two "low" and "high" parts. The low part
|
||||
is the biggest chunk and has the most definitions. The high
|
||||
part is the "sensitive" chunk and contains "LITN", ":" and ";"
|
||||
definitions which, once defined, kind of make any more defs
|
||||
impossible. (cont.)
|
||||
|
12
blk/392
12
blk/392
@ -1,15 +1,3 @@
|
||||
Those rules are mostly met by the "xcomp" unit, which is
|
||||
expected to have been loaded prior to icore and redefines ":"
|
||||
and other defining words. So, in other words, when compiling
|
||||
icore, ":" doesn't means what you think it means, go look in
|
||||
B260.
|
||||
|
||||
This is loaded in two "low" and "high" parts. The low part is
|
||||
the biggest chunk and has the most definitions. The high part
|
||||
is the "sensitive" chunk and contains "LITN", ":" and ";"
|
||||
definitions which, once defined, kind of make any more defs
|
||||
impossible.
|
||||
|
||||
The gap between these 2 parts is the ideal place to put device
|
||||
driver code. Load the low part with "393 LOAD", the high part
|
||||
with "415 LOAD"
|
||||
|
14
blk/420
14
blk/420
@ -1,12 +1,12 @@
|
||||
Core words
|
||||
|
||||
These words follow Inner core words, but unlike them, these are
|
||||
self-bootstrapping and don't depend on the Cross Compiler. They
|
||||
will typically be included in source form right after a stage1
|
||||
binary which will interpret it on boot and bootstrap itself to
|
||||
a full intepreter, which can then be relinked with the
|
||||
Relinker. There is no loader for these libraries because you
|
||||
will typically XPACK (B267) them.
|
||||
These words follow cross-compiled words, but unlike them, these
|
||||
are self-bootstrapping and don't depend on the Cross Compiler.
|
||||
They will typically be included in source form right after a
|
||||
stage1 binary which will interpret it on boot and bootstrap
|
||||
itself to a full intepreter, which can then be relinked with
|
||||
the Relinker. There is no loader for these libraries because
|
||||
you will typically XPACK (B267) them.
|
||||
|
||||
422 core 438 print
|
||||
442 fmt 447 readln
|
||||
|
Loading…
Reference in New Issue
Block a user