diff --git a/blk/285 b/blk/285 index 1bb3bce..79de6c2 100644 --- a/blk/285 +++ b/blk/285 @@ -1,11 +1,11 @@ CODE (?br) ( 0x67 ) - HL POPqq, chkPS, + HL POPqq, HLZ, JRZ, L2 BWR ( BR + 2. False, branch ) L1 BSET ( loop will jump here ) ( True, skip next 2 bytes and don't branch ) IY INCss, IY INCss, - JPNEXT, + JPNEXT, NOP, NOP, NOP, CODE (loop) ( 0x77 ) 0 IX+ INC(IXY+), IFZ, 1 IX+ INC(IXY+), THEN, ( I++ ) ( Jump if I <> I' ) diff --git a/blk/286 b/blk/286 index 2b35008..0a8a05e 100644 --- a/blk/286 +++ b/blk/286 @@ -1,11 +1,11 @@ CODE >R ( 0xa8 ) - HL POPqq, chkPS, + HL POPqq, 17 BCALL, ( 17 == pushRS ) -;CODE +;CODE NOP, NOP, NOP, CODE 2>R ( 0xb9 ) - DE POPqq, HL POPqq, chkPS, + DE POPqq, HL POPqq, 17 BCALL, ( 17 == pushRS ) EXDEHL, 17 BCALL, -;CODE +;CODE NOP, NOP, NOP, CODE R> ( 0xce ) 20 BCALL, ( 20 == popRS ) HL PUSHqq, diff --git a/blk/299 b/blk/299 index d547d8f..7563212 100644 --- a/blk/299 +++ b/blk/299 @@ -1,10 +1,13 @@ PC ORG @ 0x1e + ! ( chkPS ) - HL PUSHqq, +( Note that you only need to call this in words that push + back to PSP. If they don't, calling chkPS is redundant with + check in next ) + EXX, ( We have the return address for this very call on the stack - and protected registers. 4 - is to compensate that. ) - HL PS_ADDR 4 - LDddnn, + and protected registers. 2 - is to compensate that. ) + HL PS_ADDR 2 - LDddnn, SP SUBHLss, - HL POPqq, + EXX, CNC RETcc, ( PS_ADDR >= SP? good ) JR, L2 BWR ( abortUnderflow-B298 ) diff --git a/blk/310 b/blk/310 index 19cc92b..49003c9 100644 --- a/blk/310 +++ b/blk/310 @@ -1,6 +1,5 @@ CODE PICK HL POPqq, - chkPS, ( x2 ) L SLAr, H RLr, SP ADDHLss, diff --git a/blk/312 b/blk/312 index b2db2ee..d5d4528 100644 --- a/blk/312 +++ b/blk/312 @@ -2,7 +2,6 @@ CODE 2DROP HL POPqq, HL POPqq, - chkPS, ;CODE ( a b -- a b a b ) diff --git a/blk/322 b/blk/322 index 076a17c..e5c4f5e 100644 --- a/blk/322 +++ b/blk/322 @@ -1,7 +1,6 @@ CODE ! HL POPqq, DE POPqq, - chkPS, (HL) E LDrr, HL INCss, (HL) D LDrr, diff --git a/blk/323 b/blk/323 index 746d380..58fb98a 100644 --- a/blk/323 +++ b/blk/323 @@ -1,7 +1,6 @@ CODE C! HL POPqq, DE POPqq, - chkPS, (HL) E LDrr, ;CODE diff --git a/blk/324 b/blk/324 index 7e732d4..4234faa 100644 --- a/blk/324 +++ b/blk/324 @@ -1,7 +1,6 @@ CODE PC! BC POPqq, HL POPqq, - chkPS, L OUT(C)r, ;CODE diff --git a/emul/forth.bin b/emul/forth.bin index 11e79e1..bb31f03 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ