Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-5659: Fixed z80 sub instruction semantics

ghidorahrexeb6fbb17ef90
diff --git a/Ghidra/Processors/Z80/data/languages/z80.slaspec b/Ghidra/Processors/Z80/data/languages/z80.slaspec
index 12a590ba7f..1ac5c4387d 100644
--- a/Ghidra/Processors/Z80/data/languages/z80.slaspec
+++ b/Ghidra/Processors/Z80/data/languages/z80.slaspec
@@ -847,7 +847,7 @@ cc2: "C" is bits3_3=0x7 { c:1 = $(C_flag); export c; }
subtractionFlags(a_temp, r_temp);
a_temp = a_temp - r_temp;
setResultFlags(a_temp);
- a_temp = A;
+ A = a_temp;
}
:SUB imm8 is op0_8=0xd6; imm8 {