From 4cab56f2f493fafa1d0412feb537f0eb70ca28aa Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 5 Sep 2022 23:41:18 +0900 Subject: [PATCH] Fix flags set by AAM instruction --- src/rust/cpu/arith.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rust/cpu/arith.rs b/src/rust/cpu/arith.rs index 2ab15efc..2e1598d4 100644 --- a/src/rust/cpu/arith.rs +++ b/src/rust/cpu/arith.rs @@ -345,6 +345,7 @@ pub unsafe fn bcd_aam(imm8: i32) { write_reg8(AH, temp as i32 / imm8); write_reg8(AL, temp as i32 % imm8); *last_result = read_reg8(AL); + *last_op_size = OPSIZE_8; *flags_changed = FLAGS_ALL & !1 & !FLAG_ADJUST & !FLAG_OVERFLOW; *flags &= !1 & !FLAG_ADJUST & !FLAG_OVERFLOW };