@@ -221,13 +221,13 @@ impl fmt::Display for InstructionType {
221
221
// Conditional instructions: format the associated condition as its standard abbreviation
222
222
Call ( Some ( cond) ) | Jp ( Some ( cond) ) | Jr ( Some ( cond) ) | Ret ( Some ( cond) ) => match cond {
223
223
Condition :: FlagSet ( flag) => match flag {
224
- Flag :: PV => write ! ( f, " PO " ) , // Parity Odd
225
- Flag :: S => write ! ( f, " P " ) , // Sign Positive
224
+ Flag :: PV => write ! ( f, " PE " ) , // Parity Even
225
+ Flag :: S => write ! ( f, " M " ) , // Sign Positive
226
226
_ => write ! ( f, " {}" , flag) ,
227
227
} ,
228
228
Condition :: FlagNotSet ( flag) => match flag {
229
- Flag :: PV => write ! ( f, " PE " ) , // Parity Even
230
- Flag :: S => write ! ( f, " M " ) , // Sign Negative
229
+ Flag :: PV => write ! ( f, " PO " ) , // Parity Odd
230
+ Flag :: S => write ! ( f, " P " ) , // Sign Negative
231
231
_ => write ! ( f, " N{}" , flag) ,
232
232
} ,
233
233
_ => Ok ( ( ) ) ,
@@ -1050,35 +1050,35 @@ impl Instruction {
1050
1050
0xDD => decode_index_instruction ( bytes, IX ) ?,
1051
1051
0xDE => root ! ( Sbc , OctetImmediate ( next_byte!( ) ) , RegisterImplied ( A ) ) ,
1052
1052
0xDF => root ! ( Rst ( 0x18 ) ) ,
1053
- 0xE0 => root ! ( Ret ( Some ( FlagSet ( Flag :: PV ) ) ) ) ,
1053
+ 0xE0 => root ! ( Ret ( Some ( FlagNotSet ( Flag :: PV ) ) ) ) ,
1054
1054
0xE1 => root ! ( Pop , destination: RegisterPairImplied ( HL ) ) ,
1055
- 0xE2 => root ! ( Jp ( Some ( FlagSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1055
+ 0xE2 => root ! ( Jp ( Some ( FlagNotSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1056
1056
0xE3 => root ! ( Ex , RegisterPairImplied ( HL ) , MemoryIndirect ( SP ) ) ,
1057
- 0xE4 => root ! ( Call ( Some ( FlagSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1057
+ 0xE4 => root ! ( Call ( Some ( FlagNotSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1058
1058
0xE5 => root ! ( Push , source: RegisterPairImplied ( HL ) ) ,
1059
1059
0xE6 => root ! ( And , source: OctetImmediate ( next_byte!( ) ) ) ,
1060
1060
0xE7 => root ! ( Rst ( 0x20 ) ) ,
1061
- 0xE8 => root ! ( Ret ( Some ( FlagNotSet ( Flag :: PV ) ) ) ) ,
1061
+ 0xE8 => root ! ( Ret ( Some ( FlagSet ( Flag :: PV ) ) ) ) ,
1062
1062
0xE9 => root ! ( Jp ( None ) , source: RegisterPairImplied ( HL ) ) ,
1063
- 0xEA => root ! ( Jp ( Some ( FlagNotSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1063
+ 0xEA => root ! ( Jp ( Some ( FlagSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1064
1064
0xEB => root ! ( Ex , RegisterPairImplied ( HL ) , RegisterPairImplied ( DE ) ) ,
1065
- 0xEC => root ! ( Call ( Some ( FlagNotSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1065
+ 0xEC => root ! ( Call ( Some ( FlagSet ( Flag :: PV ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1066
1066
0xED => decode_extended_instruction ( bytes) ?,
1067
1067
0xEE => root ! ( Xor , source: OctetImmediate ( next_byte!( ) ) ) ,
1068
1068
0xEF => root ! ( Rst ( 0x28 ) ) ,
1069
- 0xF0 => root ! ( Ret ( Some ( FlagSet ( Flag :: S ) ) ) ) ,
1069
+ 0xF0 => root ! ( Ret ( Some ( FlagNotSet ( Flag :: S ) ) ) ) ,
1070
1070
0xF1 => root ! ( Pop , destination: RegisterPairImplied ( AF ) ) ,
1071
- 0xF2 => root ! ( Jp ( Some ( FlagSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1071
+ 0xF2 => root ! ( Jp ( Some ( FlagNotSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1072
1072
0xF3 => root ! ( Di ) ,
1073
- 0xF4 => root ! ( Call ( Some ( FlagSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1073
+ 0xF4 => root ! ( Call ( Some ( FlagNotSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1074
1074
0xF5 => root ! ( Push , source: RegisterPairImplied ( AF ) ) ,
1075
1075
0xF6 => root ! ( Or , source: OctetImmediate ( next_byte!( ) ) ) ,
1076
1076
0xF7 => root ! ( Rst ( 0x30 ) ) ,
1077
- 0xF8 => root ! ( Ret ( Some ( FlagNotSet ( Flag :: S ) ) ) ) ,
1077
+ 0xF8 => root ! ( Ret ( Some ( FlagSet ( Flag :: S ) ) ) ) ,
1078
1078
0xF9 => root ! ( Ld , RegisterPairImplied ( HL ) , RegisterPairImplied ( SP ) ) ,
1079
- 0xFA => root ! ( Jp ( Some ( FlagNotSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1079
+ 0xFA => root ! ( Jp ( Some ( FlagSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1080
1080
0xFB => root ! ( Ei ) ,
1081
- 0xFC => root ! ( Call ( Some ( FlagNotSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1081
+ 0xFC => root ! ( Call ( Some ( FlagSet ( Flag :: S ) ) ) , source: DoubletImmediate ( next_doublet!( ) ) ) ,
1082
1082
0xFD => decode_index_instruction ( bytes, IY ) ?,
1083
1083
0xFE => root ! ( Cp , source: OctetImmediate ( next_byte!( ) ) ) ,
1084
1084
0xFF => root ! ( Rst ( 0x38 ) ) ,
0 commit comments