mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-12 21:30:07 +00:00
Refactoring: removing redundant code
This commit is contained in:
parent
23e6e0ea75
commit
efc63aeb7a
@ -818,8 +818,7 @@ E(op_BRK)
|
|||||||
Push(%ah)
|
Push(%ah)
|
||||||
Push(%al)
|
Push(%al)
|
||||||
orb $(B_Flag|X_Flag), F_Reg
|
orb $(B_Flag|X_Flag), F_Reg
|
||||||
xorl _XAX,_XAX
|
movzbl F_Reg, _XAX
|
||||||
movb F_Reg, %al
|
|
||||||
movb SN(cpu65_flags_encode)(,_XAX,1), %al
|
movb SN(cpu65_flags_encode)(,_XAX,1), %al
|
||||||
Push(%al)
|
Push(%al)
|
||||||
orb $I_Flag, F_Reg
|
orb $I_Flag, F_Reg
|
||||||
@ -1153,7 +1152,6 @@ E(op_JMP_abs)
|
|||||||
Continue
|
Continue
|
||||||
|
|
||||||
E(op_JMP_ind) // 0x6c
|
E(op_JMP_ind) // 0x6c
|
||||||
xorl _XAX, _XAX
|
|
||||||
GetFromPC_B
|
GetFromPC_B
|
||||||
xchgb %al, %ah
|
xchgb %al, %ah
|
||||||
GetFromPC_B
|
GetFromPC_B
|
||||||
@ -1451,7 +1449,6 @@ E(op_PLA) // 0x68
|
|||||||
---------------------------------- */
|
---------------------------------- */
|
||||||
|
|
||||||
E(op_PLP) // 0x28
|
E(op_PLP) // 0x28
|
||||||
xorl _XAX, _XAX
|
|
||||||
Pop(%al)
|
Pop(%al)
|
||||||
movb SN(cpu65_flags_decode)(,_XAX,1), F_Reg
|
movb SN(cpu65_flags_decode)(,_XAX,1), F_Reg
|
||||||
orb $(B_Flag|X_Flag), F_Reg
|
orb $(B_Flag|X_Flag), F_Reg
|
||||||
@ -1545,7 +1542,6 @@ E(op_ROR_abs_x) // 0x7e
|
|||||||
---------------------------------- */
|
---------------------------------- */
|
||||||
|
|
||||||
E(op_RTI) // 0x40
|
E(op_RTI) // 0x40
|
||||||
xorl _XAX, _XAX
|
|
||||||
Pop(%al)
|
Pop(%al)
|
||||||
movb SN(cpu65_flags_decode)(,_XAX,1), F_Reg
|
movb SN(cpu65_flags_decode)(,_XAX,1), F_Reg
|
||||||
orb $(B_Flag|X_Flag), F_Reg
|
orb $(B_Flag|X_Flag), F_Reg
|
||||||
@ -1965,8 +1961,7 @@ E(op_WAI_65c02)
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
continue:
|
continue:
|
||||||
xorl _XAX, _XAX
|
movzbl DebugCurrOpcode, _XAX
|
||||||
movb DebugCurrOpcode, %al
|
|
||||||
movb SN(cpu65__opcycles)(,_XAX,1), %al
|
movb SN(cpu65__opcycles)(,_XAX,1), %al
|
||||||
addb DebugCycleCount, %al
|
addb DebugCycleCount, %al
|
||||||
movb %al, DebugCycleCount
|
movb %al, DebugCycleCount
|
||||||
@ -2006,14 +2001,12 @@ ex_irq: testb $I_Flag, F_Reg // Already interrupt
|
|||||||
Push(%ah)
|
Push(%ah)
|
||||||
Push(%al)
|
Push(%al)
|
||||||
orb $X_Flag, F_Reg
|
orb $X_Flag, F_Reg
|
||||||
xorl _XAX,_XAX
|
movzbl F_Reg, _XAX
|
||||||
movb F_Reg, %al
|
|
||||||
movb SN(cpu65_flags_encode)(,_XAX,1), %al
|
movb SN(cpu65_flags_encode)(,_XAX,1), %al
|
||||||
Push(%al)
|
Push(%al)
|
||||||
orb $(B_Flag | I_Flag), F_Reg
|
orb $(B_Flag | I_Flag), F_Reg
|
||||||
//andb $~D_Flag, F_Reg // AppleWin clears Decimal bit?
|
//andb $~D_Flag, F_Reg // AppleWin clears Decimal bit?
|
||||||
andl $0xFFFF, EffectiveAddr_X// HACK FIXME : there is a bug somewhere that is occasionally corrupting EffectiveAddr_X
|
movl $0xFFFE, EffectiveAddr_X// HACK FIXME : there is a bug somewhere that is occasionally corrupting EffectiveAddr_X
|
||||||
movw $0xFFFE, EffectiveAddr // ROM interrupt vector
|
|
||||||
GetFromEA_W
|
GetFromEA_W
|
||||||
movw %ax, PC_Reg
|
movw %ax, PC_Reg
|
||||||
xorb %ah, %ah
|
xorb %ah, %ah
|
||||||
@ -2043,7 +2036,6 @@ E(cpu65_run)
|
|||||||
subl $SN(apple_ii_64k), _XAX
|
subl $SN(apple_ii_64k), _XAX
|
||||||
orl _XAX, SP_Reg_X
|
orl _XAX, SP_Reg_X
|
||||||
#endif
|
#endif
|
||||||
xorl _XAX, _XAX
|
|
||||||
jmp continue1
|
jmp continue1
|
||||||
|
|
||||||
1: movb $0, SN(emul_reinitialize)
|
1: movb $0, SN(emul_reinitialize)
|
||||||
@ -2058,11 +2050,10 @@ E(cpu65_run)
|
|||||||
|
|
||||||
exit_cpu65_run:
|
exit_cpu65_run:
|
||||||
// Save CPU state when returning from being called from C
|
// Save CPU state when returning from being called from C
|
||||||
xorl _XAX, _XAX
|
|
||||||
movw EffectiveAddr, DebugCurrEA
|
movw EffectiveAddr, DebugCurrEA
|
||||||
movw PC_Reg, SN(cpu65_current)
|
movw PC_Reg, SN(cpu65_current)
|
||||||
movb A_Reg, SN(cpu65_current)+2
|
movb A_Reg, SN(cpu65_current)+2
|
||||||
movb F_Reg, %al
|
movzbl F_Reg, _XAX
|
||||||
movb SN(cpu65_flags_encode)(,_XAX,1), %al
|
movb SN(cpu65_flags_encode)(,_XAX,1), %al
|
||||||
movb %al, SN(cpu65_current)+3
|
movb %al, SN(cpu65_current)+3
|
||||||
movb X_Reg, SN(cpu65_current)+4
|
movb X_Reg, SN(cpu65_current)+4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user