mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
[patinho] Implement XOR, NAND and SOMI instructions and fix their disasm textual representation
This commit is contained in:
parent
9b032d452c
commit
1e9ed2e3c5
@ -121,6 +121,25 @@ void patinho_feio_cpu_device::execute_instruction()
|
||||
m_scheduled_IND_bit_reset = true;
|
||||
|
||||
switch (opcode){
|
||||
case 0xD2:
|
||||
//XOR: Computes the bitwise XOR of an immediate into the accumulator
|
||||
ACC ^= READ_BYTE_PATINHO(PC);
|
||||
INCREMENT_PC_4K;
|
||||
//TODO: update T and V flags
|
||||
return;
|
||||
case 0xD4:
|
||||
//NAND: Computes the bitwise XOR of an immediate into the accumulator
|
||||
ACC = ~(ACC & READ_BYTE_PATINHO(PC));
|
||||
INCREMENT_PC_4K;
|
||||
//TODO: update T and V flags
|
||||
return;
|
||||
case 0xD8:
|
||||
//SOMI="Soma Imediato":
|
||||
// Add an immediate into the accumulator
|
||||
ACC += READ_BYTE_PATINHO(PC);
|
||||
INCREMENT_PC_4K;
|
||||
//TODO: update T and V flags
|
||||
return;
|
||||
case 0xDA:
|
||||
//CARI="Carrega Imediato":
|
||||
// Load an immediate into the accumulator
|
||||
|
@ -128,10 +128,10 @@ CPU_DISASSEMBLE( patinho_feio )
|
||||
case 0x80: sprintf (buffer, "DDS /%01X", value); return 2; //DDS = "Deslocamento para a direita com duplicacao de sinal": Shift right with sign duplication
|
||||
}
|
||||
break;
|
||||
case 0x02: sprintf (buffer, "XOR /%02X", value); return 2; //Logical XOR
|
||||
case 0x04: sprintf (buffer, "NAND /%02X", value); return 2; //Logical NAND
|
||||
case 0x08: sprintf (buffer, "SOMI /%02X", value); return 2; //SOMI = "Soma imediata": Add immediate value into accumulator
|
||||
case 0x0A: sprintf (buffer, "CARI /%02X", value); return 2; //CARI = "Carrega imediato": Loads an immediate value into the accumulator
|
||||
case 0x02: sprintf (buffer, "XOR /%02X", oprom[1]); return 2; //Logical XOR
|
||||
case 0x04: sprintf (buffer, "NAND /%02X", oprom[1]); return 2; //Logical NAND
|
||||
case 0x08: sprintf (buffer, "SOMI /%02X", oprom[1]); return 2; //SOMI = "Soma imediata": Add immediate value into accumulator
|
||||
case 0x0A: sprintf (buffer, "CARI /%02X", oprom[1]); return 2; //CARI = "Carrega imediato": Loads an immediate value into the accumulator
|
||||
}
|
||||
break;
|
||||
case 0xE0:
|
||||
|
Loading…
Reference in New Issue
Block a user