chjmartin2
Experienced Member
- Joined
- Dec 26, 2012
- Messages
- 424
MOVSW is an even bigger friend, since even on 8088 it's faster. Each MOVSB takes 16 clocks, so to move two bytes that's 32 clocks not counting opcode fetching. MOVSW takes 24 clocks so you get two bytes moved for 8 less clocks every loop. Just cut your CX in half.
Code:mov si, Data mov ax,0B800h mov es,ax xor di,di mov cx,4000 rep movsw
Ohhhh... can't wait to try it. 384k clocks to move a single page of 640x200x1 bit, so 768k clocks to move a single Plantronics frame. Is that .161 ms? Doesn't seem right? What am I doing wrong with my math? Doesn't feel like a 60 Hz flicker of two Plantronics screens would be possible then.
I NEEDED this website - I have been looking far and wide for something like this!!!Provides even bigger benefits on the 8086 and up, since on those machines with 16 bit or wider busses you're talking 16 clocks to move 1 byte vs 16 clocks to move two bytes
See the timings here:
x86 Processor Reference
x86.cutcodedown.com
That's my own reference I created for my own projects made off the commonly shared PCGPE.TXT by Mark Feldmen's, but with filtering by processor type. Fun project in and of itself since it's a monolithic web page with HTML and CSS doing all the heavy lifting and little to no scripting involved.
You can do the same with stosw, just be sure AH is the same as AL when clearing the page.