Implement changing-size opcodes

This commit is contained in:
Lauri Kasanen
2022-10-12 14:45:10 +03:00
parent e8ee8435e9
commit 1294c1c253
5 changed files with 47 additions and 13 deletions

View File

@@ -231,6 +231,28 @@ void OH_Immediate (const OpcDesc* D)
void OH_Immediate65816M (const OpcDesc* D)
{
if (GetAttr (PC) & atMem16) {
OneLine (D, "#$%04X", GetCodeWord (PC+1));
} else {
OneLine (D, "#$%02X", GetCodeByte (PC+1));
}
}
void OH_Immediate65816X (const OpcDesc* D)
{
if (GetAttr (PC) & atIdx16) {
OneLine (D, "#$%04X", GetCodeWord (PC+1));
} else {
OneLine (D, "#$%02X", GetCodeByte (PC+1));
}
}
void OH_ImmediateWord (const OpcDesc* D)
{
OneLine (D, "#$%04X", GetCodeWord (PC+1));