uint32_t z8002_device::get_raw_addr_operand(int opnum) { int i; for (i = 0; i < opnum; i++) { assert (m_op_valid & (1 << i)); } if (! (m_op_valid & (1 << opnum))) { uint32_t seg = m_program->read_word(m_pc); m_pc += 2; if (segmented_mode()) { if (seg & 0x8000) { m_op[opnum] = (seg << 16) | m_program->read_word(m_pc); m_pc += 2; } else m_op[opnum] = (seg << 16) | (seg & 0xff); } else m_op[opnum] = seg; m_op_valid |= (1 << opnum); } return m_op[opnum]; }
INLINE UINT32 get_raw_addr_operand (z8000_state *cpustate, int opnum) { int i; assert (cpustate->device->type() == Z8001 || cpustate->device->type() == Z8002); for (i = 0; i < opnum; i++) assert (cpustate->op_valid & (1 << i)); if (! (cpustate->op_valid & (1 << opnum))) { UINT32 seg = cpustate->program->read_word(cpustate->pc); cpustate->pc += 2; if (segmented_mode(cpustate)) { if (seg & 0x8000) { cpustate->op[opnum] = (seg << 16) | cpustate->program->read_word(cpustate->pc); cpustate->pc += 2; } else cpustate->op[opnum] = (seg << 16) | (seg & 0xff); } else cpustate->op[opnum] = seg; cpustate->op_valid |= (1 << opnum); } return cpustate->op[opnum]; }