Mail Archives: djgpp/1997/08/03/17:02:02
In article <m0wtK9E-0003FSC AT fwd03 DOT btx DOT dtag DOT de>, Georg DOT Kolling AT t-online DOT de
says...
>
>Bill HellGateS schrieb:
>> (2)Since Direct Memory Access is almost impossible ( correct me if I'm
>> wrong ) ... is there another alternative that can yield the same
>> performance as DMA?
>
On a 386 or better, a tight assembler loop of :
load source address
load destination address
load the length
start: move a word
bump source address
bump destination address
count down the length and jump to start if not zero
... is pretty fast. DMA may be better, but I recon this would give it a run for
its money. I have done this in real-mode, 16-bit assembler moving one byte at
a time, and I was able to move four 512-byte chunks, with overhead of hardware
testing etc. during the clock tick. I lost about 10% of performance on a
16-meg, 286 machine, so that may give some indication of how fast it is. I have
never attempted this in 32-bit assembler, but I guess the same types of
instructions are available.
Mike.
--
Don't just hit "reply" - my E-mail address is bogus
to avoid automatic browsers from sending junk mail.
Please use collim'at'anubis'dot'network'dot'com
Actually, even this doesn't stop all of them ...
- Raw text -