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

version 1.3, 2003/10/17 11:10:02 version 1.4, 2003/10/17 12:49:52
Line 69  I286EXT i286c_rep_outsw(void) { Line 69  I286EXT i286c_rep_outsw(void) {
   
 // ---------------------------------------------------------------------- movs  // ---------------------------------------------------------------------- movs
   
   #if 1
   I286EXT i286c_rep_movsb(void) {
   
           I286_CLOCK(5)
           if (I286_CX) {
                   SINT16 stp = STRING_DIR;
                   while(1) {
                           BYTE dat = i286_memoryread(I286_SI + DS_FIX);
                           i286_memorywrite(I286_DI + ES_BASE, dat);
                           I286_SI += stp;
                           I286_DI += stp;
                           I286_CLOCK(4)
                           I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (nevent.remainclock <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
           }
   }
   
   I286EXT i286c_rep_movsw(void) {
   
           I286_CLOCK(5)
           if (I286_CX) {
                   SINT16 stp = STRING_DIRx2;
                   while(1) {
                           UINT16 dat = i286_memoryread_w(I286_SI + DS_FIX);
                           i286_memorywrite_w(I286_DI + ES_BASE, dat);
                           I286_SI += stp;
                           I286_DI += stp;
                           I286_CLOCK(4)
                           I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (nevent.remainclock <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
           }
   }
   #else
 I286EXT i286c_rep_movsb(void) {  I286EXT i286c_rep_movsb(void) {
   
         I286_CLOCK(5)          I286_CLOCK(5)
Line 98  I286EXT i286c_rep_movsw(void) { Line 145  I286EXT i286c_rep_movsw(void) {
                 } while(--I286_CX);                  } while(--I286_CX);
         }          }
 }  }
   #endif
   
 // ---------------------------------------------------------------------- lods  // ---------------------------------------------------------------------- lods
   
   #if 1
   I286EXT i286c_rep_lodsb(void) {
   
           I286_CLOCK(5)
           if (I286_CX) {
                   SINT16 stp = STRING_DIR;
                   while(1) {
                           I286_AL = i286_memoryread(I286_SI + DS_FIX);
                           I286_SI += stp;
                           I286_CLOCK(4)
                           I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (nevent.remainclock <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
           }
   }
   
   I286EXT i286c_rep_lodsw(void) {
   
           I286_CLOCK(5)
           if (I286_CX) {
                   SINT16 stp = STRING_DIRx2;
                   while(1) {
                           I286_AX = i286_memoryread_w(I286_SI + DS_FIX);
                           I286_SI += stp;
                           I286_CLOCK(4)
                           I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (nevent.remainclock <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
           }
   }
   #else
 I286EXT i286c_rep_lodsb(void) {  I286EXT i286c_rep_lodsb(void) {
   
         I286_CLOCK(5)          I286_CLOCK(5)
Line 126  I286EXT i286c_rep_lodsw(void) { Line 217  I286EXT i286c_rep_lodsw(void) {
                 } while(--I286_CX);                  } while(--I286_CX);
         }          }
 }  }
   #endif
   
 // ---------------------------------------------------------------------- stos  // ---------------------------------------------------------------------- stos
   
   #if 1
   I286EXT i286c_rep_stosb(void) {
   
           I286_CLOCK(4)
           if (I286_CX) {
                   SINT16 stp = STRING_DIR;
                   while(1) {
                           i286_memorywrite(I286_DI + ES_BASE, I286_AL);
                           I286_DI += stp;
                           I286_CLOCK(3)
                           I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (nevent.remainclock <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
           }
   }
   
   I286EXT i286c_rep_stosw(void) {
   
           I286_CLOCK(4)
           if (I286_CX) {
                   SINT16 stp = STRING_DIRx2;
                   while(1) {
                           i286_memorywrite_w(I286_DI + ES_BASE, I286_AX);
                           I286_DI += stp;
                           I286_CLOCK(3)
                           I286_CX--;
                           if (!I286_CX) {
                                   break;
                           }
                           if (nevent.remainclock <= 0) {
                                   I286_IP -= i286reg.prefix + 1;
                                   break;
                           }
                   }
           }
   }
   #else
 I286EXT i286c_rep_stosb(void) {  I286EXT i286c_rep_stosb(void) {
   
         I286_CLOCK(4)          I286_CLOCK(4)
Line 154  I286EXT i286c_rep_stosw(void) { Line 289  I286EXT i286c_rep_stosw(void) {
                 } while(--I286_CX);                  } while(--I286_CX);
         }          }
 }  }
   #endif
   
 // ---------------------------------------------------------------------- cmps  // ---------------------------------------------------------------------- cmps
   

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


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