diff --git a/blk/200 b/blk/200 index 4a603a0..9eda24a 100644 --- a/blk/200 +++ b/blk/200 @@ -10,4 +10,4 @@ Z80 Assembler 234 OP2r 236 OP2ss 238 OP3ddnn 240 OP3nn 242 Specials 246 Flow - +249 Macros diff --git a/blk/212 b/blk/212 index ed21bd3..d99e524 100644 --- a/blk/212 +++ b/blk/212 @@ -5,4 +5,4 @@ H@ 0x59 RAM+ ! 213 LOAD 215 LOAD 216 LOAD 217 LOAD 218 LOAD 219 LOAD 220 LOAD 222 LOAD 223 LOAD 224 LOAD 226 LOAD 228 LOAD 230 LOAD 232 LOAD 234 LOAD 236 LOAD 238 LOAD 240 LOAD -242 LOAD 243 LOAD 244 LOAD 246 LOAD 247 LOAD +242 LOAD 243 LOAD 246 LOAD 247 LOAD 249 LOAD diff --git a/blk/244 b/blk/244 deleted file mode 100644 index 8087ff2..0000000 --- a/blk/244 +++ /dev/null @@ -1,3 +0,0 @@ -( Macros ) -( clear carry + SBC ) -: SUBHLss, A ORr, SBCHLss, ; diff --git a/blk/249 b/blk/249 new file mode 100644 index 0000000..329b69d --- /dev/null +++ b/blk/249 @@ -0,0 +1,6 @@ +( Macros ) +( clear carry + SBC ) +: SUBHLss, A ORr, SBCHLss, ; +: PUSH0, BC 0 LDddnn, BC PUSHqq, ; +: PUSH1, BC 1 LDddnn, BC PUSHqq, ; +: PUSHZ, BC 0 LDddnn, IFZ, BC INCss, THEN, BC PUSHqq, ; diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index d1a5509..b09fe80 100644 Binary files a/emul/forth/z80c.bin and b/emul/forth/z80c.bin differ diff --git a/forth/boot.z80 b/forth/boot.z80 index af0d617..b351080 100644 --- a/forth/boot.z80 +++ b/forth/boot.z80 @@ -489,12 +489,7 @@ CODE NOT chkPS, A L LDrr, H ORr, - HL 0 LDddnn, - IFZ, - ( false, make 1 ) - HL INCss, - THEN, - HL PUSHqq, + PUSHZ, ;CODE CODE + @@ -656,9 +651,6 @@ CODE S= DE POPqq, HL POPqq, chkPS, - ( pre-push false ) - BC 0 LDddnn, - BC PUSHqq, BEGIN, ( loop ) LDA(DE), (HL) CPr, @@ -668,11 +660,8 @@ CODE S= HL INCss, DE INCss, JRNZ, AGAIN, ( loop ) - ( success, change false to true ) - HL POPqq, - HL INCss, - HL PUSHqq, L1 FSET ( end ) + PUSHZ, ;CODE CODE CMP @@ -703,14 +692,12 @@ CODE _find IFNZ, ( not found ) HL PUSHqq, - DE 0 LDddnn, - DE PUSHqq, + PUSH0, JPNEXT, THEN, ( found ) DE PUSHqq, - DE 1 LDddnn, - DE PUSHqq, + PUSH1, ;CODE CODE (im1) @@ -718,15 +705,8 @@ CODE (im1) EI, ;CODE -CODE 0 - HL 0 LDddnn, - HL PUSHqq, -;CODE - -CODE 1 - HL 1 LDddnn, - HL PUSHqq, -;CODE +CODE 0 PUSH0, ;CODE +CODE 1 PUSH1, ;CODE CODE -1 HL -1 LDddnn,