: I have tried them both but the time is equal. Why?
1. Because you were moving through a 16-bit port (for example an old isa video card);
2. Because you were moving 2 (or even 1) byte aligned, that is, you where moving between addresses that were not a multiple of 4. Actually, iirc, moving segment-aligned (16-bytes aligned) can give you an bonus speed-increase;
3. Because your timing is off? I hope you did this move a LOT of times :-)
Comments
: mov cx, 160
: rep movsw
: ...be slower than this
: mov cx,80
: rep movsd
: I have tried them both but the time is equal. Why?
1. Because you were moving through a 16-bit port (for example an old isa video card);
2. Because you were moving 2 (or even 1) byte aligned, that is, you where moving between addresses that were not a multiple of 4. Actually, iirc, moving segment-aligned (16-bytes aligned) can give you an bonus speed-increase;
3. Because your timing is off? I hope you did this move a LOT of times :-)
Greetz,
The Watcher