Go to the source code of this file.
Value:{ \
unsigned val = value; \
unsigned res = z80.AF.b.h + val + (z80.AF.b.l & Cflag); \
z80.AF.b.l = SZ[res & 0xff] | ((res >> 8) & Cflag) | ((z80.AF.b.h ^ res ^ val) & Hflag) | \
(((val ^ z80.AF.b.h ^ 0x80) & (val ^ res) & 0x80) >> 5); \
z80.AF.b.h = res; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tDWORD res = z80.HL.d + z80.reg.d + (z80.AF.b.l & Cflag); \
z80.AF.b.l = (((z80.HL.d ^ res ^ z80.reg.d) >> 8) & Hflag) | \
((res >> 16) & Cflag) | \
((res >> 8) & (Sflag | Xflags)) | \
((res & 0xffff) ? 0 : Zflag) | \
(((z80.reg.d ^ z80.HL.d ^ 0x8000) & (z80.reg.d ^ res) & 0x8000) >> 13); \
}
uint16_t tUWORD
Definition: types.h:80
Referenced by Z80::z80_pfx_ed().
Value:{ \
unsigned val = value; \
unsigned res = z80.AF.b.h + val; \
z80.AF.b.l = SZ[(
tUBYTE)res] | ((res >> 8) & Cflag) | ((z80.AF.b.h ^ res ^ val) & Hflag) | \
(((val ^ z80.AF.b.h ^ 0x80) & (val ^ res) & 0x80) >> 5); \
}
uint8_t tUBYTE
Definition: types.h:74
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
#define ADD16 |
( |
|
dest, |
|
|
|
src |
|
) |
| |
Value:{ \
tDWORD res = z80.dest.d + z80.src.d; \
z80.AF.b.l = (z80.AF.b.l & (Sflag | Zflag | Vflag)) | (((z80.dest.d ^ res ^ z80.src.d) >> 8) & Hflag) | \
((res >> 16) & Cflag) | ((res >> 8) & Xflags); \
}
uint16_t tUWORD
Definition: types.h:80
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
#define BIT |
( |
|
bit, |
|
|
|
reg |
|
) |
| z80.AF.b.l = (z80.AF.b.l & Cflag) | Hflag | SZ_BIT[reg & (1 << bit)] |
Value:{ \
tREGPAIR dest; \
dest.b.l = read_mem(z80.PC.w.l++); \
dest.b.h = read_mem(z80.PC.w.l++); \
write_mem(--z80.SP.w.l, z80.PC.b.h); \
write_mem(--z80.SP.w.l, z80.PC.b.l); \
z80.PC.w.l = dest.w.l; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
unsigned val = value; \
unsigned res = z80.AF.b.h - val; \
z80.AF.b.l = (SZ[res & 0xff] & (Sflag | Zflag)) | (val & Xflags) | ((res >> 8) & Cflag) | Nflag | ((z80.AF.b.h ^ res ^ val) & Hflag) | \
((((val ^ z80.AF.b.h) & (z80.AF.b.h ^ res)) >> 5) & Vflag); \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tUBYTE val = read_mem(z80.HL.w.l); \
tUBYTE res = z80.AF.b.h - val; \
z80.HL.w.l--; \
z80.BC.w.l--; \
z80.AF.b.l = (z80.AF.b.l & Cflag) | (SZ[res] & ~Xflags) | ((z80.AF.b.h ^ val ^ res) & Hflag) | Nflag; \
if(z80.AF.b.l & Hflag) res -= 1; \
if(res & 0x02) z80.AF.
b.l |= 0x20; \
if(res & 0x08) z80.AF.
b.l |= 0x08; \
if(z80.BC.w.l) z80.AF.
b.l |= Vflag; \
}
GLuint GLfloat GLenum cap GLsizei GLuint *textures GLenum GLint *params void GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLfloat GLfloat y GLubyte GLubyte GLubyte b
Definition: glfunclist.h:27
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.w.l && !(z80.AF.b.l & Zflag)) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
iWSAdjust++; \
}
#define CPD
Definition: macros.h:382
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE val = read_mem(z80.HL.w.l); \
tUBYTE res = z80.AF.b.h - val; \
z80.HL.w.l++; \
z80.BC.w.l--; \
z80.AF.b.l = (z80.AF.b.l & Cflag) | (SZ[res] & ~Xflags) | ((z80.AF.b.h ^ val ^ res) & Hflag) | Nflag; \
if(z80.AF.b.l & Hflag) res -= 1; \
if(res & 0x02) z80.AF.
b.l |= 0x20; \
if(res & 0x08) z80.AF.
b.l |= 0x08; \
if(z80.BC.w.l) z80.AF.
b.l |= Vflag; \
}
GLuint GLfloat GLenum cap GLsizei GLuint *textures GLenum GLint *params void GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLfloat GLfloat y GLubyte GLubyte GLubyte b
Definition: glfunclist.h:27
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.w.l && !(z80.AF.b.l & Zflag)) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
iWSAdjust++; \
}
#define CPI
Definition: macros.h:404
Referenced by Z80::z80_pfx_ed().
Value:{ \
int idx = z80.AF.b.h; \
if(z80.AF.b.l & Cflag) \
idx |= 0x100; \
if(z80.AF.b.l & Hflag) \
idx |= 0x200; \
if(z80.AF.b.l & Nflag) \
idx |= 0x400; \
z80.AF.w.l = DAATable[idx]; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tREGPAIR temp; \
temp.b.l = read_mem(z80.SP.w.l++); \
temp.b.h = read_mem(z80.SP.w.l); \
write_mem(z80.SP.w.l--, z80.reg.b.h); \
write_mem(z80.SP.w.l, z80.reg.b.l); \
z80.reg.w.l = temp.w.l; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tREGPAIR temp; \
temp = z80.BCx; \
z80.BCx = z80.BC; \
z80.BC = temp; \
temp = z80.DEx; \
z80.DEx = z80.DE; \
z80.DE = temp; \
temp = z80.HLx; \
z80.HLx = z80.HL; \
z80.HL = temp; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
z80.BC.b.h--; \
write_mem(z80.HL.w.l, io); \
z80.HL.w.l--; \
z80.AF.b.l = SZ[z80.BC.b.h]; \
if(io & Sflag) z80.AF.b.l |= Nflag; \
if((((z80.BC.b.l - 1) & 0xff) + io) & 0x100) z80.AF.b.l |= Hflag | Cflag; \
if((drep_tmp1[z80.BC.b.l & 3][io & 3] ^ breg_tmp2[z80.BC.b.h] ^ (z80.BC.b.l >> 2) ^ (io >> 2)) & 1) \
z80.AF.b.l |= Pflag; \
}
#define z80_IN_handler
Definition: z80.h:36
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.b.h) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
}
#define IND
Definition: macros.h:426
Referenced by Z80::z80_pfx_ed().
Value:{ \
z80.BC.b.h--; \
write_mem(z80.HL.w.l, io); \
z80.HL.w.l++; \
z80.AF.b.l = SZ[z80.BC.b.h]; \
if(io & Sflag) z80.AF.b.l |= Nflag; \
if((((z80.BC.b.l + 1) & 0xff) + io) & 0x100) z80.AF.b.l |= Hflag | Cflag; \
if((irep_tmp1[z80.BC.b.l & 3][io & 3] ^ breg_tmp2[z80.BC.b.h] ^ (z80.BC.b.l >> 2) ^ (io >> 2)) & 1) \
z80.AF.b.l |= Pflag; \
}
#define z80_IN_handler
Definition: z80.h:36
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.b.h) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
}
#define INI
Definition: macros.h:447
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE io = read_mem(z80.HL.w.l); \
write_mem(z80.DE.w.l, io); \
z80.AF.b.l &= Sflag | Zflag | Cflag; \
if((z80.AF.b.h + io) & 0x02) z80.AF.b.l |= 0x20; \
if((z80.AF.b.h + io) & 0x08) z80.AF.b.l |= 0x08; \
z80.HL.w.l--; \
z80.DE.w.l--; \
z80.BC.w.l--; \
if(z80.BC.w.l) z80.AF.
b.l |= Vflag; \
}
GLuint GLfloat GLenum cap GLsizei GLuint *textures GLenum GLint *params void GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLfloat GLfloat y GLubyte GLubyte GLubyte b
Definition: glfunclist.h:27
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.w.l) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
}
#define LDD
Definition: macros.h:468
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE io = read_mem(z80.HL.w.l); \
write_mem(z80.DE.w.l, io); \
z80.AF.b.l &= Sflag | Zflag | Cflag; \
if((z80.AF.b.h + io) & 0x02) z80.AF.b.l |= 0x20; \
if((z80.AF.b.h + io) & 0x08) z80.AF.b.l |= 0x08; \
z80.HL.w.l++; \
z80.DE.w.l++; \
z80.BC.w.l--; \
if(z80.BC.w.l) z80.AF.
b.l |= Vflag; \
}
GLuint GLfloat GLenum cap GLsizei GLuint *textures GLenum GLint *params void GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid *pixels GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum const GLvoid *pixels GLfloat GLfloat y GLubyte GLubyte GLubyte b
Definition: glfunclist.h:27
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.w.l) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
}
#define LDI
Definition: macros.h:489
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE value = z80.AF.b.h; \
z80.AF.b.h = 0; \
SUB(value); \
}
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.b.h) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
}
#define OUTD
Definition: macros.h:517
Referenced by Z80::z80_pfx_ed().
Value: if(z80.BC.b.h) \
{ \
iCycleCount += cc_ex[bOpCode]; \
z80.PC.w.l -= 2; \
}
#define OUTI
Definition: macros.h:538
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE io = read_mem(z80.HL.w.l); \
z80.BC.b.h--; \
z80_OUT_handler(z80.BC, io); \
z80.HL.w.l--; \
z80.AF.b.l = SZ[z80.BC.b.h]; \
if(io & Sflag) z80.AF.b.l |= Nflag; \
if((((z80.BC.b.l - 1) & 0xff) + io) & 0x100) z80.AF.b.l |= Hflag | Cflag; \
if((drep_tmp1[z80.BC.b.l & 3][io & 3] ^ breg_tmp2[z80.BC.b.h] ^ (z80.BC.b.l >> 2) ^ (io >> 2)) & 1) \
z80.AF.b.l |= Pflag; \
}
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE io = read_mem(z80.HL.w.l); \
z80.BC.b.h--; \
z80_OUT_handler(z80.BC, io); \
z80.HL.w.l++; \
z80.AF.b.l = SZ[z80.BC.b.h]; \
if(io & Sflag) z80.AF.b.l |= Nflag; \
if((((z80.BC.b.l + 1) & 0xff) + io) & 0x100) z80.AF.b.l |= Hflag | Cflag; \
if((irep_tmp1[z80.BC.b.l & 3][io & 3] ^ breg_tmp2[z80.BC.b.h] ^ (z80.BC.b.l >> 2) ^ (io >> 2)) & 1) \
z80.AF.b.l |= Pflag; \
}
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE res = (z80.AF.b.h << 1) | (z80.AF.b.l & Cflag); \
tUBYTE carry = (z80.AF.b.h & 0x80) ? Cflag : 0; \
z80.AF.b.l = (z80.AF.b.l & (Sflag | Zflag | Pflag)) | carry | (res & Xflags); \
z80.AF.b.h = res; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tUBYTE
n = read_mem(z80.HL.w.l); \
write_mem(z80.HL.w.l, (n << 4) | (z80.AF.b.h & 0x0f)); \
z80.AF.b.h = (z80.AF.b.h & 0xf0) | (n >> 4); \
z80.AF.b.l = (z80.AF.b.l & Cflag) | SZP[z80.AF.b.h]; \
}
GLuint GLfloat GLenum cap GLsizei n
Definition: glfunclist.h:13
Referenced by Z80::z80_pfx_ed().
Value:{ \
tUBYTE res = (z80.AF.b.h >> 1) | (z80.AF.b.l << 7); \
tUBYTE carry = (z80.AF.b.h & 0x01) ? Cflag : 0; \
z80.AF.b.l = (z80.AF.b.l & (Sflag | Zflag | Pflag)) | carry | (res & Xflags); \
z80.AF.b.h = res; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
z80.AF.b.l = (z80.AF.b.l & (Sflag | Zflag | Pflag)) | (z80.AF.b.h & Cflag); \
z80.AF.b.h = (z80.AF.b.h >> 1) | (z80.AF.b.h << 7); \
z80.AF.b.l |= (z80.AF.b.h & Xflags); \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tUBYTE
n = read_mem(z80.HL.w.l); \
write_mem(z80.HL.w.l, (n >> 4) | (z80.AF.b.h << 4)); \
z80.AF.b.h = (z80.AF.b.h & 0xf0) | (n & 0x0f); \
z80.AF.b.l = (z80.AF.b.l & Cflag) | SZP[z80.AF.b.h]; \
}
GLuint GLfloat GLenum cap GLsizei n
Definition: glfunclist.h:13
Referenced by Z80::z80_pfx_ed().
Value:{ \
unsigned val = value; \
unsigned res = z80.AF.b.h - val - (z80.AF.b.l & Cflag); \
z80.AF.b.l = SZ[res & 0xff] | ((res >> 8) & Cflag) | Nflag | ((z80.AF.b.h ^ res ^ val) & Hflag) | \
(((val ^ z80.AF.b.h) & (z80.AF.b.h ^ res) & 0x80) >> 5); \
z80.AF.b.h = res; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().
Value:{ \
tDWORD res = z80.HL.d - z80.reg.d - (z80.AF.b.l & Cflag); \
z80.AF.b.l = (((z80.HL.d ^ res ^ z80.reg.d) >> 8) & Hflag) | Nflag | \
((res >> 16) & Cflag) | \
((res >> 8) & (Sflag | Xflags)) | \
((res & 0xffff) ? 0 : Zflag) | \
(((z80.reg.d ^ z80.HL.d) & (z80.HL.d ^ res) &0x8000) >> 13); \
}
uint16_t tUWORD
Definition: types.h:80
Referenced by Z80::z80_pfx_ed().
Value:{ \
unsigned val = value; \
unsigned res = z80.AF.b.h - val; \
z80.AF.b.l = SZ[res & 0xff] | ((res >> 8) & Cflag) | Nflag | ((z80.AF.b.h ^ res ^ val) & Hflag) | \
(((val ^ z80.AF.b.h) & (z80.AF.b.h ^ res) & 0x80) >> 5); \
z80.AF.b.h = res; \
}
Referenced by Z80::execute(), Z80::z80_pfx_dd(), and Z80::z80_pfx_fd().