1
0
mirror of https://github.com/hsoft/collapseos.git synced 2025-04-02 15:28:39 +11:00

Fix mis-documentation about literal words

This commit is contained in:
Virgil Dupras 2020-06-17 16:31:08 -04:00
parent 2be2f74a43
commit 1d468d2168
3 changed files with 12 additions and 7 deletions

View File

@ -7,5 +7,10 @@ compiledWord.
Also note that word routines references in wordrefs are 1b. Also note that word routines references in wordrefs are 1b.
This means that all word routine reference must live below This means that all word routine reference must live below
0x100 in boot binary. This is why numberWord and addrWord are 0x100 in boot binary.
squeezed where they are.

View File

@ -3,9 +3,9 @@ CODE 2>R ( 0xa9 )
17 BCALL, ( 17 == pushRS ) EXDEHL, 17 BCALL, 17 BCALL, ( 17 == pushRS ) EXDEHL, 17 BCALL,
;CODE NOP, NOP, NOP, ;CODE NOP, NOP, NOP,
CODE (n) ( 0xbf, number literal ) CODE (n) ( 0xbf, number literal )
( PF means nothing and the actual number is placed next to ( Literal value to push to stack is next to (n) reference
the (n) reference in the compiled word list. What we need in the atom list. That is where IP is currently pointing.
to do to fetch that number is to play with the IP. ) Read, push, then advance IP. )
E 0 IY+ LDrIXY, E 0 IY+ LDrIXY,
D 1 IY+ LDrIXY, D 1 IY+ LDrIXY,
IY INCss, IY INCss,

View File

@ -1,7 +1,7 @@
CODE (s) ( 0xd4, string literal ) CODE (s) ( 0xd4, string literal )
( Like (n) but instead of being followed by a 2 bytes ( Like (n) but instead of being followed by a 2 bytes
number, it's followed by a null-terminated string. When number, it's followed by a string. When called, puts the
called, puts the string's address on PS ) string's address on PS )
IY PUSHqq, HL POPqq, ( <-- IP ) IY PUSHqq, HL POPqq, ( <-- IP )
E (HL) LDrr, D 0 LDrn, E (HL) LDrr, D 0 LDrn,
DE INCss, DE INCss,