mirror of
https://github.com/holub/mame
synced 2025-10-07 09:25:34 +03:00
[patinho] Implement CAR and CARX instructions
This commit is contained in:
parent
3e7b0c6fa9
commit
6d06383a6a
@ -380,6 +380,20 @@ void patinho_feio_cpu_device::execute_instruction()
|
|||||||
addr = compute_effective_address(m_idx + value);
|
addr = compute_effective_address(m_idx + value);
|
||||||
WRITE_BYTE_PATINHO(addr, ACC);
|
WRITE_BYTE_PATINHO(addr, ACC);
|
||||||
return;
|
return;
|
||||||
|
case 0x40:
|
||||||
|
//CAR = "Carrega": Load a value from a given memory position into the accumulator
|
||||||
|
addr = compute_effective_address((opcode & 0x0F) << 8 | READ_BYTE_PATINHO(PC));
|
||||||
|
INCREMENT_PC_4K;
|
||||||
|
ACC = READ_BYTE_PATINHO(addr);
|
||||||
|
return;
|
||||||
|
case 0x50:
|
||||||
|
//CARX = "Carga indexada": Load a value from a given indexed memory position into the accumulator
|
||||||
|
value = (opcode & 0x0F) << 8 | READ_BYTE_PATINHO(PC);
|
||||||
|
INCREMENT_PC_4K;
|
||||||
|
m_idx = READ_INDEX_REG();
|
||||||
|
addr = compute_effective_address(m_idx + value);
|
||||||
|
ACC = READ_BYTE_PATINHO(addr);
|
||||||
|
return;
|
||||||
case 0xF0:
|
case 0xF0:
|
||||||
//PUG = "Pula e guarda": Jump and store.
|
//PUG = "Pula e guarda": Jump and store.
|
||||||
// It stores the return address to addr and addr+1
|
// It stores the return address to addr and addr+1
|
||||||
|
Loading…
Reference in New Issue
Block a user