From eb6fbb17ef9059b76d41942aa8268453d9ef4773 Mon Sep 17 00:00:00 2001 From: ghidorahrex Date: Tue, 13 May 2025 14:24:39 +0000 Subject: [PATCH] GP-5659: Fixed z80 sub instruction semantics --- Ghidra/Processors/Z80/data/languages/z80.slaspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {