protected int EoriWord(int opcode) { int s = cpu.FetchPCWord(); IOperand dst = cpu.ResolveDstEA((opcode >> 3) & 0x07, opcode & 0x07, Size.Word); int d = dst.GetWord(); int r = s ^ d; if (dst.IsSR()) { if (cpu.IsSupervisorMode()) { cpu.SetSR(r); } else { cpu.RaiseSRException(); return(34); } } else { dst.SetWord(r); cpu.CalcFlags(InstructionType.EOR, s, d, r, Size.Word); } return(dst.IsRegisterMode() ? 8 : 12 + dst.GetTiming()); }
protected int EoriByte(int opcode) { int s = cpu.FetchPCWord() & 0x00ff; IOperand dst = cpu.ResolveDstEA((opcode >> 3) & 0x07, opcode & 0x07, Size.Byte); int d = dst.GetByte(); int r = s ^ d; dst.SetByte(r); if (!dst.IsSR()) { cpu.CalcFlags(InstructionType.EOR, s, d, r, Size.Byte); } return(dst.IsRegisterMode() ? 8 : 12 + dst.GetTiming()); }
protected int OriByte(int opcode) { int s = CpuUtils.SignExtendByte(cpu.FetchPCWord()); IOperand dst = cpu.ResolveDstEA((opcode >> 3) & 0x07, opcode & 0x07, Size.Byte); int d = dst.GetByteSigned(); int r = s | d; dst.SetByte(r); if (!dst.IsSR()) { cpu.CalcFlags(InstructionType.OR, s, d, r, Size.Byte); } return(dst.IsRegisterMode() ? 8 : 12 + dst.GetTiming()); }