void WM16(uint32_t Addr, ref PAIR p) { WM(Addr, p.b.h); WM((Addr + 1) & 0xffff, p.b.l); }
void EXTWORD(ref PAIR w) { EXTENDED(); w.d = RM16(EAD); }
void IDXWORD(ref PAIR w) { INDEXED(); w.d = RM16(EAD); }
void PULLWORD(ref PAIR w) { S++; w.d = RM(SD) << 8; S++; w.d |= RM(SD); }
void DIRWORD(ref PAIR w) { DIRECT(); w.d = RM16(EAD); }
void IMMWORD(ref PAIR w) { w.d = (M_RDOP_ARG(PCD) << 8) | M_RDOP_ARG((PCD + 1) & 0xffff); PC += 2; }
void PUSHWORD(PAIR w) { WM(SD, w.b.l); --S; WM(SD, w.b.h); --S; }
protected void pushword(bool big, PAIR p) //template<bool big> inline void m6805_base_device::pushword(PAIR const &p) { pushbyte(big, p.b.l); pushbyte(big, p.b.h); }
protected void rm16(bool big, u32 addr, ref PAIR p) //template<bool big> inline void m6805_base_device::rm16(u32 addr, PAIR &p) { clear_pair(ref p); p.b.h = (u8)rm(big, addr); p.b.l = (u8)rm(big, addr + 1); }
// pre-clear a PAIR union; clearing h2 and h3 only might be faster? void clear_pair(ref PAIR p) { p.d = 0; }
} //template <bool big, typename T> inline void m6805_base_device::immbyte(T &b) { b = rdop_arg<big>(PC++); } void immword(bool big, ref PAIR w) { w.d = 0; immbyte(big, out w.b.h); immbyte(big, out w.b.l); } //template<bool big> inline void m6805_base_device::immword(PAIR &w) { w.d = 0; immbyte<big>(w.b.h); immbyte<big>(w.b.l); }
void pullword(bool big, ref PAIR p) //template<bool big> inline void m6805_base_device::pullword(PAIR &p) { clear_pair(ref p); pullbyte(big, out p.b.h); pullbyte(big, out p.b.l); }