// RTI - Return from Interrupt
Return from Interrupt
// RTI - Return from Interrupt
func (cpu *CPU) op_rti(info *stepInfo) {
	if cpu.E == 1 {
		cpu.SetFlags(cpu.pull())
		cpu.PC = cpu.pull16()
		cpu.Cycles -= 1 
	} else {
		cpu.SetFlags(cpu.pull())
		cpu.PC = cpu.pull16()
		cpu.RK = cpu.pull()
	}
	cpu.I = 0
	cpu.stepPC = 0
}
func ( cpu * CPU ) op_rti ( info * stepInfo ) { if cpu . E == 1 { cpu . SetFlags ( cpu . pull ( ) ) cpu . PC = cpu . pull16 ( ) cpu . Cycles -= 1 } else { cpu . SetFlags ( cpu . pull ( ) ) cpu . PC = cpu . pull16 ( ) cpu . RK = cpu . pull ( ) } cpu . I = 0 cpu . stepPC = 0 }
Return from Interrupt
Return from Interrupt
//mylog.Logger.Log("cpu: rti") //cpu.SetFlags(cpu.pull()&0xEF | 0x20) // 6 when E=1