mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
don't clear stack on pop
This commit is contained in:
parent
ac999d097b
commit
c120b3df50
@ -77,7 +77,7 @@ protected:
|
||||
UINT8 m_callstack_bits; // number of program counter bits held in callstack
|
||||
UINT16 m_callstack_mask;
|
||||
UINT8 m_callstack_depth; // callstack levels: 3 on 2000/2150, 5 on 2200/2400
|
||||
UINT16 m_callstack[5+1]; // max 5
|
||||
UINT16 m_callstack[5]; // max 5
|
||||
int m_icount;
|
||||
UINT16 m_pc; // 13-bit program counter
|
||||
UINT8 m_ppr; // prepared page register (PP 1)
|
||||
|
@ -17,11 +17,8 @@ inline void amis2000_device::ram_w(UINT8 data)
|
||||
void amis2000_device::pop_callstack()
|
||||
{
|
||||
m_pc = (m_pc & ~m_callstack_mask) | (m_callstack[0] & m_callstack_mask);
|
||||
for (int i = 0; i < m_callstack_depth; i++)
|
||||
{
|
||||
for (int i = 0; i < m_callstack_depth-1; i++)
|
||||
m_callstack[i] = m_callstack[i+1];
|
||||
m_callstack[i+1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void amis2000_device::push_callstack()
|
||||
|
@ -133,7 +133,7 @@ protected:
|
||||
int m_datamask;
|
||||
int m_family; // MCU family (43/44/45)
|
||||
int m_stack_levels; // number of callstack levels
|
||||
UINT16 m_stack[3+1]; // max 3
|
||||
UINT16 m_stack[3]; // max 3
|
||||
UINT8 m_port_out[0x10]; // last value written to output port
|
||||
UINT8 m_op;
|
||||
UINT8 m_prev_op; // previous opcode
|
||||
|
@ -17,11 +17,8 @@ inline void ucom4_cpu_device::ram_w(UINT8 data)
|
||||
void ucom4_cpu_device::pop_stack()
|
||||
{
|
||||
m_pc = m_stack[0] & m_prgmask;
|
||||
for (int i = 0; i < m_stack_levels; i++)
|
||||
{
|
||||
for (int i = 0; i < m_stack_levels-1; i++)
|
||||
m_stack[i] = m_stack[i+1];
|
||||
m_stack[i+1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ucom4_cpu_device::push_stack()
|
||||
|
Loading…
Reference in New Issue
Block a user