mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +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);
|
||||
WRITE_BYTE_PATINHO(addr, ACC);
|
||||
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:
|
||||
//PUG = "Pula e guarda": Jump and store.
|
||||
// It stores the return address to addr and addr+1
|
||||
|
Loading…
Reference in New Issue
Block a user