mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 09:58:06 +11:00
pcat: add RSP checks in next
This commit is contained in:
parent
f9eb7c661b
commit
8d645405b3
16
blk/816
16
blk/816
@ -1,13 +1,9 @@
|
||||
lblnext BSET PC 0x1d - ORG @ 0x1b + ! ( next )
|
||||
( RSP check )
|
||||
AX RS_ADDR MOVxI, BP AX CMPxx,
|
||||
IFC, ( BP < RS_ADDR )
|
||||
DI 0x06 MOVxm, JMPs, L1 FWRs ( execute )
|
||||
THEN,
|
||||
DI DX MOVxx, ( <-- IP ) DX INCx, DX INCx,
|
||||
DI [DI] MOVx[], ( wordref )
|
||||
( continue to execute )
|
||||
lblexec BSET PC 0x36 - ORG @ 0x34 + ! ( DI -> wordref )
|
||||
AL [DI] MOVr[], DI INCx, ( PFA )
|
||||
AL AL ORrr, IFZ, DI JMPr, THEN, ( native )
|
||||
AL DECr, IFNZ, ( cell or does )
|
||||
DI PUSHx, ( push PFA )
|
||||
AL DECr, IFZ, ( cell ) JMPs, lblnext @ RPCs, THEN,
|
||||
( does, see B302 )
|
||||
DI INCx, DI INCx, DI [DI] MOVx[],
|
||||
THEN, ( continue to compiled cont. )
|
||||
( continue to execute ) L1 FSET
|
||||
|
16
blk/817
16
blk/817
@ -1,11 +1,15 @@
|
||||
( compiled )
|
||||
lblexec BSET PC 0x36 - ORG @ 0x34 + ! ( DI -> wordref )
|
||||
AL [DI] MOVr[], DI INCx, ( PFA )
|
||||
AL AL ORrr, IFZ, DI JMPr, THEN, ( native )
|
||||
AL DECr, IFNZ, ( cell or does )
|
||||
DI PUSHx, ( push PFA )
|
||||
AL DECr, IFZ, ( cell ) JMPs, lblnext @ RPCs, THEN,
|
||||
( does, see B302 )
|
||||
DI INCx, DI INCx, DI [DI] MOVx[],
|
||||
THEN, ( continue to compiled )
|
||||
( compiled )
|
||||
BP INCx, BP INCx, [BP] 0 DX MOV[]+x, ( pushRS )
|
||||
DX DI MOVxx, DX INCx, DX INCx, ( --> IP )
|
||||
DI [DI] MOVx[],
|
||||
JMPs, lblexec @ RPCs,
|
||||
|
||||
lblchkPS BSET ( CX -> expected size )
|
||||
AX PS_ADDR MOVxI, AX SP SUBxx, 2 SUBAXI, ( CALL adjust )
|
||||
AX CX SUBxx,
|
||||
IFNC, ( we're good ) RETn, THEN,
|
||||
( underflow ) DI 0x06 MOVxm, JMPs, lblexec @ RPCs,
|
||||
|
Loading…
Reference in New Issue
Block a user