Mail Archives: djgpp/1997/12/18/20:20:48
At 08:59 12/18/1997 -0600, Greg Moorer wrote:
><snip>
>> + __DJ_size_t
>> + #undef __DJ_size_t
>> + #define __DJ_size_t
>
>I never woulda figured that out by myself.
It was fairly simple, after looking at it some. I looked at preprocessor
output to find that `size_t' didn't get defined, saw how that was done in
djtypes.h, and looked at how string.h used the macro.
>Do you know which way is the
>proper way to call the _dosmemputl function? Should the parameters be
>(*buffer, num_32bit_words_to_move, *dest_addr) like it is in the
>prototype, or (*buffer, *dest_addr, num_...) like it is in all the
>provided examples.
The prototype is correct. (buffer, transfers, dest_addr)
But as somebody pointed out, using `dosmemput' and nearptr is
counterproductive. If you use nearptrs, then `memcpy' will work.
>-Greg
>
>P.S. This would be a fast way to transfer a double buffer, would it not?
Yup.
>Is there an extended ASM macro to move 32 bits at a time?
That's what `dosmemputl' does inside. The `rep movsl' instruction will move
%ecx 32-bit longwords from %ds:%esi to %es:%edi.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -