z80a: invert the meaning of IFZ, IFNZ, IFC, IFNC,

It is much less confusing when "IFZ," means "If Z is set, continue
into IF, else, jump to THEN,".
This commit is contained in:
Virgil Dupras 2020-04-15 12:20:09 -04:00
parent 2439f1ed86
commit b73e1a5f7a
3 changed files with 14 additions and 13 deletions

View File

@ -201,7 +201,7 @@ L4 FSET L3 FSET ( loopend )
( HL is prev field's addr. Is offset zero? )
A D LDrr,
E ORr,
IFZ, ( noprev )
IFNZ, ( noprev )
( get absolute addr from offset )
( carry cleared from "or e" )
DE SBCHLss,

View File

@ -372,10 +372,10 @@
: BWR @ AGAIN, ;
( same as BSET, but we need to write a placeholder )
: FJR, PC 0 A, ;
: IFZ, JRZ, FJR, ;
: IFNZ, JRNZ, FJR, ;
: IFC, JRC, FJR, ;
: IFNC, JRNC, FJR, ;
: IFZ, JRNZ, FJR, ;
: IFNZ, JRZ, FJR, ;
: IFC, JRNC, FJR, ;
: IFNC, JRC, FJR, ;
: THEN,
DUP PC ( l l pc )
-^ 1 - ( l off )

View File

@ -149,10 +149,10 @@ CODE NOT
A L LDrr,
H ORr,
HL 0 LDddnn,
IFNZ, ( skip )
IFZ,
( false, make 1 )
HL INCss,
THEN, ( skip )
THEN,
HL PUSHqq,
;CODE
@ -209,10 +209,10 @@ CODE /MOD
RLA,
HL ADCHLss,
DE SBCHLss,
IFNC, ( skip )
IFC,
DE ADDHLss,
C DECr,
THEN, ( skip )
THEN,
DJNZ, AGAIN, ( loop )
B A LDrr,
HL PUSHqq,
@ -340,10 +340,10 @@ CODE CMP
chkPS,
DE SUBHLss,
BC 0 LDddnn,
IFZ,
IFNZ,
( not equal )
BC INCss,
IFC,
IFNC,
( < )
BC DECss,
BC DECss,
@ -359,13 +359,14 @@ CODE _find
chkPS,
( 3 == find )
3 CALLnn,
IFZ, ( found )
IFNZ,
( not found )
HL PUSHqq,
DE 0 LDddnn,
DE PUSHqq,
JPNEXT,
THEN, ( found )
THEN,
( found )
DE PUSHqq,
DE 1 LDddnn,
DE PUSHqq,