mirror of
https://github.com/ksherlock/mpw.git
synced 2024-10-11 11:23:47 +00:00
12210 lines
309 KiB
C
12210 lines
309 KiB
C
#pragma once
|
|
|
|
static void ADD_D000(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[0]);
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void ADD_D010(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA02(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D018(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA03(opc_data[0],1));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D020(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA04(opc_data[0],1));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(10);
|
|
}
|
|
static void ADD_D028(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA05(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D030(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA06(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D038(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA70());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D039(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA71());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D03A(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA72());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D03B(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA73());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D03C(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D040(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[0]);
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void ADD_D048(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetARegWord(opc_data[0]);
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void ADD_D050(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA02(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D058(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA03(opc_data[0],2));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D060(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA04(opc_data[0],2));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(10);
|
|
}
|
|
static void ADD_D068(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA05(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D070(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA06(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D078(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA70());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D079(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA71());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D07A(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA72());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D07B(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA73());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D07C(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D080(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[0]);
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D088(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetAReg(opc_data[0]);
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADD_D090(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA02(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D098(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA03(opc_data[0],4));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D0A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA04(opc_data[0],4));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D0A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA05(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADD_D0B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA06(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADD_D0B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA70());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADD_D0B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA71());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ADD_D0BA(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA72());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADD_D0BB(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA73());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADD_D0BC(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D110(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D118(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D120(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D128(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D130(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADD_D138(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D139(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADD_D150(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D158(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADD_D160(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADD_D168(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D170(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADD_D178(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADD_D179(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADD_D190(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADD_D198(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADD_D1A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ADD_D1A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ADD_D1B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(26);
|
|
}
|
|
static void ADD_D1B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ADD_D1B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ADDA_D0C0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)cpuGetDRegWord(opc_data[0]);
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDA_D0C8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)cpuGetARegWord(opc_data[0]);
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDA_D0D0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA02(opc_data[0]));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDA_D0D8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA03(opc_data[0],2));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDA_D0E0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA04(opc_data[0],2));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADDA_D0E8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA05(opc_data[0]));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDA_D0F0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA06(opc_data[0]));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDA_D0F8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA70());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDA_D0F9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA71());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDA_D0FA(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA72());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDA_D0FB(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)memoryReadWord(cpuEA73());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDA_D0FC(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = (uint32_t)(int32_t)(int16_t)cpuGetNextWord();
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDA_D1C0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[0]);
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDA_D1C8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetAReg(opc_data[0]);
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDA_D1D0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA02(opc_data[0]));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADDA_D1D8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA03(opc_data[0],4));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADDA_D1E0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA04(opc_data[0],4));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDA_D1E8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA05(opc_data[0]));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDA_D1F0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA06(opc_data[0]));
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDA_D1F8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA70());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDA_D1F9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA71());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ADDA_D1FA(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA72());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDA_D1FB(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA73());
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDA_D1FC(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetAReg(opc_data[1]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDI_0600(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint8_t dst = cpuGetDRegByte(opc_data[0]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDI_0610(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDI_0618(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDI_0620(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDI_0628(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDI_0630(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ADDI_0638(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDI_0639(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ADDI_0640(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint16_t dst = cpuGetDRegWord(opc_data[0]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDI_0650(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDI_0658(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDI_0660(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDI_0668(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDI_0670(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ADDI_0678(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDI_0679(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ADDI_0680(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetDReg(opc_data[0]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDI_0690(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ADDI_0698(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ADDI_06A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(30);
|
|
}
|
|
static void ADDI_06A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(32);
|
|
}
|
|
static void ADDI_06B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(34);
|
|
}
|
|
static void ADDI_06B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(32);
|
|
}
|
|
static void ADDI_06B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(36);
|
|
}
|
|
static void ADDQ_5000(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint8_t dst = cpuGetDRegByte(opc_data[0]);
|
|
dst = cpuAddB(dst, src);
|
|
cpuSetDRegByte(opc_data[0], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void ADDQ_5010(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDQ_5018(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDQ_5020(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADDQ_5028(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDQ_5030(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDQ_5038(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDQ_5039(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)opc_data[1];
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAddB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDQ_5040(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint16_t dst = cpuGetDRegWord(opc_data[0]);
|
|
dst = cpuAddW(dst, src);
|
|
cpuSetDRegWord(opc_data[0], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void ADDQ_5050(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDQ_5058(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void ADDQ_5060(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ADDQ_5068(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDQ_5070(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ADDQ_5078(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ADDQ_5079(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = (uint16_t)opc_data[1];
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAddW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDQ_5080(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dst = cpuGetDReg(opc_data[0]);
|
|
dst = cpuAddL(dst, src);
|
|
cpuSetDReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDQ_5090(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDQ_5098(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ADDQ_50A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ADDQ_50A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ADDQ_50B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(26);
|
|
}
|
|
static void ADDQ_50B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ADDQ_50B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAddL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ADDQ_5048(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dst = cpuGetAReg(opc_data[0]);
|
|
dst = cpuAddaW(dst, src);
|
|
cpuSetAReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ADDQ_5088(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = opc_data[1];
|
|
uint32_t dst = cpuGetAReg(opc_data[0]);
|
|
dst = cpuAddaL(dst, src);
|
|
cpuSetAReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C000(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[0]);
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void AND_C010(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA02(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C018(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA03(opc_data[0],1));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C020(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA04(opc_data[0],1));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(10);
|
|
}
|
|
static void AND_C028(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA05(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C030(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA06(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C038(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA70());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C039(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA71());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C03A(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA72());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C03B(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA73());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C03C(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C040(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[0]);
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void AND_C050(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA02(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C058(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA03(opc_data[0],2));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C060(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA04(opc_data[0],2));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(10);
|
|
}
|
|
static void AND_C068(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA05(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C070(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA06(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C078(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA70());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C079(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA71());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C07A(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA72());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C07B(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA73());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C07C(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C080(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[0]);
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void AND_C090(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA02(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C098(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA03(opc_data[0],4));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C0A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA04(opc_data[0],4));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C0A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA05(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void AND_C0B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA06(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void AND_C0B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA70());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void AND_C0B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA71());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void AND_C0BA(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA72());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void AND_C0BB(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA73());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void AND_C0BC(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C110(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C118(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C120(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C128(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C130(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void AND_C138(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C139(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void AND_C150(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C158(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void AND_C160(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void AND_C168(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C170(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void AND_C178(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void AND_C179(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void AND_C190(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void AND_C198(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void AND_C1A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void AND_C1A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void AND_C1B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(26);
|
|
}
|
|
static void AND_C1B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void AND_C1B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ANDI_0200(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint8_t dst = cpuGetDRegByte(opc_data[0]);
|
|
dst = cpuAndB(dst, src);
|
|
cpuSetDRegByte(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ANDI_0210(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ANDI_0218(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ANDI_0220(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ANDI_0228(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ANDI_0230(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ANDI_0238(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ANDI_0239(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuAndB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ANDI_0240(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint16_t dst = cpuGetDRegWord(opc_data[0]);
|
|
dst = cpuAndW(dst, src);
|
|
cpuSetDRegWord(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void ANDI_0250(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ANDI_0258(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void ANDI_0260(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void ANDI_0268(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ANDI_0270(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void ANDI_0278(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void ANDI_0279(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuAndW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void ANDI_0280(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetDReg(opc_data[0]);
|
|
dst = cpuAndL(dst, src);
|
|
cpuSetDReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void ANDI_0290(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ANDI_0298(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void ANDI_02A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(30);
|
|
}
|
|
static void ANDI_02A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(32);
|
|
}
|
|
static void ANDI_02B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(34);
|
|
}
|
|
static void ANDI_02B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(32);
|
|
}
|
|
static void ANDI_02B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuAndL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(36);
|
|
}
|
|
static void ANDI_023C(uint32_t*opc_data)
|
|
{
|
|
cpuAndCcrB();
|
|
}
|
|
static void ANDI_027C(uint32_t*opc_data)
|
|
{
|
|
cpuAndSrW();
|
|
}
|
|
static void EOR_B100(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint8_t dst = cpuGetDRegByte(opc_data[0]);
|
|
dst = cpuEorB(dst, src);
|
|
cpuSetDRegByte(opc_data[0], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void EOR_B110(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void EOR_B118(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void EOR_B120(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void EOR_B128(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EOR_B130(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void EOR_B138(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EOR_B139(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EOR_B140(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint16_t dst = cpuGetDRegWord(opc_data[0]);
|
|
dst = cpuEorW(dst, src);
|
|
cpuSetDRegWord(opc_data[0], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void EOR_B150(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void EOR_B158(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void EOR_B160(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void EOR_B168(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EOR_B170(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void EOR_B178(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EOR_B179(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EOR_B180(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dst = cpuGetDReg(opc_data[0]);
|
|
dst = cpuEorL(dst, src);
|
|
cpuSetDReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void EOR_B190(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EOR_B198(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EOR_B1A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void EOR_B1A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void EOR_B1B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(26);
|
|
}
|
|
static void EOR_B1B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void EOR_B1B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[1]);
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void EORI_0A00(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint8_t dst = cpuGetDRegByte(opc_data[0]);
|
|
dst = cpuEorB(dst, src);
|
|
cpuSetDRegByte(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void EORI_0A10(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EORI_0A18(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EORI_0A20(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void EORI_0A28(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EORI_0A30(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void EORI_0A38(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA70();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EORI_0A39(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint32_t dstea = cpuEA71();
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuEorB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void EORI_0A40(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint16_t dst = cpuGetDRegWord(opc_data[0]);
|
|
dst = cpuEorW(dst, src);
|
|
cpuSetDRegWord(opc_data[0], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void EORI_0A50(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EORI_0A58(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EORI_0A60(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 2);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void EORI_0A68(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EORI_0A70(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void EORI_0A78(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA70();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void EORI_0A79(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint32_t dstea = cpuEA71();
|
|
uint16_t dst = memoryReadWord(dstea);
|
|
dst = cpuEorW(dst, src);
|
|
memoryWriteWord(dst, dstea);
|
|
cpuSetInstructionTime(24);
|
|
}
|
|
static void EORI_0A80(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetDReg(opc_data[0]);
|
|
dst = cpuEorL(dst, src);
|
|
cpuSetDReg(opc_data[0], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void EORI_0A90(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void EORI_0A98(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA03(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(28);
|
|
}
|
|
static void EORI_0AA0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA04(opc_data[0], 4);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(30);
|
|
}
|
|
static void EORI_0AA8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA05(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(32);
|
|
}
|
|
static void EORI_0AB0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA06(opc_data[0]);
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(34);
|
|
}
|
|
static void EORI_0AB8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA70();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(32);
|
|
}
|
|
static void EORI_0AB9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dstea = cpuEA71();
|
|
uint32_t dst = memoryReadLong(dstea);
|
|
dst = cpuEorL(dst, src);
|
|
memoryWriteLong(dst, dstea);
|
|
cpuSetInstructionTime(36);
|
|
}
|
|
static void EORI_0A3C(uint32_t*opc_data)
|
|
{
|
|
cpuEorCcrB();
|
|
}
|
|
static void EORI_0A7C(uint32_t*opc_data)
|
|
{
|
|
cpuEorSrW();
|
|
}
|
|
static void OR_8000(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[0]);
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void OR_8010(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA02(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8018(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA03(opc_data[0],1));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8020(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA04(opc_data[0],1));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(10);
|
|
}
|
|
static void OR_8028(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA05(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_8030(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA06(opc_data[0]));
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void OR_8038(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA70());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_8039(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA71());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void OR_803A(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA72());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_803B(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = memoryReadByte(cpuEA73());
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void OR_803C(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = (uint8_t)cpuGetNextWord();
|
|
uint8_t dst = cpuGetDRegByte(opc_data[1]);
|
|
dst = cpuOrB(dst, src);
|
|
cpuSetDRegByte(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8040(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetDRegWord(opc_data[0]);
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(4);
|
|
}
|
|
static void OR_8050(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA02(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8058(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA03(opc_data[0],2));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8060(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA04(opc_data[0],2));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(10);
|
|
}
|
|
static void OR_8068(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA05(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_8070(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA06(opc_data[0]));
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void OR_8078(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA70());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_8079(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA71());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void OR_807A(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA72());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_807B(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = memoryReadWord(cpuEA73());
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void OR_807C(uint32_t*opc_data)
|
|
{
|
|
uint16_t src = cpuGetNextWord();
|
|
uint16_t dst = cpuGetDRegWord(opc_data[1]);
|
|
dst = cpuOrW(dst, src);
|
|
cpuSetDRegWord(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8080(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetDReg(opc_data[0]);
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(8);
|
|
}
|
|
static void OR_8090(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA02(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void OR_8098(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA03(opc_data[0],4));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(14);
|
|
}
|
|
static void OR_80A0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA04(opc_data[0],4));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void OR_80A8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA05(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void OR_80B0(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA06(opc_data[0]));
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void OR_80B8(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA70());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void OR_80B9(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA71());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(22);
|
|
}
|
|
static void OR_80BA(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA72());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(18);
|
|
}
|
|
static void OR_80BB(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = memoryReadLong(cpuEA73());
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(20);
|
|
}
|
|
static void OR_80BC(uint32_t*opc_data)
|
|
{
|
|
uint32_t src = cpuGetNextLong();
|
|
uint32_t dst = cpuGetDReg(opc_data[1]);
|
|
dst = cpuOrL(dst, src);
|
|
cpuSetDReg(opc_data[1], dst);
|
|
cpuSetInstructionTime(16);
|
|
}
|
|
static void OR_8110(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA02(opc_data[0]);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuOrB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_8118(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA03(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuOrB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|
cpuSetInstructionTime(12);
|
|
}
|
|
static void OR_8120(uint32_t*opc_data)
|
|
{
|
|
uint8_t src = cpuGetDRegByte(opc_data[1]);
|
|
uint32_t dstea = cpuEA04(opc_data[0], 1);
|
|
uint8_t dst = memoryReadByte(dstea);
|
|
dst = cpuOrB(dst, src);
|
|
memoryWriteByte(dst, dstea);
|
|