Example #1
0
void mul()
{
  uint16_t r = (uint16_t)ra * (uint16_t)rb;

  SET_Z16(r);
  ccc = btst(rb, 0x80);
  SETRD(r);
}
Example #2
0
/* $04 LSRD inherent -0*-* */
INLINE void lsrd (void)
{
	UINT16 t;
	CLR_NZVC; t = D; CC|=(t&0x0001);
	t>>=1; SET_Z16(t);
	if (NXORC) SEV;
	D=t;
}
Example #3
0
/* $bc CMPX extended -***- */
INLINE void cmpx_ex( void )
{
#if 0
	UINT32 r,d;
	PAIR b;
	EXTWORD(b);
	d = X;
	r = d - b.d;
	CLR_NZV;
	SET_NZ16(r); SET_V16(d,b.d,r);
#else
	PAIR r,d,b;
	EXTWORD(b);
	d.d = X;
	r.w.l = d.b.h - b.b.h;
	CLR_NZV;
	SET_N8(r.b.l);
	SET_V8(d.b.h, b.b.h, r.w.l);
	r.d = d.d - b.d;
	SET_Z16(r.d);
#endif
}
Example #4
0
void leay()
{
  ry = GET_EAW;
  SET_Z16(ry);
}
Example #5
0
void leax()
{
  rx = GET_EAW;
  SET_Z16(rx);
}
Example #6
0
/* $09 DEX inherent --*-- */
INLINE void dex (void)
{
	--X;
	CLR_Z; SET_Z16(X);
}
Example #7
0
/* $08 INX inherent --*-- */
INLINE void inx (void)
{
	++X;
	CLR_Z; SET_Z16(X);
}
Example #8
0
/* $04 LSRD inherent -0*-* */
INLINE void lsrd (void)
{
	UINT16 t;
	CLR_NZC; t = D; CC|=(t&0x0001);
	t>>=1; SET_Z16(t); D=t;
}