From 1eb8f759d78582e20b82de1069244d38538bf686 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Tue, 5 Nov 2013 21:45:55 -0800 Subject: [PATCH] BRK instruction adjustment * Changes from AppleWin ... set Break and Xtra for pushed flags * Late set Interrupt flag for current flags (should be unchanged) --- src/cpu.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu.S b/src/cpu.S index b5481546..29f930d1 100644 --- a/src/cpu.S +++ b/src/cpu.S @@ -830,11 +830,12 @@ op_BRK: movw PC_Reg, %ax Push(%ah) Push(%al) + orb $(B_Flag|X_Flag), F_Reg xorl %eax,%eax movb F_Reg, %al - orb $I_Flag, F_Reg movb SN(cpu65_flags_encode)(,%eax,1), %al Push(%al) + orb $I_Flag, F_Reg movw $0xFFFE, EffectiveAddr GetFromEA_W movw %ax, PC_Reg