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? ) ( HL is prev field's addr. Is offset zero? )
A D LDrr, A D LDrr,
E ORr, E ORr,
IFZ, ( noprev ) IFNZ, ( noprev )
( get absolute addr from offset ) ( get absolute addr from offset )
( carry cleared from "or e" ) ( carry cleared from "or e" )
DE SBCHLss, DE SBCHLss,

View File

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

View File

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