Mail Archives: djgpp/1999/06/03/17:15:05
Mattias Eklöf wrote:
>
> I'm wondering if someone could type out two really minor asm functions
> that'd work with DJGPP+NASM for me. I want speed at the same time as my
> asm knowledge is very limited, and I don't feel like digging too deep
> into it just for the sake of two functions either.
>
> Anyway, what I need is:
> * a function something like void memcpy(char* to, char* from) that'd
> copy 64000 bytes of memory from (char*)from to (char*)to.
> * a function like void putmem(char* from) that'd copy 64000 bytes of
> memory from (char*) onto the screen (0xA000).
I don't think anybody can write functions that will be significantly
faster than the existing memcpy and dosmemput.
A few small optimizations, maybe, but they'd save maybe a cycle or two
over the whole copy. No point.
Some CPU-specific optimizations are possible, but these are less than
trivial and involve a lot of research. And besides, you didn't say what
kind of CPU you have.
In short, use what exists, and be happy.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -