pcat: adapt to word type change

This commit is contained in:
Virgil Dupras 2020-06-18 06:50:32 -04:00
parent 3d2dc041fb
commit eed817b517
6 changed files with 16 additions and 17 deletions

View File

@ -1,4 +1,3 @@
: CODE ( same as CREATE, but with native word )
(entry)
23 C, ( 23 == nativeWord ) ;
(entry) 0 ( native ) C, ;
: ;CODE JMPn, 0x1a ( next ) RPCn, ;

14
blk/812
View File

@ -1,15 +1,15 @@
H@ ORG !
JMPn, 0 A,, ( 00, main ) JMPn, 0 A,, ( 03, find )
0 A,, ( 06, unused ) 0 A,, ( 08, LATEST )
0 A, ( 0a, unused ) JMPn, 0 A,, ( 0b, cellWord )
JMPn, 0 A,, ( 0e compiledWord ) JMPn, 0 A,, ( 11, pushRS )
0 A, ( 0a, unused ) 0 A, 0 A,, ( 0b, unused )
0 A, 0 A,, ( 0e, unused ) JMPn, 0 A,, ( 11, pushRS )
JMPn, 0 A,, ( 14, popRS )
DI JMPr, ( 17, nativeWord ) 0 A,
JMPn, 0 A,, ( 1a, next ) JMPn, 0 A,, ( 1d, unused )
0 A, 0 A, ( 20, numberWord ) 0 A, 0 A, ( 22, litWord )
0 A, 0 A, ( 24, addrWord ) 0 A, 0 A, ( 26, unused )
0 A, 0 A,, ( 17, unused )
JMPn, 0 A,, ( 1a, next ) 0 A, 0 A,, ( 1d, unused )
0 A, 0 A, ( 20, unused ) 0 A, 0 A, ( 22, unused )
0 A, 0 A, ( 24, unused ) 0 A, 0 A, ( 26, unused )
0 A, 0 A,, ( unused )
JMPn, 0 A,, ( 2b, doesWord ) 0 A, 0 A, ( 2e, unused )
0 A, 0 A,, ( 2b, unused ) 0 A, 0 A, ( 2e, unused )
0 A, 0 A,, ( unused )
JMPn, 0 A,, ( 33, execute ) 0 A, 0 A, ( unused )
0 A, 0 A,, ( unused )

View File

@ -3,7 +3,7 @@
the "stable ABI" )
'E' A, 'X' A, 'I' A, 'T' A, 0 A,, ( prev ) 4 A, ( len )
H@ XCURRENT ! ( set current tip of dict, 0x42 )
0x17 A, ( nativeWord )
0 A, ( native )
DX [BP] 0 MOVx[]+, BP DECx, BP DECx, ( popRS )
;CODE NOP,
CODE (br) ( 0x53 ) L2 BSET ( used in br? )

View File

@ -1,5 +1,5 @@
PC ORG @ 0x20 + ! ( numberWord )
PC ORG @ 0x24 + ! ( addrWord ) ( see B287 for comments )
ORG @ 0xb9 + HERE !
CODE (n) ( 0xbf, number literal )
DI DX MOVxx, DI [DI] MOVx[], DI PUSHx,
DX INCx, DX INCx,
;CODE

View File

@ -3,11 +3,11 @@ PC 0x1d - ORG @ 0x1b + ! ( next )
DI [DI] MOVx[], ( wordref )
( continue to execute )
L1 BSET PC 0x36 - ORG @ 0x34 + ! ( execute -- DI -> wordref )
AH AH XORrr, AL [DI] MOVr[],
DI INCx, ( PFA )
AX JMPr,
AL [DI] MOVr[], DI INCx, ( PFA )
AL AL ORrr, IFZ, DI JMPr, THEN, ( native )
( continue to compiled )
PC 0x11 - ORG @ 0x0f + ! ( compiledWord -- DI -> PFA )
PC 0x11 - ORG @ 0x0f + ! ( compiled -- DI -> PFA )
BP INCx, BP INCx, [BP] 0 DX MOV[]+x, ( pushRS )
DX DI MOVxx, DX INCx, DX INCx, ( --> IP )
DI [DI] MOVx[],

View File

@ -2,7 +2,7 @@ CODE BYE BEGIN, JMPs, AGAIN, ;CODE
CODE EMIT
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
;CODE CODE 0 AX AX XORxx, AX PUSHx, ;CODE
: FOO 'X' EMIT ; : BAR 0 IF FOO THEN FOO BYE ;
: FOO 'F' EMIT ; : BAR 0 IF FOO THEN FOO BYE ;
L3 BSET 3 A, 'B' A, 'A' A, 'R' A,
PC 3 - ORG @ 1+ ! ( main )
SP PS_ADDR MOVxI,