1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-20 16:28:07 +11:00

xcomp: implement X[']

This commit is contained in:
Virgil Dupras 2020-05-13 13:24:58 -04:00
parent 7c20501f27
commit 0434d02818
10 changed files with 9 additions and 5 deletions

View File

@ -9,6 +9,7 @@ VARIABLE XCURRENT
: XIMM XCON IMMEDIATE XCOFF ;
: _xapply ( a -- a-off )
DUP ORG @ > IF ORG @ - BIN( @ + THEN ;
: X['] XCON ' _xapply LITA XCOFF ;
: XCOMPILE
XCON ' _xapply LITA
LIT< , (find) DROP _xapply , XCOFF ;

View File

@ -5,10 +5,10 @@
NOT IF (parse) ELSE EXECUTE THEN
C<? NOT IF LIT< (ok) (find) IF EXECUTE THEN THEN
AGAIN ;
XCURRENT @ _xapply ( to PSP )
( Drop RSP until I-2 == INTERPRET. )
: EXIT!
[ LITN ] ( I, from PSP )
['] INTERPRET ( I )
BEGIN ( I )
DUP ( I I )
R> DROP I 2- @ ( I I a )

View File

@ -6,7 +6,7 @@
0 0x55 RAM+ ! ( 55 == (key) override )
0 0x0a RAM+ ! ( NLPTR )
( 0c == C<* )
LIT< (boot<) (find) DROP 0x0c RAM+ !
['] (boot<) 0x0c RAM+ !
( boot< always has a char waiting. 06 == C<?* )
1 0x06 RAM+ !
LIT< INIT (find)

View File

@ -9,7 +9,6 @@
EXIT!
THEN
;
XCURRENT @ _xapply ( to PSP, for LOAD )
( pre-comment for tight LOAD: The 0x08==I check after INTERPRET
is to check whether we're restoring to "_", the word above.
if yes, then we're in a nested load. Also, the 1 in 0x06 is

View File

@ -5,7 +5,7 @@
0x2e RAM+ @ >R ( boot ptr )
BLK@
BLK( 0x2e RAM+ ! ( Point to beginning of BLK )
[ LITN ( from PSP, B432 ) ] 0x08 RAM+ !
['] _ 0x08 RAM+ !
1 0x06 RAM+ ! ( 06 == C<? )
INTERPRET
R> 0x2e RAM+ ! R> 0x06 RAM+ !

Binary file not shown.

View File

@ -4,6 +4,7 @@
212 LOAD ( z80 assembler )
262 LOAD ( xcomp )
: CODE XCODE ;
: ['] X['] ; IMMEDIATE
: COMPILE XCOMPILE ; IMMEDIATE
: [COMPILE] X[COMPILE] ; IMMEDIATE
: IMMEDIATE XIMM ;

View File

@ -10,6 +10,7 @@ RAMSTART 0x70 + CONSTANT ACIA_MEM
212 LOAD ( z80 assembler )
262 LOAD ( xcomp )
: CODE XCODE ;
: ['] X['] ; IMMEDIATE
: COMPILE XCOMPILE ; IMMEDIATE
: [COMPILE] X[COMPILE] ; IMMEDIATE
: IMMEDIATE XIMM ;

View File

@ -9,6 +9,7 @@ RAMSTART 0x72 + CONSTANT KBD_MEM
262 LOAD ( xcomp )
522 LOAD ( font compiler )
: CODE XCODE ;
: ['] X['] ; IMMEDIATE
: COMPILE XCOMPILE ; IMMEDIATE
: [COMPILE] X[COMPILE] ; IMMEDIATE
: IMMEDIATE XIMM ;

View File

@ -4,6 +4,7 @@ RS_ADDR 0x80 - CONSTANT RAMSTART
212 LOAD ( z80 assembler )
262 LOAD ( xcomp )
: CODE XCODE ;
: ['] X['] ; IMMEDIATE
: COMPILE XCOMPILE ; IMMEDIATE
: [COMPILE] X[COMPILE] ; IMMEDIATE
: IMMEDIATE XIMM ;