You originally asked about
Code:
rep
eseg o16 movs
. In that particular old assembler movs is the same as movsb. Movsb moves a byte at a time. Movsw moves words (2 bytes at a time), and Movsd words 4 bytes at a time. By default in 32-bit code data would be moved from DS:ESI to ES:EDI. The ESEG (or ES) segment override changes the default source segment from DS to ES. That results in ES:ESI to ES:EDI. The REP prefix does the move the specified number of times in ECX. Each iteration ESI and EDI would be increased by 1 with Movsb (incremented by 2 each time for movsw, and 4 for movsd - movsd not available in 16-bit). If the direction flag is set (with STD) then ESI and EDI are decremented instead of incremented.
Edit: I mistakenly said this previously "The o16 (or data16) forces the operation to be done with 16-bit registers so DS:SI to ES:DI". I don't believe `o16` does anything at all and is superfluous and can be removed *in this case*. What is true is "a16 (or addr16) forces the operation to be done with 16-bit address registers so DS:SI to ES:DI" and if using REP, then CX will be used for counting instead of ECX.
Edit2: The only situation where o16 might do something is if you are using movsd. The result may be that it would be interpreted as movsw. I haven't tested this to see if this is true.