--- np2/i286c/i286c_rp.c 2003/12/08 00:55:31 1.9 +++ np2/i286c/i286c_rp.c 2003/12/09 15:49:14 1.10 @@ -70,6 +70,75 @@ I286EXT i286c_rep_outsw(void) { // ---------------------------------------------------------------------- movs +#if 1 +I286EXT i286c_rep_movsb(void) { + + UINT16 r_cx; + int stp; + UINT16 r_si; + UINT16 r_di; + + I286_WORKCLOCK(5); + r_cx = I286_CX; + if (r_cx) { + stp = STRING_DIR; + r_si = I286_SI; + r_di = I286_DI; + while(1) { + REG8 dat = i286_memoryread(DS_FIX + r_si); + i286_memorywrite(ES_BASE + r_di, dat); + r_si += stp; + r_di += stp; + I286_WORKCLOCK(4); + r_cx--; + if (!r_cx) { + break; + } + if (I286_REMCLOCK <= 0) { + I286_IP -= I286_PREFIX + 1; + break; + } + } + I286_CX = r_cx; + I286_SI = r_si; + I286_DI = r_di; + } +} + +I286EXT i286c_rep_movsw(void) { + + UINT16 r_cx; + int stp; + UINT16 r_si; + UINT16 r_di; + + I286_WORKCLOCK(5); + r_cx = I286_CX; + if (r_cx) { + stp = STRING_DIRx2; + r_si = I286_SI; + r_di = I286_DI; + while(1) { + REG16 dat = i286_memoryread_w(DS_FIX + r_si); + i286_memorywrite_w(ES_BASE + r_di, dat); + r_si += stp; + r_di += stp; + I286_WORKCLOCK(4); + r_cx--; + if (!r_cx) { + break; + } + if (I286_REMCLOCK <= 0) { + I286_IP -= I286_PREFIX + 1; + break; + } + } + I286_CX = r_cx; + I286_SI = r_si; + I286_DI = r_di; + } +} +#else I286EXT i286c_rep_movsb(void) { I286_WORKCLOCK(5); @@ -115,6 +184,7 @@ I286EXT i286c_rep_movsw(void) { } } } +#endif // ---------------------------------------------------------------------- lods