Rep Command

The REP instruction in front of a MOVS/LODS/STOS would cause the MOVS/LODS/STOS instruction to be repeated for a number of times specified in the CX register. So, if CX contained 5, then "REP STOSB" would store whatever was in the AL register into the byte pointed to by ES:DI five times, increasing DI each time.

Return