mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:28:06 +11:00
Bring EXECUTE word outside of stable ABI
This commit is contained in:
parent
22f132094a
commit
728e4ce123
Binary file not shown.
@ -31,13 +31,13 @@ RAMSTART 0x4e + JPnn, ( 28, RST 28 )
|
|||||||
0 JPnn, ( 2b, doesWord )
|
0 JPnn, ( 2b, doesWord )
|
||||||
NOP, NOP, ( 2e, unused )
|
NOP, NOP, ( 2e, unused )
|
||||||
RAMSTART 0x4e + JPnn, ( RST 30 )
|
RAMSTART 0x4e + JPnn, ( RST 30 )
|
||||||
NOP, NOP, NOP, ( unused )
|
0 JPnn, ( 33, execute )
|
||||||
NOP, NOP, ( unused )
|
NOP, NOP, ( unused )
|
||||||
RAMSTART 0x4e + JPnn, ( RST 38 )
|
RAMSTART 0x4e + JPnn, ( RST 38 )
|
||||||
NOP, ( unused )
|
NOP, ( unused )
|
||||||
|
|
||||||
( BOOT DICT
|
( BOOT DICT
|
||||||
There are only 5 words in the boot dict, but these words'
|
There are only 3 words in the boot dict, but these words'
|
||||||
offset need to be stable, so they're part of the "stable
|
offset need to be stable, so they're part of the "stable
|
||||||
ABI"
|
ABI"
|
||||||
)
|
)
|
||||||
@ -70,7 +70,7 @@ L2 BSET ( used in CBR )
|
|||||||
'(' A, '?' A, 'b' A, 'r' A, ')' A,
|
'(' A, '?' A, 'b' A, 'r' A, ')' A,
|
||||||
PC L1 @ - A,, ( prev )
|
PC L1 @ - A,, ( prev )
|
||||||
5 A,
|
5 A,
|
||||||
L1 BSET ( CBR )
|
H@ XCURRENT ! ( set current tip of dict )
|
||||||
0x17 A,, ( nativeWord )
|
0x17 A,, ( nativeWord )
|
||||||
HL POPqq,
|
HL POPqq,
|
||||||
chkPS,
|
chkPS,
|
||||||
@ -84,22 +84,6 @@ L1 BSET ( CBR )
|
|||||||
RAMSTART 0x06 + LD(nn)HL, ( RAMSTART+0x06 == IP )
|
RAMSTART 0x06 + LD(nn)HL, ( RAMSTART+0x06 == IP )
|
||||||
JPNEXT,
|
JPNEXT,
|
||||||
|
|
||||||
'E' A, 'X' A, 'E' A, 'C' A, 'U' A, 'T' A, 'E' A,
|
|
||||||
PC L1 @ - A,, ( prev )
|
|
||||||
7 A,
|
|
||||||
H@ XCURRENT ! ( set current tip of dict )
|
|
||||||
L2 BSET ( used frequently below )
|
|
||||||
0x17 A,, ( nativeWord )
|
|
||||||
IY POPqq, ( is a wordref )
|
|
||||||
chkPS,
|
|
||||||
L 0 IY+ LDrIXY,
|
|
||||||
H 1 IY+ LDrIXY,
|
|
||||||
( HL points to code pointer )
|
|
||||||
IY INCss,
|
|
||||||
IY INCss,
|
|
||||||
( IY points to PFA )
|
|
||||||
JP(HL),
|
|
||||||
|
|
||||||
( END OF STABLE ABI )
|
( END OF STABLE ABI )
|
||||||
|
|
||||||
( Name of BOOT word )
|
( Name of BOOT word )
|
||||||
@ -130,7 +114,7 @@ PC ORG @ 1 + ! ( main )
|
|||||||
HL L1 @ LDddnn,
|
HL L1 @ LDddnn,
|
||||||
0x03 CALLnn, ( 03 == find )
|
0x03 CALLnn, ( 03 == find )
|
||||||
DE PUSHqq,
|
DE PUSHqq,
|
||||||
L2 @ 2 + JPnn,
|
0x33 JPnn, ( 33 == execute )
|
||||||
|
|
||||||
PC ORG @ 4 + ! ( find )
|
PC ORG @ 4 + ! ( find )
|
||||||
( Find the entry corresponding to word name where (HL) points
|
( Find the entry corresponding to word name where (HL) points
|
||||||
@ -238,7 +222,7 @@ L1 BSET ( abortUnderflow )
|
|||||||
DE RAMSTART 0x02 + LDdd(nn), ( RAM+02 == CURRENT )
|
DE RAMSTART 0x02 + LDdd(nn), ( RAM+02 == CURRENT )
|
||||||
0x03 CALLnn, ( find )
|
0x03 CALLnn, ( find )
|
||||||
DE PUSHqq,
|
DE PUSHqq,
|
||||||
L2 @ 2 + JPnn, ( EXECUTE, skip nativeWord )
|
0x33 JPnn, ( 33 == execute )
|
||||||
|
|
||||||
|
|
||||||
PC ORG @ 0x1e + ! ( chkPS )
|
PC ORG @ 0x1e + ! ( chkPS )
|
||||||
@ -282,7 +266,18 @@ PC ORG @ 0x1b + ! ( next )
|
|||||||
HL INCss,
|
HL INCss,
|
||||||
D (HL) LDrr,
|
D (HL) LDrr,
|
||||||
DE PUSHqq,
|
DE PUSHqq,
|
||||||
L2 @ 2 + JPnn, ( EXECUTE, skip nativeWord )
|
( continue to execute )
|
||||||
|
|
||||||
|
PC ORG @ 0x34 + ! ( execute )
|
||||||
|
IY POPqq, ( is a wordref )
|
||||||
|
chkPS,
|
||||||
|
L 0 IY+ LDrIXY,
|
||||||
|
H 1 IY+ LDrIXY,
|
||||||
|
( HL points to code pointer )
|
||||||
|
IY INCss,
|
||||||
|
IY INCss,
|
||||||
|
( IY points to PFA )
|
||||||
|
JP(HL),
|
||||||
|
|
||||||
( WORD ROUTINES )
|
( WORD ROUTINES )
|
||||||
|
|
||||||
@ -302,7 +297,7 @@ PC ORG @ 0x0f + ! ( compiledWord )
|
|||||||
L 0 IY+ LDrIXY,
|
L 0 IY+ LDrIXY,
|
||||||
H 1 IY+ LDrIXY,
|
H 1 IY+ LDrIXY,
|
||||||
HL PUSHqq, ( arg for EXECUTE )
|
HL PUSHqq, ( arg for EXECUTE )
|
||||||
L2 @ 2 + JPnn, ( EXECUTE, skip nativeWord )
|
0x33 JPnn, ( 33 == execute )
|
||||||
|
|
||||||
PC ORG @ 0x0c + ! ( cellWord )
|
PC ORG @ 0x0c + ! ( cellWord )
|
||||||
( Pushes the PFA directly )
|
( Pushes the PFA directly )
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
This unit expects the same conf as boot.fs.
|
This unit expects the same conf as boot.fs.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
CODE EXECUTE
|
||||||
|
0x33 JPnn, ( 33 == execute )
|
||||||
|
|
||||||
( a b c -- b c a )
|
( a b c -- b c a )
|
||||||
CODE ROT
|
CODE ROT
|
||||||
HL POPqq, ( C )
|
HL POPqq, ( C )
|
||||||
|
Loading…
Reference in New Issue
Block a user