Diff for /np2/i286c/i286c_mn.c between versions 1.2 and 1.3

version 1.2, 2003/10/17 07:17:20 version 1.3, 2003/10/17 11:10:02
Line 81  I286FN _add_ea_r16(void) {      // 01: a Line 81  I286FN _add_ea_r16(void) {      // 01: a
                 if (INHIBIT_WORDP(madr)) {                  if (INHIBIT_WORDP(madr)) {
                         dst = i286_memoryread_w(madr);                          dst = i286_memoryread_w(madr);
                         ADDWORD(res, dst, src);                          ADDWORD(res, dst, src);
                         i286_memorywrite_w(madr, (WORD)res);                          i286_memorywrite_w(madr, (UINT16)res);
                         return;                          return;
                 }                  }
                 out = (UINT16 *)(mem + madr);                  out = (UINT16 *)(mem + madr);
Line 155  I286FN _pop_es(void) {       // 07: pop  Line 155  I286FN _pop_es(void) {       // 07: pop 
 I286FN _or_ea_r8(void) {                                                // 08: or EA, REG8  I286FN _or_ea_r8(void) {                                                // 08: or EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, madr;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 179  I286FN _or_ea_r8(void) {      // 08: or  Line 182  I286FN _or_ea_r8(void) {      // 08: or 
 I286FN _or_ea_r16(void) {                                                       // 09: or EA, REG16  I286FN _or_ea_r16(void) {                                                       // 09: or EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, madr;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 203  I286FN _or_ea_r16(void) {       // 09: o Line 209  I286FN _or_ea_r16(void) {       // 09: o
 I286FN _or_r8_ea(void) {                                                // 0a: or REG8, EA  I286FN _or_r8_ea(void) {                                                // 0a: or REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src;          UINT    op;
           UINT    src;
   
         PREPART_REG8_EA(op, src, out, 2, 7);          PREPART_REG8_EA(op, src, out, 2, 7);
         ORBYTE(*out, src);          ORBYTE(*out, src);
Line 212  I286FN _or_r8_ea(void) {      // 0a: or  Line 219  I286FN _or_r8_ea(void) {      // 0a: or 
 I286FN _or_r16_ea(void) {                                               // 0b: or REG16, EA  I286FN _or_r16_ea(void) {                                               // 0b: or REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src;          UINT    op;
           UINT32  src;
   
         PREPART_REG16_EA(op, src, out, 2, 7);          PREPART_REG16_EA(op, src, out, 2, 7);
         ORWORD(*out, src);          ORWORD(*out, src);
Line 220  I286FN _or_r16_ea(void) {      // 0b: or Line 228  I286FN _or_r16_ea(void) {      // 0b: or
   
 I286FN _or_al_data8(void) {                                             // 0c: or al, DATA8  I286FN _or_al_data8(void) {                                             // 0c: or al, DATA8
   
         DWORD   src;          UINT    src;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 229  I286FN _or_al_data8(void) {      // 0c:  Line 237  I286FN _or_al_data8(void) {      // 0c: 
   
 I286FN _or_ax_data16(void) {                                    // 0d: or ax, DATA16  I286FN _or_ax_data16(void) {                                    // 0d: or ax, DATA16
   
         DWORD   src;          UINT32  src;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 244  I286FN _push_cs(void) {       // 0e: pus Line 252  I286FN _push_cs(void) {       // 0e: pus
 I286FN _adc_ea_r8(void) {                                               // 10: adc EA, REG8  I286FN _adc_ea_r8(void) {                                               // 10: adc EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res, madr;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 270  I286FN _adc_ea_r8(void) {      // 10: ad Line 282  I286FN _adc_ea_r8(void) {      // 10: ad
 I286FN _adc_ea_r16(void) {                                              // 11: adc EA, REG16  I286FN _adc_ea_r16(void) {                                              // 11: adc EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res, madr;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 296  I286FN _adc_ea_r16(void) {      // 11: a Line 312  I286FN _adc_ea_r16(void) {      // 11: a
 I286FN _adc_r8_ea(void) {                                               // 12: adc REG8, EA  I286FN _adc_r8_ea(void) {                                               // 12: adc REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
   
         PREPART_REG8_EA(op, src, out, 2, 7);          PREPART_REG8_EA(op, src, out, 2, 7);
         dst = *out;          dst = *out;
Line 307  I286FN _adc_r8_ea(void) {      // 12: ad Line 326  I286FN _adc_r8_ea(void) {      // 12: ad
 I286FN _adc_r16_ea(void) {                                              // 13: adc REG16, EA  I286FN _adc_r16_ea(void) {                                              // 13: adc REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         PREPART_REG16_EA(op, src, out, 2, 7);          PREPART_REG16_EA(op, src, out, 2, 7);
         dst = *out;          dst = *out;
Line 317  I286FN _adc_r16_ea(void) {      // 13: a Line 339  I286FN _adc_r16_ea(void) {      // 13: a
   
 I286FN _adc_al_data8(void) {                                    // 14: adc al, DATA8  I286FN _adc_al_data8(void) {                                    // 14: adc al, DATA8
   
         DWORD   src, res;          UINT    src;
           UINT    res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 327  I286FN _adc_al_data8(void) {     // 14:  Line 350  I286FN _adc_al_data8(void) {     // 14: 
   
 I286FN _adc_ax_data16(void) {                                   // 15: adc ax, DATA16  I286FN _adc_ax_data16(void) {                                   // 15: adc ax, DATA16
   
         DWORD   src, res;          UINT32  src;
           UINT32  res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 351  I286FN _pop_ss(void) {       // 17: pop  Line 375  I286FN _pop_ss(void) {       // 17: pop 
 I286FN _sbb_ea_r8(void) {                                               // 18: sbb EA, REG8  I286FN _sbb_ea_r8(void) {                                               // 18: sbb EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res, madr;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 377  I286FN _sbb_ea_r8(void) {      // 18: sb Line 405  I286FN _sbb_ea_r8(void) {      // 18: sb
 I286FN _sbb_ea_r16(void) {                                              // 19: sbb EA, REG16  I286FN _sbb_ea_r16(void) {                                              // 19: sbb EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res, madr;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 403  I286FN _sbb_ea_r16(void) {      // 19: s Line 435  I286FN _sbb_ea_r16(void) {      // 19: s
 I286FN _sbb_r8_ea(void) {                                               // 1a: sbb REG8, EA  I286FN _sbb_r8_ea(void) {                                               // 1a: sbb REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT32  res;
   
         PREPART_REG8_EA(op, src, out, 2, 7);          PREPART_REG8_EA(op, src, out, 2, 7);
         dst = *out;          dst = *out;
Line 414  I286FN _sbb_r8_ea(void) {      // 1a: sb Line 449  I286FN _sbb_r8_ea(void) {      // 1a: sb
 I286FN _sbb_r16_ea(void) {                                              // 1b: sbb REG16, EA  I286FN _sbb_r16_ea(void) {                                              // 1b: sbb REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         PREPART_REG16_EA(op, src, out, 2, 7);          PREPART_REG16_EA(op, src, out, 2, 7);
         dst = *out;          dst = *out;
Line 424  I286FN _sbb_r16_ea(void) {      // 1b: s Line 462  I286FN _sbb_r16_ea(void) {      // 1b: s
   
 I286FN _sbb_al_data8(void) {                                    // 1c: adc al, DATA8  I286FN _sbb_al_data8(void) {                                    // 1c: adc al, DATA8
   
         DWORD   src, res;          UINT    src;
           UINT    res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 434  I286FN _sbb_al_data8(void) {     // 1c:  Line 473  I286FN _sbb_al_data8(void) {     // 1c: 
   
 I286FN _sbb_ax_data16(void) {                                   // 1d: adc ax, DATA16  I286FN _sbb_ax_data16(void) {                                   // 1d: adc ax, DATA16
   
         DWORD   src, res;          UINT32  src;
           UINT32  res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 457  I286FN _pop_ds(void) {       // 1f: pop  Line 497  I286FN _pop_ds(void) {       // 1f: pop 
 I286FN _and_ea_r8(void) {                                               // 20: and EA, REG8  I286FN _and_ea_r8(void) {                                               // 20: and EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, madr;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 481  I286FN _and_ea_r8(void) {      // 20: an Line 524  I286FN _and_ea_r8(void) {      // 20: an
 I286FN _and_ea_r16(void) {                                              // 21: and EA, REG16  I286FN _and_ea_r16(void) {                                              // 21: and EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, madr;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 505  I286FN _and_ea_r16(void) {      // 21: a Line 551  I286FN _and_ea_r16(void) {      // 21: a
 I286FN _and_r8_ea(void) {                                               // 22: and REG8, EA  I286FN _and_r8_ea(void) {                                               // 22: and REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src;          UINT    op;
           UINT    src;
   
         PREPART_REG8_EA(op, src, out, 2, 7);          PREPART_REG8_EA(op, src, out, 2, 7);
         ANDBYTE(*out, src);          ANDBYTE(*out, src);
Line 514  I286FN _and_r8_ea(void) {      // 22: an Line 561  I286FN _and_r8_ea(void) {      // 22: an
 I286FN _and_r16_ea(void) {                                              // 23: and REG16, EA  I286FN _and_r16_ea(void) {                                              // 23: and REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src;          UINT    op;
           UINT32  src;
   
         PREPART_REG16_EA(op, src, out, 2, 7);          PREPART_REG16_EA(op, src, out, 2, 7);
         ANDWORD(*out, src);          ANDWORD(*out, src);
Line 522  I286FN _and_r16_ea(void) {      // 23: a Line 570  I286FN _and_r16_ea(void) {      // 23: a
   
 I286FN _and_al_data8(void) {                                    // 24: and al, DATA8  I286FN _and_al_data8(void) {                                    // 24: and al, DATA8
   
         DWORD   src;          UINT    src;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 531  I286FN _and_al_data8(void) {     // 24:  Line 579  I286FN _and_al_data8(void) {     // 24: 
   
 I286FN _and_ax_data16(void) {                                   // 25: and ax, DATA16  I286FN _and_ax_data16(void) {                                   // 25: and ax, DATA16
   
         DWORD   src;          UINT32  src;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 544  I286FN _segprefix_es(void) {     // 26:  Line 592  I286FN _segprefix_es(void) {     // 26: 
         DS_FIX = ES_BASE;          DS_FIX = ES_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op[op]();                  i286op[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 577  I286FN _daa(void) {        // 27: daa Line 625  I286FN _daa(void) {        // 27: daa
 I286FN _sub_ea_r8(void) {                                               // 28: sub EA, REG8  I286FN _sub_ea_r8(void) {                                               // 28: sub EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res, madr;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 603  I286FN _sub_ea_r8(void) {      // 28: su Line 655  I286FN _sub_ea_r8(void) {      // 28: su
 I286FN _sub_ea_r16(void) {                                              // 29: sub EA, REG16  I286FN _sub_ea_r16(void) {                                              // 29: sub EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res, madr;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 629  I286FN _sub_ea_r16(void) {      // 29: s Line 685  I286FN _sub_ea_r16(void) {      // 29: s
 I286FN _sub_r8_ea(void) {                                               // 2a: sub REG8, EA  I286FN _sub_r8_ea(void) {                                               // 2a: sub REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
   
         PREPART_REG8_EA(op, src, out, 2, 7);          PREPART_REG8_EA(op, src, out, 2, 7);
         dst = *out;          dst = *out;
Line 640  I286FN _sub_r8_ea(void) {      // 2a: su Line 699  I286FN _sub_r8_ea(void) {      // 2a: su
 I286FN _sub_r16_ea(void) {                                              // 2b: sub REG16, EA  I286FN _sub_r16_ea(void) {                                              // 2b: sub REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         PREPART_REG16_EA(op, src, out, 2, 7);          PREPART_REG16_EA(op, src, out, 2, 7);
         dst = *out;          dst = *out;
Line 650  I286FN _sub_r16_ea(void) {      // 2b: s Line 712  I286FN _sub_r16_ea(void) {      // 2b: s
   
 I286FN _sub_al_data8(void) {                                    // 2c: sub al, DATA8  I286FN _sub_al_data8(void) {                                    // 2c: sub al, DATA8
   
         DWORD   src, res;          UINT    src;
           UINT    res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 660  I286FN _sub_al_data8(void) {     // 2c:  Line 723  I286FN _sub_al_data8(void) {     // 2c: 
   
 I286FN _sub_ax_data16(void) {                                   // 2d: sub ax, DATA16  I286FN _sub_ax_data16(void) {                                   // 2d: sub ax, DATA16
   
         DWORD   src, res;          UINT32  src;
           UINT32  res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 674  I286FN _segprefix_cs(void) {     // 2e:  Line 738  I286FN _segprefix_cs(void) {     // 2e: 
         DS_FIX = CS_BASE;          DS_FIX = CS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op[op]();                  i286op[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 694  I286FN _das(void) {        // 2f: das Line 758  I286FN _das(void) {        // 2f: das
         }          }
         if ((I286_FLAGL & A_FLAG) || ((I286_AL & 0x0f) > 9)) {          if ((I286_FLAGL & A_FLAG) || ((I286_AL & 0x0f) > 9)) {
                 I286_FLAGL |= A_FLAG;                  I286_FLAGL |= A_FLAG;
                 I286_FLAGL |= (((DWORD)I286_AL - 6) >> 8) & 1;                  I286_FLAGL |= ((I286_AL - 6) >> 8) & 1;
                 I286_AL -= 6;                  I286_AL -= 6;
         }          }
         I286_FLAGL &= A_FLAG | C_FLAG;          I286_FLAGL &= A_FLAG | C_FLAG;
Line 704  I286FN _das(void) {        // 2f: das Line 768  I286FN _das(void) {        // 2f: das
 I286FN _xor_ea_r8(void) {                                               // 30: xor EA, REG8  I286FN _xor_ea_r8(void) {                                               // 30: xor EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, madr;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 728  I286FN _xor_ea_r8(void) {      // 30: xo Line 795  I286FN _xor_ea_r8(void) {      // 30: xo
 I286FN _xor_ea_r16(void) {                                              // 31: xor EA, REG16  I286FN _xor_ea_r16(void) {                                              // 31: xor EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, madr;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 752  I286FN _xor_ea_r16(void) {      // 31: x Line 822  I286FN _xor_ea_r16(void) {      // 31: x
 I286FN _xor_r8_ea(void) {                                               // 32: xor REG8, EA  I286FN _xor_r8_ea(void) {                                               // 32: xor REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src;          UINT    op;
           UINT    src;
   
         PREPART_REG8_EA(op, src, out, 2, 7);          PREPART_REG8_EA(op, src, out, 2, 7);
         BYTE_XOR(*out, src);          BYTE_XOR(*out, src);
Line 761  I286FN _xor_r8_ea(void) {      // 32: xo Line 832  I286FN _xor_r8_ea(void) {      // 32: xo
 I286FN _xor_r16_ea(void) {                                              // 33: or REG16, EA  I286FN _xor_r16_ea(void) {                                              // 33: or REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src;          UINT    op;
           UINT32  src;
   
         PREPART_REG16_EA(op, src, out, 2, 7);          PREPART_REG16_EA(op, src, out, 2, 7);
         WORD_XOR(*out, src);          WORD_XOR(*out, src);
Line 769  I286FN _xor_r16_ea(void) {      // 33: o Line 841  I286FN _xor_r16_ea(void) {      // 33: o
   
 I286FN _xor_al_data8(void) {                                    // 34: or al, DATA8  I286FN _xor_al_data8(void) {                                    // 34: or al, DATA8
   
         DWORD   src;          UINT    src;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 778  I286FN _xor_al_data8(void) {     // 34:  Line 850  I286FN _xor_al_data8(void) {     // 34: 
   
 I286FN _xor_ax_data16(void) {                                   // 35: or ax, DATA16  I286FN _xor_ax_data16(void) {                                   // 35: or ax, DATA16
   
         DWORD   src;          UINT32  src;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 791  I286FN _segprefix_ss(void) {     // 36:  Line 863  I286FN _segprefix_ss(void) {     // 36: 
         DS_FIX = SS_BASE;          DS_FIX = SS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op[op]();                  i286op[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 817  I286FN _aaa(void) {        // 37: aaa Line 889  I286FN _aaa(void) {        // 37: aaa
   
 I286FN _cmp_ea_r8(void) {                                               // 38: cmp EA, REG8  I286FN _cmp_ea_r8(void) {                                               // 38: cmp EA, REG8
   
         DWORD   op, src, dst, res;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 834  I286FN _cmp_ea_r8(void) {      // 38: cm Line 909  I286FN _cmp_ea_r8(void) {      // 38: cm
   
 I286FN _cmp_ea_r16(void) {                                              // 39: cmp EA, REG16  I286FN _cmp_ea_r16(void) {                                              // 39: cmp EA, REG16
   
         DWORD   op, src, dst, res;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 852  I286FN _cmp_ea_r16(void) {      // 39: c Line 930  I286FN _cmp_ea_r16(void) {      // 39: c
 I286FN _cmp_r8_ea(void) {                                               // 3a: cmp REG8, EA  I286FN _cmp_r8_ea(void) {                                               // 3a: cmp REG8, EA
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT    src;
           UINT    dst;
           UINT    res;
   
         PREPART_REG8_EA(op, src, out, 2, 6);          PREPART_REG8_EA(op, src, out, 2, 6);
         dst = *out;          dst = *out;
Line 862  I286FN _cmp_r8_ea(void) {      // 3a: cm Line 943  I286FN _cmp_r8_ea(void) {      // 3a: cm
 I286FN _cmp_r16_ea(void) {                                              // 3b: cmp REG16, EA  I286FN _cmp_r16_ea(void) {                                              // 3b: cmp REG16, EA
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, dst, res;          UINT    op;
           UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         PREPART_REG16_EA(op, src, out, 2, 6);          PREPART_REG16_EA(op, src, out, 2, 6);
         dst = *out;          dst = *out;
Line 871  I286FN _cmp_r16_ea(void) {      // 3b: c Line 955  I286FN _cmp_r16_ea(void) {      // 3b: c
   
 I286FN _cmp_al_data8(void) {                                    // 3c: cmp al, DATA8  I286FN _cmp_al_data8(void) {                                    // 3c: cmp al, DATA8
   
         DWORD   src, res;          UINT    src;
           UINT    res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src);          GET_PCBYTE(src);
Line 880  I286FN _cmp_al_data8(void) {     // 3c:  Line 965  I286FN _cmp_al_data8(void) {     // 3c: 
   
 I286FN _cmp_ax_data16(void) {                                   // 3d: cmp ax, DATA16  I286FN _cmp_ax_data16(void) {                                   // 3d: cmp ax, DATA16
   
         DWORD   src, res;          UINT32  src;
           UINT32  res;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src);          GET_PCWORD(src);
Line 893  I286FN _segprefix_ds(void) {     // 3e:  Line 979  I286FN _segprefix_ds(void) {     // 3e: 
         DS_FIX = DS_BASE;          DS_FIX = DS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op[op]();                  i286op[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 982  I286_P _popa(void) {      // 61: popa Line 1068  I286_P _popa(void) {      // 61: popa
   
 I286_P _bound(void) {                                           // 62:  bound  I286_P _bound(void) {                                           // 62:  bound
   
         DWORD   vect = 0;          UINT    vect = 0;
         DWORD   op;          UINT    op;
         DWORD   madr;          UINT32  madr;
         UINT16  reg;          UINT16  reg;
   
         I286_CLOCK(13);                                                                         // ToDo          I286_CLOCK(13);                                                                         // ToDo
Line 1008  I286_P _bound(void) {      // 62: bound Line 1094  I286_P _bound(void) {      // 62: bound
   
 I286_P _arpl(void) {                                            // 63:  arpl  I286_P _arpl(void) {                                            // 63:  arpl
   
         DWORD   op;          UINT    op;
         DWORD   tmp;          UINT    tmp;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         tmp = ((op < 0xc0)?1:0);          tmp = ((op < 0xc0)?1:0);
Line 1029  I286_P _push_data16(void) {    // 68: pu Line 1115  I286_P _push_data16(void) {    // 68: pu
 I286_P _imul_reg_ea_data16(void) {              // 69:  imul    REG, EA, DATA16  I286_P _imul_reg_ea_data16(void) {              // 69:  imul    REG, EA, DATA16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op;          UINT    op;
         short   src, dst;          SINT16  src;
         long    res;          SINT16  dst;
           SINT32  res;
   
         PREPART_REG16_EA(op, src, out, 21, 24)          PREPART_REG16_EA(op, src, out, 21, 24)
         GET_PCWORD(dst)          GET_PCWORD(dst)
Line 1050  I286_P _push_data8(void) {    // 6A: pus Line 1137  I286_P _push_data8(void) {    // 6A: pus
 I286_P _imul_reg_ea_data8(void) {               // 6B:  imul    REG, EA, DATA8  I286_P _imul_reg_ea_data8(void) {               // 6B:  imul    REG, EA, DATA8
   
         UINT16  *out;          UINT16  *out;
         DWORD   op;          UINT    op;
         short   src, dst;          SINT16  src;
         long    res;          SINT16  dst;
           SINT32  res;
   
         PREPART_REG16_EA(op, src, out, 21, 24)          PREPART_REG16_EA(op, src, out, 21, 24)
         GET_PCBYTES(dst)          GET_PCBYTES(dst)
Line 1188  I286_P _jnle_short(void) {     // 7F: jg Line 1276  I286_P _jnle_short(void) {     // 7F: jg
 I286_P _calc_ea8_i8(void) {                                     // 80:  op              EA8, DATA8  I286_P _calc_ea8_i8(void) {                                     // 80:  op              EA8, DATA8
                                                                                         // 82:  op              EA8, DATA8                                                                                          // 82:  op              EA8, DATA8
         BYTE    *out;          BYTE    *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1210  I286_P _calc_ea8_i8(void) {     // 80: o Line 1299  I286_P _calc_ea8_i8(void) {     // 80: o
 I286_P _calc_ea16_i16(void) {                           // 81:  op              EA16, DATA16  I286_P _calc_ea16_i16(void) {                           // 81:  op              EA16, DATA16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, madr, src;          UINT    op;
           UINT32  madr;
           UINT32  src;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1234  I286_P _calc_ea16_i16(void) {    // 81:  Line 1325  I286_P _calc_ea16_i16(void) {    // 81: 
 I286_P _calc_ea16_i8(void) {                            // 83:  op              EA16, DATA8  I286_P _calc_ea16_i8(void) {                            // 83:  op              EA16, DATA8
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, madr, src;          UINT    op;
           UINT32  madr;
           UINT32  src;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1258  I286_P _calc_ea16_i8(void) {    // 83: o Line 1351  I286_P _calc_ea16_i8(void) {    // 83: o
 I286_P _test_ea_r8(void) {                                      // 84:  test    EA, REG8  I286_P _test_ea_r8(void) {                                      // 84:  test    EA, REG8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, src, tmp, madr;          UINT    op;
           UINT    src;
           UINT    tmp;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src);          PREPART_EA_REG8(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1282  I286_P _test_ea_r8(void) {     // 84: te Line 1378  I286_P _test_ea_r8(void) {     // 84: te
 I286_P _test_ea_r16(void) {                                     // 85:  test    EA, REG16  I286_P _test_ea_r16(void) {                                     // 85:  test    EA, REG16
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, src, tmp, madr;          UINT    op;
           UINT32  src;
           UINT32  tmp;
           UINT32  madr;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1305  I286_P _test_ea_r16(void) {     // 85: t Line 1404  I286_P _test_ea_r16(void) {     // 85: t
   
 I286_P _xchg_ea_r8(void) {                                      // 86:  xchg    EA, REG8  I286_P _xchg_ea_r8(void) {                                      // 86:  xchg    EA, REG8
   
         BYTE    *out, *src;          BYTE    *out;
         DWORD   op, madr;          BYTE    *src;
           UINT    op;
           UINT32  madr;
   
         PREPART_EA_REG8P(op, src);          PREPART_EA_REG8P(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1329  I286_P _xchg_ea_r8(void) {     // 86: xc Line 1430  I286_P _xchg_ea_r8(void) {     // 86: xc
   
 I286_P _xchg_ea_r16(void) {                                     // 87:  xchg    EA, REG16  I286_P _xchg_ea_r16(void) {                                     // 87:  xchg    EA, REG16
   
         UINT16  *out, *src;          UINT16  *out;
         DWORD   op, madr;          UINT16  *src;
           UINT    op;
           UINT32  madr;
   
         PREPART_EA_REG16P(op, src);          PREPART_EA_REG16P(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1341  I286_P _xchg_ea_r16(void) {     // 87: x Line 1444  I286_P _xchg_ea_r16(void) {     // 87: x
                 I286_CLOCK(5);                  I286_CLOCK(5);
                 madr = c_calc_ea_dst[op]();                  madr = c_calc_ea_dst[op]();
                 if (INHIBIT_WORDP(madr)) {                  if (INHIBIT_WORDP(madr)) {
                         WORD tmp = i286_memoryread_w(madr);                          UINT16 tmp = i286_memoryread_w(madr);
                         i286_memorywrite_w(madr, *src);                          i286_memorywrite_w(madr, *src);
                         *src = tmp;                          *src = tmp;
                         return;                          return;
Line 1354  I286_P _xchg_ea_r16(void) {     // 87: x Line 1457  I286_P _xchg_ea_r16(void) {     // 87: x
 I286_P _mov_ea_r8(void) {                                       // 88:  mov             EA, REG8  I286_P _mov_ea_r8(void) {                                       // 88:  mov             EA, REG8
   
         BYTE    src;          BYTE    src;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
   
         PREPART_EA_REG8(op, src)          PREPART_EA_REG8(op, src)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1371  I286_P _mov_ea_r8(void) {     // 88: mov Line 1475  I286_P _mov_ea_r8(void) {     // 88: mov
 I286_P _mov_ea_r16(void) {                                      // 89:  mov             EA, REG16  I286_P _mov_ea_r16(void) {                                      // 89:  mov             EA, REG16
   
         UINT16  src;          UINT16  src;
         DWORD   op;          UINT    op;
   
         PREPART_EA_REG16(op, src);          PREPART_EA_REG16(op, src);
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1388  I286_P _mov_r8_ea(void) {     // 8A: mov Line 1492  I286_P _mov_r8_ea(void) {     // 8A: mov
   
         BYTE    *out;          BYTE    *out;
         BYTE    src;          BYTE    src;
         DWORD   op;          UINT    op;
   
         PREPART_REG8_EA(op, src, out, 2, 5);          PREPART_REG8_EA(op, src, out, 2, 5);
         *out = src;          *out = src;
Line 1398  I286_P _mov_r16_ea(void) {     // 8B: mo Line 1502  I286_P _mov_r16_ea(void) {     // 8B: mo
   
         UINT16  *out;          UINT16  *out;
         UINT16  src;          UINT16  src;
         DWORD   op;          UINT    op;
   
         PREPART_REG16_EA(op, src, out, 2, 5);          PREPART_REG16_EA(op, src, out, 2, 5);
         *out = src;          *out = src;
Line 1406  I286_P _mov_r16_ea(void) {     // 8B: mo Line 1510  I286_P _mov_r16_ea(void) {     // 8B: mo
   
 I286_P _mov_ea_seg(void) {                                      // 8C:  mov             EA, segreg  I286_P _mov_ea_seg(void) {                                      // 8C:  mov             EA, segreg
   
         DWORD   op;          UINT    op;
         UINT16  tmp;          UINT16  tmp;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
Line 1423  I286_P _mov_ea_seg(void) {     // 8C: mo Line 1527  I286_P _mov_ea_seg(void) {     // 8C: mo
   
 I286_P _lea_r16_ea(void) {                                      // 8D:  lea             REG16, EA  I286_P _lea_r16_ea(void) {                                      // 8D:  lea             REG16, EA
   
         DWORD   op;          UINT    op;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(op)          GET_PCBYTE(op)
Line 1437  I286_P _lea_r16_ea(void) {     // 8D: le Line 1541  I286_P _lea_r16_ea(void) {     // 8D: le
   
 I286_P _mov_seg_ea(void) {                                      // 8E:  mov             segrem, EA  I286_P _mov_seg_ea(void) {                                      // 8E:  mov             segrem, EA
   
         DWORD   op;          UINT    op;
         UINT    tmp;          UINT    tmp;
         UINT16  ipbak;          UINT16  ipbak;
   
Line 1478  I286_P _mov_seg_ea(void) {     // 8E: mo Line 1582  I286_P _mov_seg_ea(void) {     // 8E: mo
   
 I286_P _pop_ea(void) {                                          // 8F:  pop             EA  I286_P _pop_ea(void) {                                          // 8F:  pop             EA
   
         DWORD   op;          UINT    op;
         UINT16  tmp;          UINT16  tmp;
   
         I286_CLOCK(5)          I286_CLOCK(5)
Line 1613  I286_P _lahf(void) {      // 9F: lahf Line 1717  I286_P _lahf(void) {      // 9F: lahf
   
 I286_P _mov_al_m8(void) {                                       // A0:  mov             al, m8  I286_P _mov_al_m8(void) {                                       // A0:  mov             al, m8
   
         DWORD   op;          UINT    op;
   
         I286_CLOCK(5)          I286_CLOCK(5)
         GET_PCWORD(op)          GET_PCWORD(op)
Line 1622  I286_P _mov_al_m8(void) {     // A0: mov Line 1726  I286_P _mov_al_m8(void) {     // A0: mov
   
 I286_P _mov_ax_m16(void) {                                      // A1:  mov             ax, m16  I286_P _mov_ax_m16(void) {                                      // A1:  mov             ax, m16
   
         DWORD   op;          UINT    op;
   
         I286_CLOCK(5)          I286_CLOCK(5)
         GET_PCWORD(op)          GET_PCWORD(op)
Line 1631  I286_P _mov_ax_m16(void) {     // A1: mo Line 1735  I286_P _mov_ax_m16(void) {     // A1: mo
   
 I286_P _mov_m8_al(void) {                                       // A2:  mov             m8, al  I286_P _mov_m8_al(void) {                                       // A2:  mov             m8, al
   
         DWORD   op;          UINT    op;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(op)          GET_PCWORD(op)
Line 1640  I286_P _mov_m8_al(void) {     // A2: mov Line 1744  I286_P _mov_m8_al(void) {     // A2: mov
   
 I286_P _mov_m16_ax(void) {                                      // A3:  mov             m16, ax  I286_P _mov_m16_ax(void) {                                      // A3:  mov             m16, ax
   
         DWORD   op;          UINT    op;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(op);          GET_PCWORD(op);
Line 1671  I286_P _movsw(void) {      // A5: movsw Line 1775  I286_P _movsw(void) {      // A5: movsw
   
 I286_P _cmpsb(void) {                                           // A6:  cmpsb  I286_P _cmpsb(void) {                                           // A6:  cmpsb
   
         DWORD   src, dst, res;          UINT    src;
           UINT    dst;
           UINT    res;
   
         I286_CLOCK(8)          I286_CLOCK(8)
         dst = i286_memoryread(I286_SI + DS_FIX);          dst = i286_memoryread(I286_SI + DS_FIX);
Line 1683  I286_P _cmpsb(void) {      // A6: cmpsb Line 1789  I286_P _cmpsb(void) {      // A6: cmpsb
   
 I286_P _cmpsw(void) {                                           // A7:  cmpsw  I286_P _cmpsw(void) {                                           // A7:  cmpsw
   
         DWORD   src, dst, res;          UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         I286_CLOCK(8)          I286_CLOCK(8)
         dst = i286_memoryread_w(I286_SI + DS_FIX);          dst = i286_memoryread_w(I286_SI + DS_FIX);
Line 1695  I286_P _cmpsw(void) {      // A7: cmpsw Line 1803  I286_P _cmpsw(void) {      // A7: cmpsw
   
 I286_P _test_al_data8(void) {                           // A8:  test    al, DATA8  I286_P _test_al_data8(void) {                           // A8:  test    al, DATA8
   
         DWORD   src, dst;          UINT    src;
           UINT    dst;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCBYTE(src)          GET_PCBYTE(src)
Line 1705  I286_P _test_al_data8(void) {    // A8:  Line 1814  I286_P _test_al_data8(void) {    // A8: 
   
 I286_P _test_ax_data16(void) {                          // A9:  test    ax, DATA16  I286_P _test_ax_data16(void) {                          // A9:  test    ax, DATA16
   
         DWORD   src, dst;          UINT32  src;
           UINT32  dst;
   
         I286_CLOCK(3)          I286_CLOCK(3)
         GET_PCWORD(src)          GET_PCWORD(src)
Line 1743  I286_P _lodsw(void) {      // AD: lodsw Line 1853  I286_P _lodsw(void) {      // AD: lodsw
   
 I286_P _scasb(void) {                                           // AE:  scasb  I286_P _scasb(void) {                                           // AE:  scasb
   
         DWORD   src, dst, res;          UINT    src;
           UINT    dst;
           UINT    res;
   
         I286_CLOCK(7)          I286_CLOCK(7)
         src = i286_memoryread(I286_DI + ES_BASE);          src = i286_memoryread(I286_DI + ES_BASE);
Line 1754  I286_P _scasb(void) {      // AE: scasb Line 1866  I286_P _scasb(void) {      // AE: scasb
   
 I286_P _scasw(void) {                                           // AF:  scasw  I286_P _scasw(void) {                                           // AF:  scasw
   
         DWORD   src, dst, res;          UINT32  src;
           UINT32  dst;
           UINT32  res;
   
         I286_CLOCK(7)          I286_CLOCK(7)
         src = i286_memoryread_w(I286_DI + ES_BASE);          src = i286_memoryread_w(I286_DI + ES_BASE);
Line 1783  I286_P _mov_di_imm(void) MOVIMM16(I286_D Line 1897  I286_P _mov_di_imm(void) MOVIMM16(I286_D
 I286_P _shift_ea8_data8(void) {                         // C0:  shift   EA8, DATA8  I286_P _shift_ea8_data8(void) {                         // C0:  shift   EA8, DATA8
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
         BYTE    cl;          BYTE    cl;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
Line 1810  I286_P _shift_ea8_data8(void) {    // C0 Line 1925  I286_P _shift_ea8_data8(void) {    // C0
 I286_P _shift_ea16_data8(void) {                        // C1:  shift   EA16, DATA8  I286_P _shift_ea16_data8(void) {                        // C1:  shift   EA16, DATA8
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
         BYTE    cl;          BYTE    cl;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
Line 1852  I286_P _ret_near(void) {     // C3: ret  Line 1968  I286_P _ret_near(void) {     // C3: ret 
   
 I286_P _les_r16_ea(void) {                                      // C4:  les             REG16, EA  I286_P _les_r16_ea(void) {                                      // C4:  les             REG16, EA
   
         DWORD   op;          UINT    op;
         UINT16  ad;          UINT16  ad;
   
         I286_CLOCK(3)          I286_CLOCK(3)
Line 1871  I286_P _les_r16_ea(void) {     // C4: le Line 1987  I286_P _les_r16_ea(void) {     // C4: le
   
 I286_P _lds_r16_ea(void) {                                      // C5:  lds             REG16, EA  I286_P _lds_r16_ea(void) {                                      // C5:  lds             REG16, EA
   
         DWORD   op;          UINT    op;
         UINT16  ad;          UINT16  ad;
   
         I286_CLOCK(3)          I286_CLOCK(3)
Line 1881  I286_P _lds_r16_ea(void) {     // C5: ld Line 1997  I286_P _lds_r16_ea(void) {     // C5: ld
                 *(reg16_b53[op]) = i286_memoryread_w(ad + EA_FIX);                  *(reg16_b53[op]) = i286_memoryread_w(ad + EA_FIX);
                 ad += 2;                  ad += 2;
                 I286_DS = i286_memoryread_w(ad + EA_FIX);                  I286_DS = i286_memoryread_w(ad + EA_FIX);
                 DS_BASE = (DWORD)I286_DS << 4;                  DS_BASE = I286_DS << 4;
                 DS_FIX = DS_BASE;                  DS_FIX = DS_BASE;
         }          }
         else {          else {
Line 1891  I286_P _lds_r16_ea(void) {     // C5: ld Line 2007  I286_P _lds_r16_ea(void) {     // C5: ld
   
 I286_P _mov_ea8_data8(void) {                           // C6:  mov             EA8, DATA8  I286_P _mov_ea8_data8(void) {                           // C6:  mov             EA8, DATA8
   
         DWORD   op;          UINT    op;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 1899  I286_P _mov_ea8_data8(void) {    // C6:  Line 2015  I286_P _mov_ea8_data8(void) {    // C6: 
                 GET_PCBYTE(*(reg8_b53[op]))                  GET_PCBYTE(*(reg8_b53[op]))
         }          }
         else {          else {
                 WORD    ad;                  UINT ad;
                 BYTE    val;                  BYTE val;
                 I286_CLOCK(3)                  I286_CLOCK(3)
                 ad = c_get_ea[op]();                  ad = c_get_ea[op]();
                 GET_PCBYTE(val)                  GET_PCBYTE(val)
Line 1910  I286_P _mov_ea8_data8(void) {    // C6:  Line 2026  I286_P _mov_ea8_data8(void) {    // C6: 
   
 I286_P _mov_ea16_data16(void) {                         // C7:  mov             EA16, DATA16  I286_P _mov_ea16_data16(void) {                         // C7:  mov             EA16, DATA16
   
         DWORD   op;          UINT    op;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 2003  I286_P _int_03(void) {      // CC: int   Line 2119  I286_P _int_03(void) {      // CC: int  
   
 I286_P _int_data8(void) {                                       // CD:  int             DATA8  I286_P _int_data8(void) {                                       // CD:  int             DATA8
   
         BYTE vect;          UINT    vect;
   
         I286_CLOCK(23)          I286_CLOCK(23)
         GET_PCBYTE(vect)          GET_PCBYTE(vect)
Line 2036  I286_P _iret(void) {      // CF: iret Line 2152  I286_P _iret(void) {      // CF: iret
 I286_P _shift_ea8_1(void) {                             // D0:  shift EA8, 1  I286_P _shift_ea8_1(void) {                             // D0:  shift EA8, 1
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 2058  I286_P _shift_ea8_1(void) {    // D0: sh Line 2175  I286_P _shift_ea8_1(void) {    // D0: sh
 I286_P _shift_ea16_1(void) {                    // D1:  shift EA16, 1  I286_P _shift_ea16_1(void) {                    // D1:  shift EA16, 1
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
         if (op >= 0xc0) {          if (op >= 0xc0) {
Line 2080  I286_P _shift_ea16_1(void) {   // D1: sh Line 2198  I286_P _shift_ea16_1(void) {   // D1: sh
 I286_P _shift_ea8_cl(void) {                    // D2:  shift EA8, cl  I286_P _shift_ea8_cl(void) {                    // D2:  shift EA8, cl
   
         BYTE    *out;          BYTE    *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
         BYTE    cl;          BYTE    cl;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
Line 2107  I286_P _shift_ea8_cl(void) {   // D2: sh Line 2226  I286_P _shift_ea8_cl(void) {   // D2: sh
 I286_P _shift_ea16_cl(void) {                   // D3:  shift EA16, cl  I286_P _shift_ea16_cl(void) {                   // D3:  shift EA16, cl
   
         UINT16  *out;          UINT16  *out;
         DWORD   op, madr;          UINT    op;
           UINT32  madr;
         BYTE    cl;          BYTE    cl;
   
         GET_PCBYTE(op)          GET_PCBYTE(op)
Line 2176  I286_P _xlat(void) {      // D7: xlat Line 2296  I286_P _xlat(void) {      // D7: xlat
   
 I286_P _esc(void) {                                                     // D8:  esc  I286_P _esc(void) {                                                     // D8:  esc
   
         DWORD   op;          UINT    op;
   
         I286_CLOCK(2)          I286_CLOCK(2)
         GET_PCBYTE(op)          GET_PCBYTE(op)
Line 2318  I286_P _repne(void) {      // F2: repne Line 2438  I286_P _repne(void) {      // F2: repne
   
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repne[op]();                  i286op_repne[op]();
                 i286reg.prefix = 0;                  i286reg.prefix = 0;
Line 2332  I286_P _repe(void) {      // F3: repe Line 2452  I286_P _repe(void) {      // F3: repe
   
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repe[op]();                  i286op_repe[op]();
                 i286reg.prefix = 0;                  i286reg.prefix = 0;
Line 2356  I286_P _cmc(void) {       // F5: cmc Line 2476  I286_P _cmc(void) {       // F5: cmc
   
 I286_P _ope0xf6(void) {                                         // F6:    I286_P _ope0xf6(void) {                                         // F6:  
   
         DWORD   op;          UINT    op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         c_ope0xf6_table[(op >> 3) & 7](op);          c_ope0xf6_table[(op >> 3) & 7](op);
Line 2364  I286_P _ope0xf6(void) {      // F6:  Line 2484  I286_P _ope0xf6(void) {      // F6: 
   
 I286_P _ope0xf7(void) {                                         // F7:    I286_P _ope0xf7(void) {                                         // F7:  
   
         DWORD   op;          UINT    op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         c_ope0xf7_table[(op >> 3) & 7](op);          c_ope0xf7_table[(op >> 3) & 7](op);
Line 2394  I286_P _sti(void) {       // FB: sti Line 2514  I286_P _sti(void) {       // FB: sti
         I286_CLOCK(2)          I286_CLOCK(2)
         I286_FLAG |= I_FLAG;          I286_FLAG |= I_FLAG;
         I286_TRAP = (I286_FLAG & T_FLAG) >> 8;          // ToDo          I286_TRAP = (I286_FLAG & T_FLAG) >> 8;          // ToDo
   
         REMAIN_ADJUST(1)          REMAIN_ADJUST(1)
 }  }
   
Line 2411  I286_P _std(void) {       // FD: std Line 2532  I286_P _std(void) {       // FD: std
   
 I286_P _ope0xfe(void) {                                         // FE:    I286_P _ope0xfe(void) {                                         // FE:  
   
         DWORD   op;          UINT    op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         c_ope0xfe_table[(op >> 3) & 1](op);          c_ope0xfe_table[(op >> 3) & 1](op);
Line 2419  I286_P _ope0xfe(void) {      // FE:  Line 2540  I286_P _ope0xfe(void) {      // FE: 
   
 I286_P _ope0xff(void) {                                         // FF:    I286_P _ope0xff(void) {                                         // FF:  
   
         DWORD   op;          UINT    op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         c_ope0xff_table[(op >> 3) & 7](op);          c_ope0xff_table[(op >> 3) & 7](op);
Line 2711  I286_P _repe_segprefix_es(void) { Line 2832  I286_P _repe_segprefix_es(void) {
         SS_FIX = ES_BASE;          SS_FIX = ES_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repe[op]();                  i286op_repe[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 2728  I286_P _repe_segprefix_cs(void) { Line 2849  I286_P _repe_segprefix_cs(void) {
         SS_FIX = CS_BASE;          SS_FIX = CS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repe[op]();                  i286op_repe[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 2745  I286_P _repe_segprefix_ss(void) { Line 2866  I286_P _repe_segprefix_ss(void) {
         SS_FIX = SS_BASE;          SS_FIX = SS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repe[op]();                  i286op_repe[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 2762  I286_P _repe_segprefix_ds(void) { Line 2883  I286_P _repe_segprefix_ds(void) {
         SS_FIX = DS_BASE;          SS_FIX = DS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repe[op]();                  i286op_repe[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 3056  I286_P _repne_segprefix_es(void) { Line 3177  I286_P _repne_segprefix_es(void) {
         SS_FIX = ES_BASE;          SS_FIX = ES_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repne[op]();                  i286op_repne[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 3073  I286_P _repne_segprefix_cs(void) { Line 3194  I286_P _repne_segprefix_cs(void) {
         SS_FIX = CS_BASE;          SS_FIX = CS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repne[op]();                  i286op_repne[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 3090  I286_P _repne_segprefix_ss(void) { Line 3211  I286_P _repne_segprefix_ss(void) {
         SS_FIX = SS_BASE;          SS_FIX = SS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repne[op]();                  i286op_repne[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 3107  I286_P _repne_segprefix_ds(void) { Line 3228  I286_P _repne_segprefix_ds(void) {
         SS_FIX = DS_BASE;          SS_FIX = DS_BASE;
         i286reg.prefix++;          i286reg.prefix++;
         if (i286reg.prefix < MAX_PREFIX) {          if (i286reg.prefix < MAX_PREFIX) {
                 DWORD   op;                  UINT op;
                 GET_PCBYTE(op);                  GET_PCBYTE(op);
                 i286op_repne[op]();                  i286op_repne[op]();
                 REMOVE_PREFIX                  REMOVE_PREFIX
Line 3392  const I286OP i286op_repne[] = { Line 3513  const I286OP i286op_repne[] = {
                         _ope0xff,                                               // FF:                            _ope0xff,                                               // FF:  
 };  };
   
   
   
   
 // ----  
   
 #if 0  
 void INTR_CALL i286c_interrupt(BYTE vect) {  
   
         BYTE    op;  
   
         op = i286_memoryread(I286_IP + CS_BASE);  
         if (op == 0xf4) {                                                       // hlt  
                 I286_IP++;  
         }  
         REGPUSH0(REAL_FLAGREG)  
         REGPUSH0(I286_CS)  
         REGPUSH0(I286_IP)  
         I286_IP = GETWORD(mem + vect*4);                        // real mode!  
         I286_CS = GETWORD(mem + vect*4 + 2);            // real mode!  
         CS_BASE = I286_CS << 4;  
         I286_CLOCK(20)  
 }  
   
   
   
 void i286c(void) {  
   
         DWORD   opcode;  
   
         do {  
                 GET_PCBYTE(opcode);  
                 i286op[opcode]();  
         } while(nevent.remainclock > 0);  
 }  
   
 void i286c_withtrap(void) {  
   
         DWORD   opcode;  
   
         do {  
                 GET_PCBYTE(opcode);  
                 i286op[opcode]();  
                 if (I286_TRAP) {  
                         i286c_interrupt(1);  
                 }  
                 dma_proc();  
   
         } while(nevent.remainclock > 0);  
 }  
   
 void i286c_withdma(void) {  
   
         DWORD   opcode;  
   
         do {  
                 GET_PCBYTE(opcode);  
                 i286op[opcode]();  
                 dma_proc();  
         } while(nevent.remainclock > 0);  
 }  
   
   
 void i286c_step(void) {  
   
         BYTE    opcode;  
   
         I286_OV = I286_FLAG & O_FLAG;  
         I286_FLAG &= ~(O_FLAG);  
   
         GET_PCBYTE(opcode);  
         i286op[opcode]();  
   
         I286_FLAG &= ~(O_FLAG);  
         if (I286_OV) {  
                 I286_FLAG |= (O_FLAG);  
         }  
         dma_proc();  
 }  
 #endif  

Removed from v.1.2  
changed lines
  Added in v.1.3


RetroPC.NET-CVS <cvs@retropc.net>