mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 15:10:55 +11:00
1094ec9c57
DO and LOOP now only compile words from stable ABI, which make them suitable for xcomp. This will greatly simplify driver writing and allow us to mostly avoid the low/high divide in drivers. LEAVE is still xcomp-incompatible though. This make us very very tight for "<0x100" limit for literal words. Hopefully, we won't need more stuff in that area of the binary...
17 lines
558 B
Plaintext
17 lines
558 B
Plaintext
PC ORG @ 0x22 + ! ( litWord, 0xf7, very tight on the 0x100 limit )
|
|
( Like numberWord, but instead of being followed by a 2 bytes
|
|
number, it's followed by a null-terminated string. When
|
|
called, puts the string's address on PS )
|
|
IY PUSHqq, HL POPqq, ( <-- IP )
|
|
HL PUSHqq,
|
|
( skip to null char )
|
|
A XORr, ( look for null )
|
|
B A LDrr,
|
|
C A LDrr,
|
|
CPIR,
|
|
( CPIR advances HL regardless of comparison, so goes one
|
|
char after NULL. This is good, because that's what we
|
|
want... )
|
|
HL PUSHqq, IY POPqq, ( --> IP )
|
|
JPNEXT,
|