--- np2/i286c/i286c_mn.c 2005/02/04 05:32:23 1.36 +++ np2/i286c/i286c_mn.c 2005/02/07 14:46:10 1.37 @@ -32,7 +32,7 @@ I286FN _reserved(void) { I286FN _add_ea_r8(void) { // 00: add EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -57,7 +57,7 @@ I286FN _add_ea_r8(void) { // 00: ad } dst = *out; ADDBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _add_ea_r16(void) { // 01: add EA, REG16 @@ -92,7 +92,7 @@ I286FN _add_ea_r16(void) { // 01: a I286FN _add_r8_ea(void) { // 02: add REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -101,7 +101,7 @@ I286FN _add_r8_ea(void) { // 02: ad PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; ADDBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _add_r16_ea(void) { // 03: add REG16, EA @@ -126,7 +126,7 @@ I286FN _add_al_data8(void) { // 04: I286_WORKCLOCK(3); GET_PCBYTE(src); ADDBYTE(res, I286_AL, src); - I286_AL = (BYTE)res; + I286_AL = (UINT8)res; } I286FN _add_ax_data16(void) { // 05: add ax, DATA16 @@ -156,7 +156,7 @@ I286FN _pop_es(void) { // 07: pop I286FN _or_ea_r8(void) { // 08: or EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -180,7 +180,7 @@ I286FN _or_ea_r8(void) { // 08: or } dst = *out; ORBYTE(dst, src); - *out = (BYTE)dst; + *out = (UINT8)dst; } I286FN _or_ea_r16(void) { // 09: or EA, REG16 @@ -214,7 +214,7 @@ I286FN _or_ea_r16(void) { // 09: o I286FN _or_r8_ea(void) { // 0a: or REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -222,7 +222,7 @@ I286FN _or_r8_ea(void) { // 0a: or PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; ORBYTE(dst, src); - *out = (BYTE)dst; + *out = (UINT8)dst; } I286FN _or_r16_ea(void) { // 0b: or REG16, EA @@ -247,7 +247,7 @@ I286FN _or_al_data8(void) { // 0c: GET_PCBYTE(src); dst = I286_AL; ORBYTE(dst, src); - I286_AL = (BYTE)dst; + I286_AL = (UINT8)dst; } I286FN _or_ax_data16(void) { // 0d: or ax, DATA16 @@ -269,7 +269,7 @@ I286FN _push_cs(void) { // 0e: pus I286FN _adc_ea_r8(void) { // 10: adc EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -294,7 +294,7 @@ I286FN _adc_ea_r8(void) { // 10: ad } dst = *out; ADCBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _adc_ea_r16(void) { // 11: adc EA, REG16 @@ -329,7 +329,7 @@ I286FN _adc_ea_r16(void) { // 11: a I286FN _adc_r8_ea(void) { // 12: adc REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -338,7 +338,7 @@ I286FN _adc_r8_ea(void) { // 12: ad PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; ADCBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _adc_r16_ea(void) { // 13: adc REG16, EA @@ -363,7 +363,7 @@ I286FN _adc_al_data8(void) { // 14: I286_WORKCLOCK(3); GET_PCBYTE(src); ADCBYTE(res, I286_AL, src); - I286_AL = (BYTE)res; + I286_AL = (UINT8)res; } I286FN _adc_ax_data16(void) { // 15: adc ax, DATA16 @@ -395,7 +395,7 @@ I286FN _pop_ss(void) { // 17: pop I286FN _sbb_ea_r8(void) { // 18: sbb EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -420,7 +420,7 @@ I286FN _sbb_ea_r8(void) { // 18: sb } dst = *out; SBBBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _sbb_ea_r16(void) { // 19: sbb EA, REG16 @@ -455,7 +455,7 @@ I286FN _sbb_ea_r16(void) { // 19: s I286FN _sbb_r8_ea(void) { // 1a: sbb REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -464,7 +464,7 @@ I286FN _sbb_r8_ea(void) { // 1a: sb PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; SBBBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _sbb_r16_ea(void) { // 1b: sbb REG16, EA @@ -489,7 +489,7 @@ I286FN _sbb_al_data8(void) { // 1c: I286_WORKCLOCK(3); GET_PCBYTE(src); SBBBYTE(res, I286_AL, src); - I286_AL = (BYTE)res; + I286_AL = (UINT8)res; } I286FN _sbb_ax_data16(void) { // 1d: adc ax, DATA16 @@ -520,7 +520,7 @@ I286FN _pop_ds(void) { // 1f: pop I286FN _and_ea_r8(void) { // 20: and EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -544,7 +544,7 @@ I286FN _and_ea_r8(void) { // 20: an } dst = *out; ANDBYTE(dst, src); - *out = (BYTE)dst; + *out = (UINT8)dst; } I286FN _and_ea_r16(void) { // 21: and EA, REG16 @@ -578,7 +578,7 @@ I286FN _and_ea_r16(void) { // 21: a I286FN _and_r8_ea(void) { // 22: and REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -586,7 +586,7 @@ I286FN _and_r8_ea(void) { // 22: an PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; ANDBYTE(dst, src); - *out = (BYTE)dst; + *out = (UINT8)dst; } I286FN _and_r16_ea(void) { // 23: and REG16, EA @@ -611,7 +611,7 @@ I286FN _and_al_data8(void) { // 24: GET_PCBYTE(src); dst = I286_AL; ANDBYTE(dst, src); - I286_AL = (BYTE)dst; + I286_AL = (UINT8)dst; } I286FN _and_ax_data16(void) { // 25: and ax, DATA16 @@ -651,7 +651,7 @@ I286FN _daa(void) { // 27: daa ((I286_AL >= 0x1a) && (I286_FLAGL & C_FLAG)))); if ((I286_FLAGL & A_FLAG) || ((I286_AL & 0x0f) > 9)) { I286_FLAGL |= A_FLAG; - I286_FLAGL |= (BYTE)((I286_AL + 6) >> 8); + I286_FLAGL |= (UINT8)((I286_AL + 6) >> 8); I286_AL += 6; } if ((I286_FLAGL & C_FLAG) || (I286_AL > 0x9f)) { @@ -664,7 +664,7 @@ I286FN _daa(void) { // 27: daa I286FN _sub_ea_r8(void) { // 28: sub EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -689,7 +689,7 @@ I286FN _sub_ea_r8(void) { // 28: su } dst = *out; SUBBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _sub_ea_r16(void) { // 29: sub EA, REG16 @@ -724,7 +724,7 @@ I286FN _sub_ea_r16(void) { // 29: s I286FN _sub_r8_ea(void) { // 2a: sub REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -733,7 +733,7 @@ I286FN _sub_r8_ea(void) { // 2a: su PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; SUBBYTE(res, dst, src); - *out = (BYTE)res; + *out = (UINT8)res; } I286FN _sub_r16_ea(void) { // 2b: sub REG16, EA @@ -758,7 +758,7 @@ I286FN _sub_al_data8(void) { // 2c: I286_WORKCLOCK(3); GET_PCBYTE(src); SUBBYTE(res, I286_AL, src); - I286_AL = (BYTE)res; + I286_AL = (UINT8)res; } I286FN _sub_ax_data16(void) { // 2d: sub ax, DATA16 @@ -807,7 +807,7 @@ I286FN _das(void) { // 2f: das I286FN _xor_ea_r8(void) { // 30: xor EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -831,7 +831,7 @@ I286FN _xor_ea_r8(void) { // 30: xo } dst = *out; XORBYTE(dst, src); - *out = (BYTE)dst; + *out = (UINT8)dst; } I286FN _xor_ea_r16(void) { // 31: xor EA, REG16 @@ -865,7 +865,7 @@ I286FN _xor_ea_r16(void) { // 31: x I286FN _xor_r8_ea(void) { // 32: xor REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -873,7 +873,7 @@ I286FN _xor_r8_ea(void) { // 32: xo PREPART_REG8_EA(op, src, out, 2, 7); dst = *out; XORBYTE(dst, src); - *out = (BYTE)dst; + *out = (UINT8)dst; } I286FN _xor_r16_ea(void) { // 33: or REG16, EA @@ -898,7 +898,7 @@ I286FN _xor_al_data8(void) { // 34: GET_PCBYTE(src); dst = I286_AL; XORBYTE(dst, src); - I286_AL = (BYTE)dst; + I286_AL = (UINT8)dst; } I286FN _xor_ax_data16(void) { // 35: or ax, DATA16 @@ -986,7 +986,7 @@ I286FN _cmp_ea_r16(void) { // 39: c I286FN _cmp_r8_ea(void) { // 3a: cmp REG8, EA - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT dst; @@ -1223,7 +1223,7 @@ I286FN _arpl(void) { // 63: arpl GET_PCBYTE(op) tmp = ((op < 0xc0)?1:0); - I286_IP += (BYTE)tmp; + I286_IP += (UINT8)tmp; I286_WORKCLOCK(tmp + 10); INT_NUM(6, I286_IP); } @@ -1299,7 +1299,7 @@ I286FN _outsb(void) { // 6E: outsb I286_WORKCLOCK(3); dat = i286_memoryread(I286_SI + DS_FIX); I286_SI += STRING_DIR; - iocore_out8(I286_DX, (BYTE)dat); + iocore_out8(I286_DX, (UINT8)dat); } I286FN _outsw(void) { // 6F: outsw @@ -1399,7 +1399,7 @@ I286FN _jnle_short(void) { // 7F: jg I286FN _calc_ea8_i8(void) { // 80: op EA8, DATA8 // 82: op EA8, DATA8 - BYTE *out; + UINT8 *out; UINT op; UINT32 madr; @@ -1474,7 +1474,7 @@ I286FN _calc_ea16_i8(void) { // 83: o I286FN _test_ea_r8(void) { // 84: test EA, REG8 - BYTE *out; + UINT8 *out; UINT op; UINT src; UINT tmp; @@ -1528,8 +1528,8 @@ I286FN _test_ea_r16(void) { // 85: t I286FN _xchg_ea_r8(void) { // 86: xchg EA, REG8 - BYTE *out; - BYTE *src; + UINT8 *out; + UINT8 *src; UINT op; UINT32 madr; @@ -1542,7 +1542,7 @@ I286FN _xchg_ea_r8(void) { // 86: xc I286_WORKCLOCK(5); madr = CALC_EA(op); if (madr >= I286_MEMWRITEMAX) { - BYTE tmp = i286_memoryread(madr); + UINT8 tmp = i286_memoryread(madr); i286_memorywrite(madr, *src); *src = tmp; return; @@ -1580,7 +1580,7 @@ I286FN _xchg_ea_r16(void) { // 87: x I286FN _mov_ea_r8(void) { // 88: mov EA, REG8 - BYTE src; + UINT8 src; UINT op; UINT32 madr; @@ -1614,8 +1614,8 @@ I286FN _mov_ea_r16(void) { // 89: mo I286FN _mov_r8_ea(void) { // 8A: mov REG8, EA - BYTE *out; - BYTE src; + UINT8 *out; + UINT8 src; UINT op; PREPART_REG8_EA(op, src, out, 2, 5); @@ -1887,7 +1887,7 @@ I286FN _mov_m16_ax(void) { // A3: mo I286FN _movsb(void) { // A4: movsb - BYTE tmp; + UINT8 tmp; I286_WORKCLOCK(5); tmp = i286_memoryread(I286_SI + DS_FIX); @@ -2030,10 +2030,10 @@ I286FN _mov_di_imm(void) MOVIMM16(I286_D I286FN _shift_ea8_data8(void) { // C0: shift EA8, DATA8 - BYTE *out; + UINT8 *out; UINT op; UINT32 madr; - BYTE cl; + UINT8 cl; GET_PCBYTE(op) if (op >= 0xc0) { @@ -2061,7 +2061,7 @@ I286FN _shift_ea16_data8(void) { // C1 UINT16 *out; UINT op; UINT32 madr; - BYTE cl; + UINT8 cl; GET_PCBYTE(op) if (op >= 0xc0) { @@ -2150,7 +2150,7 @@ I286FN _mov_ea8_data8(void) { // C6: } else { // 03/11/23 UINT32 ad; - BYTE val; + UINT8 val; I286_WORKCLOCK(3); ad = CALC_EA(op); GET_PCBYTE(val) @@ -2180,7 +2180,7 @@ I286FN _mov_ea16_data16(void) { // C7 I286FN _enter(void) { // C8: enter DATA16, DATA8 UINT16 dimsize; - BYTE level; + UINT8 level; GET_PCWORD(dimsize) GET_PCBYTE(level) @@ -2526,7 +2526,7 @@ I286FN _iret(void) { // CF: iret I286FN _shift_ea8_1(void) { // D0: shift EA8, 1 - BYTE *out; + UINT8 *out; UINT op; UINT32 madr; @@ -2572,7 +2572,7 @@ I286FN _shift_ea16_1(void) { // D1: sh I286FN _shift_ea8_cl(void) { // D2: shift EA8, cl - BYTE *out; + UINT8 *out; UINT op; UINT32 madr; REG8 cl; @@ -2628,8 +2628,8 @@ I286FN _shift_ea16_cl(void) { // D3: s I286FN _aam(void) { // D4: AAM - BYTE al; - BYTE div; + UINT8 al; + UINT8 div; I286_WORKCLOCK(16); GET_PCBYTE(div); @@ -2648,11 +2648,11 @@ I286FN _aam(void) { // D4: AAM I286FN _aad(void) { // D5: AAD - BYTE mul; + UINT8 mul; I286_WORKCLOCK(14); GET_PCBYTE(mul); - I286_AL += (BYTE)(I286_AH * mul); + I286_AL += (UINT8)(I286_AH * mul); I286_AH = 0; I286_FLAGL &= ~(S_FLAG | Z_FLAG | P_FLAG); I286_FLAGL |= BYTESZPF(I286_AL);