Diff for /np2/i286c/i286c_rp.c between versions 1.3 and 1.7

version 1.3, 2003/10/17 11:10:02 version 1.7, 2003/11/29 03:38:26
Line 11 Line 11
   
 I286EXT i286c_rep_insb(void) {  I286EXT i286c_rep_insb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  do {
                         BYTE dat = iocore_inp8(I286_DX);                          REG8 dat = iocore_inp8(I286_DX);
                         i286_memorywrite(I286_DI + ES_BASE, dat);                          i286_memorywrite(I286_DI + ES_BASE, dat);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while (--I286_CX);                  } while (--I286_CX);
         }          }
 }  }
   
 I286EXT i286c_rep_insw(void) {  I286EXT i286c_rep_insw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  do {
                         UINT16 dat = iocore_inp16(I286_DX);                          REG16 dat = iocore_inp16(I286_DX);
                         i286_memorywrite_w(I286_DI + ES_BASE, dat);                          i286_memorywrite_w(I286_DI + ES_BASE, dat);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                  } while(--I286_CX);
         }          }
 }  }
Line 41  I286EXT i286c_rep_insw(void) { Line 41  I286EXT i286c_rep_insw(void) {
   
 I286EXT i286c_rep_outsb(void) {  I286EXT i286c_rep_outsb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  do {
                         BYTE dat = i286_memoryread(I286_SI + DS_FIX);                          REG8 dat = i286_memoryread(I286_SI + DS_FIX);
                         I286_SI += stp;                          I286_SI += stp;
                         iocore_out8(I286_DX, dat);                          iocore_out8(I286_DX, (BYTE)dat);
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                  } while(--I286_CX);
         }          }
 }  }
   
 I286EXT i286c_rep_outsw(void) {  I286EXT i286c_rep_outsw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  do {
                         UINT16 dat = i286_memoryread_w(I286_SI + DS_FIX);                          REG16 dat = i286_memoryread_w(I286_SI + DS_FIX);
                         I286_SI += stp;                          I286_SI += stp;
                         iocore_out16(I286_DX, dat);                          iocore_out16(I286_DX, (UINT16)dat);
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                  } while(--I286_CX);
         }          }
 }  }
   
   
 // ---------------------------------------------------------------------- movs  // ---------------------------------------------------------------------- movs
   
 I286EXT i286c_rep_movsb(void) {  I286EXT i286c_rep_movsb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  while(1) {
                         BYTE dat = i286_memoryread(I286_SI + DS_FIX);                          REG8 dat = i286_memoryread(I286_SI + DS_FIX);
                         i286_memorywrite(I286_DI + ES_BASE, dat);                          i286_memorywrite(I286_DI + ES_BASE, dat);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                          I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (I286_REMCLOCK <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
         }          }
 }  }
   
 I286EXT i286c_rep_movsw(void) {  I286EXT i286c_rep_movsw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  while(1) {
                         UINT16 dat = i286_memoryread_w(I286_SI + DS_FIX);                          REG16 dat = i286_memoryread_w(I286_SI + DS_FIX);
                         i286_memorywrite_w(I286_DI + ES_BASE, dat);                          i286_memorywrite_w(I286_DI + ES_BASE, dat);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                          I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (I286_REMCLOCK <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
         }          }
 }  }
   
   
 // ---------------------------------------------------------------------- lods  // ---------------------------------------------------------------------- lods
   
 I286EXT i286c_rep_lodsb(void) {  I286EXT i286c_rep_lodsb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  while(1) {
                         I286_AL = i286_memoryread(I286_SI + DS_FIX);                          I286_AL = i286_memoryread(I286_SI + DS_FIX);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                          I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (I286_REMCLOCK <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
         }          }
 }  }
   
 I286EXT i286c_rep_lodsw(void) {  I286EXT i286c_rep_lodsw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  while(1) {
                         I286_AX = i286_memoryread_w(I286_SI + DS_FIX);                          I286_AX = i286_memoryread_w(I286_SI + DS_FIX);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_CLOCK(4)                          I286_WORKCLOCK(4);
                 } while(--I286_CX);                          I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (I286_REMCLOCK <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
         }          }
 }  }
   
   
 // ---------------------------------------------------------------------- stos  // ---------------------------------------------------------------------- stos
   
 I286EXT i286c_rep_stosb(void) {  I286EXT i286c_rep_stosb(void) {
   
         I286_CLOCK(4)          I286_WORKCLOCK(4);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  while(1) {
                         i286_memorywrite(I286_DI + ES_BASE, I286_AL);                          i286_memorywrite(I286_DI + ES_BASE, I286_AL);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(3)                          I286_WORKCLOCK(3);
                 } while(--I286_CX);                          I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (I286_REMCLOCK <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
         }          }
 }  }
   
 I286EXT i286c_rep_stosw(void) {  I286EXT i286c_rep_stosw(void) {
   
         I286_CLOCK(4)          I286_WORKCLOCK(4);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  while(1) {
                         i286_memorywrite_w(I286_DI + ES_BASE, I286_AX);                          i286_memorywrite_w(I286_DI + ES_BASE, I286_AX);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(3)                          I286_WORKCLOCK(3);
                 } while(--I286_CX);                          I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (I286_REMCLOCK <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
         }          }
 }  }
   
   
 // ---------------------------------------------------------------------- cmps  // ---------------------------------------------------------------------- cmps
   
 I286EXT i286c_repe_cmpsb(void) {  I286EXT i286c_repe_cmpsb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  do {
                         UINT res;                          UINT res;
                         UINT dst = i286_memoryread(I286_SI + DS_FIX);                          UINT dst = i286_memoryread(I286_SI + DS_FIX);
                         UINT src = i286_memoryread(I286_DI + ES_BASE);                          UINT src = i286_memoryread(I286_DI + ES_BASE);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(9)                          I286_WORKCLOCK(9);
                         BYTE_SUB(res, dst, src)                          SUBBYTE(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (I286_FLAGL & Z_FLAG));                  } while((I286_CX) && (I286_FLAGL & Z_FLAG));
         }          }
Line 177  I286EXT i286c_repe_cmpsb(void) { Line 229  I286EXT i286c_repe_cmpsb(void) {
   
 I286EXT i286c_repne_cmpsb(void) {  I286EXT i286c_repne_cmpsb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 do {                  do {
                         UINT res;                          UINT res;
                         UINT dst = i286_memoryread(I286_SI + DS_FIX);                          UINT dst = i286_memoryread(I286_SI + DS_FIX);
                         UINT src = i286_memoryread(I286_DI + ES_BASE);                          UINT src = i286_memoryread(I286_DI + ES_BASE);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(9)                          I286_WORKCLOCK(9);
                         BYTE_SUB(res, dst, src)                          SUBBYTE(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));                  } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));
         }          }
Line 195  I286EXT i286c_repne_cmpsb(void) { Line 247  I286EXT i286c_repne_cmpsb(void) {
   
 I286EXT i286c_repe_cmpsw(void) {  I286EXT i286c_repe_cmpsw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  do {
                         UINT32 res;                          UINT32 res;
                         UINT32 dst = i286_memoryread_w(I286_SI + DS_FIX);                          UINT32 dst = i286_memoryread_w(I286_SI + DS_FIX);
                         UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);                          UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(9)                          I286_WORKCLOCK(9);
                         WORD_SUB(res, dst, src)                          SUBWORD(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (I286_FLAGL & Z_FLAG));                  } while((I286_CX) && (I286_FLAGL & Z_FLAG));
         }          }
Line 213  I286EXT i286c_repe_cmpsw(void) { Line 265  I286EXT i286c_repe_cmpsw(void) {
   
 I286EXT i286c_repne_cmpsw(void) {  I286EXT i286c_repne_cmpsw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 do {                  do {
                         UINT32 res;                          UINT32 res;
                         UINT32 dst = i286_memoryread_w(I286_SI + DS_FIX);                          UINT32 dst = i286_memoryread_w(I286_SI + DS_FIX);
                         UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);                          UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);
                         I286_SI += stp;                          I286_SI += stp;
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(9)                          I286_WORKCLOCK(9);
                         WORD_SUB(res, dst, src)                          SUBWORD(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));                  } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));
         }          }
 }  }
   
   
 // ---------------------------------------------------------------------- scas  // ---------------------------------------------------------------------- scas
   
 I286EXT i286c_repe_scasb(void) {  I286EXT i286c_repe_scasb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 UINT dst = I286_AL;                  UINT dst = I286_AL;
                 do {                  do {
                         UINT res;                          UINT res;
                         UINT src = i286_memoryread(I286_DI + ES_BASE);                          UINT src = i286_memoryread(I286_DI + ES_BASE);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(8)                          I286_WORKCLOCK(8);
                         BYTE_SUB(res, dst, src)                          SUBBYTE(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (I286_FLAGL & Z_FLAG));                  } while((I286_CX) && (I286_FLAGL & Z_FLAG));
         }          }
Line 250  I286EXT i286c_repe_scasb(void) { Line 303  I286EXT i286c_repe_scasb(void) {
   
 I286EXT i286c_repne_scasb(void) {  I286EXT i286c_repne_scasb(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIR;                  int stp = STRING_DIR;
                 UINT dst = I286_AL;                  UINT dst = I286_AL;
                 do {                  do {
                         UINT res;                          UINT res;
                         UINT src = i286_memoryread(I286_DI + ES_BASE);                          UINT src = i286_memoryread(I286_DI + ES_BASE);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(8)                          I286_WORKCLOCK(8);
                         BYTE_SUB(res, dst, src)                          SUBBYTE(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));                  } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));
         }          }
Line 267  I286EXT i286c_repne_scasb(void) { Line 320  I286EXT i286c_repne_scasb(void) {
   
 I286EXT i286c_repe_scasw(void) {  I286EXT i286c_repe_scasw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 UINT32 dst = I286_AX;                  UINT32 dst = I286_AX;
                 do {                  do {
                         UINT32 res;                          UINT32 res;
                         UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);                          UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(8)                          I286_WORKCLOCK(8);
                         WORD_SUB(res, dst, src)                          SUBWORD(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (I286_FLAGL & Z_FLAG));                  } while((I286_CX) && (I286_FLAGL & Z_FLAG));
         }          }
Line 284  I286EXT i286c_repe_scasw(void) { Line 337  I286EXT i286c_repe_scasw(void) {
   
 I286EXT i286c_repne_scasw(void) {  I286EXT i286c_repne_scasw(void) {
   
         I286_CLOCK(5)          I286_WORKCLOCK(5);
         if (I286_CX) {          if (I286_CX) {
                 SINT16 stp = STRING_DIRx2;                  int stp = STRING_DIRx2;
                 UINT32 dst = I286_AX;                  UINT32 dst = I286_AX;
                 do {                  do {
                         UINT32 res;                          UINT32 res;
                         UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);                          UINT32 src = i286_memoryread_w(I286_DI + ES_BASE);
                         I286_DI += stp;                          I286_DI += stp;
                         I286_CLOCK(8)                          I286_WORKCLOCK(8);
                         WORD_SUB(res, dst, src)                          SUBWORD(res, dst, src)
                         I286_CX--;                          I286_CX--;
                 } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));                  } while((I286_CX) && (!(I286_FLAGL & Z_FLAG)));
         }          }

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


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