--- np2/i286c/i286c.mcr 2003/12/08 00:55:31 1.17 +++ np2/i286c/i286c.mcr 2005/02/07 14:46:10 1.20 @@ -32,24 +32,21 @@ extern UINT8 WORDSZPCF(UINT32 r); #elif !defined(MEMOPTIMIZE) -extern UINT8 _szpcflag8[0x200]; extern UINT8 _szpflag16[0x10000]; -#define BYTESZPF(a) (_szpcflag8[(a)]) -#define BYTESZPCF(a) (_szpcflag8[(a)]) -#define BYTESZPCF2(a) (_szpcflag8[(a) & 0x1ff]) +#define BYTESZPF(a) (iflags[(a)]) +#define BYTESZPCF(a) (iflags[(a)]) +#define BYTESZPCF2(a) (iflags[(a) & 0x1ff]) #define WORDSZPF(a) (_szpflag16[(a)]) #define WORDSZPCF(a) (_szpflag16[LOW16(a)] + (((a) >> 16) & 1)) #else -extern UINT8 _szpcflag8[0x200]; - -#define BYTESZPF(a) (_szpcflag8[(a)]) -#define BYTESZPCF(a) (_szpcflag8[(a)]) -#define BYTESZPCF2(a) (_szpcflag8[(a) & 0x1ff]) -#define WORDSZPF(a) ((_szpcflag8[(a) & 0xff] & P_FLAG) + \ +#define BYTESZPF(a) (iflags[(a)]) +#define BYTESZPCF(a) (iflags[(a)]) +#define BYTESZPCF2(a) (iflags[(a) & 0x1ff]) +#define WORDSZPF(a) ((iflags[(a) & 0xff] & P_FLAG) + \ (((a))?0:Z_FLAG) + (((a) >> 8) & S_FLAG)) -#define WORDSZPCF(a) ((_szpcflag8[(a) & 0xff] & P_FLAG) + \ +#define WORDSZPCF(a) ((iflags[(a) & 0xff] & P_FLAG) + \ ((LOW16(a))?0:Z_FLAG) + (((a) >> 8) & S_FLAG) + \ (((a) >> 16) & 1)) @@ -209,7 +206,7 @@ extern UINT calc_a(UINT op, UINT32 *seg) #define ADDBYTE(r, d, s) \ (r) = (s) + (d); \ I286_OV = ((r) ^ (s)) & ((r) ^ (d)) & 0x80; \ - I286_FLAGL = (BYTE)(((r) ^ (d) ^ (s)) & A_FLAG); \ + I286_FLAGL = (UINT8)(((r) ^ (d) ^ (s)) & A_FLAG); \ I286_FLAGL |= BYTESZPCF(r); #define ADDWORD(r, d, s) \ @@ -503,5 +500,7 @@ extern UINT calc_a(UINT op, UINT32 *seg) } -#define INT_NUM(a, b) i286c_intnum((a), (REG16)(b)) +#define SEGSELECT(c) ((I286_MSW & MSW_PE)?i286c_selector(c):((c) << 4)) + +#define INT_NUM(a, b) i286c_intnum((a), (REG16)(b))