mirror of
https://github.com/hsoft/collapseos.git
synced 2025-01-25 01:36:04 +11:00
pcat: begin implementing compiledWord/next
This commit is contained in:
parent
feeedcc55c
commit
16d6a0b377
2
blk/758
2
blk/758
@ -1,4 +1,4 @@
|
||||
: CODE ( same as CREATE, but with native word )
|
||||
(entry)
|
||||
23 C, ( 23 == nativeWord ) ;
|
||||
: ;CODE ;
|
||||
: ;CODE JMPn, 0x1a ( next ) RPCn, ;
|
||||
|
2
blk/810
2
blk/810
@ -2,4 +2,6 @@ PC/AT Recipe
|
||||
|
||||
Work in progress.
|
||||
|
||||
Register usage: SP is PSP, BP is RSP, DX is IP
|
||||
|
||||
811 Hello World boot
|
||||
|
1
blk/812
1
blk/812
@ -1,4 +1,3 @@
|
||||
( Registers. SP -> PSP DX -> RSP CX -> IP )
|
||||
H@ ORG !
|
||||
JMPn, 0 A,, ( 00, main ) JMPn, 0 A,, ( 03, find )
|
||||
0 A,, ( 06, unused ) 0 A,, ( 08, LATEST )
|
||||
|
3
blk/813
3
blk/813
@ -7,7 +7,8 @@
|
||||
H@ XCURRENT ! ( set current tip of dict, 0x42 )
|
||||
0x17 A, ( nativeWord )
|
||||
;CODE
|
||||
CODE BYE BEGIN, JMPs, AGAIN, ;CODE
|
||||
CODE FOO
|
||||
AH 0x0e MOVri, ( print char ) AL 'X' MOVri, 0x10 INT,
|
||||
BEGIN, JMPs, AGAIN,
|
||||
;CODE
|
||||
: BAR FOO FOO BYE ;
|
||||
|
14
blk/814
14
blk/814
@ -1,5 +1,13 @@
|
||||
L1 BSET PC 3 - ORG @ 0x34 + ! ( execute -- DI -> wordref )
|
||||
AH AH XORrr,
|
||||
AL [DI] MOVr[],
|
||||
PC 0x1d - ORG @ 0x1b + ! ( next )
|
||||
DI DX MOVxx, ( <-- IP ) DX INCx, DX INCx,
|
||||
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,
|
||||
|
||||
PC 0x11 - ORG @ 0x0f + ! ( compiledWord -- DI -> PFA )
|
||||
DX DI MOVxx, DX INCx, DX INCx, ( --> IP )
|
||||
DI [DI] MOVx[],
|
||||
JMPs, L1 @ RPCs,
|
||||
|
Loading…
Reference in New Issue
Block a user