FS> BM> second of all, why aren't you doing these as REP MOVSW instructions?
FS>It's slower than moving the data "manually".
think so?
let me compare here:
; "manual" data movement, basically equivalent to REP MOVSW
; assume cx > 1, since repetition is pointless otherwise.
; clock cycles 486 386 286 86 (from TASM 3.2 qref)
@@1: MOV AX, [SI] ; 1 4 5 13
MOV ES:[DI], AX ; 1 2 3 16
ADD SI, 2 ; 1 2 3 4
ADD DI, 2 ; 1 2 3 4
LOOP @@1 ; 2 13 8 17 each time through the loop
;--------------
; totals per iteration: ; 6 23 22 54
; 6 12 4 5 at the end of the loop
; (386 clock count assumes NOP follows)
; effective clocks (w/ cx) 486 386 286 86
(manual rep movsw) 6+6*CX 12+23*CX 4+22*CX 5+54*CX
; rep movsw version
; clock cycles 486 386 286 86
REP MOVSW ;12+3*CX 5+4*CX 5+4*CX 9+18*CX
by my calculations, rep movsw is twice as fast on a 486, almost 6 times as
fast on a 386 or 286, and fully 6 times as fast on an 8086. If you can make
more efficient move routine, I'd love to see it.
FS>But I'm also pretty sure that's not the problem :). It seems as if Nick
as
FS>previously programmed on an Amiga or a similar machine where
memory-to-memory
FS>operations are supported. That's not the case on the PC. You _need_ to
ove
FS>the data through a register. Yes, the 80x86 has got to be the most
worthless
FS>piece of silicone the world has ever seen :-\.
Actually, it DOES support memory-to-memory, but only with rep movsw/movsb
(movsd on 386+).
((Cloud))
* OLX 2.2 * Time flies when you don't know what you're doing.
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)
|