Mail Archives: djgpp/2000/05/20/07:15:18.1
I think you've got the same problem as I had a month ago. I also used "g"()
for everything. And that was incorrect. You should refer to
Brennan's Guide to Inline Assembly
and avoid the "g"() way described in
DJGPP QuickAsm Programming Guide (I had a lot of trouble with it).
Both docs are located at DJGPP web-site.
--
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
"Thomas J. Hruska" wrote:
>
> Hello, I am doing that inline ASM thing...again. The situation is that I
> am trying to speed up screen dumps from a buffer to the video buffer using
> far pointers. The idea here is to perform the buffer copy using only one
> far pointer reference and a rep. So, I loaded esi, edi, and ecx with the
> appropriate values (I hope). After clearing the direction flag, I followed
> <sys/farptr.h>'s example for moving data (hence, the .byte 0x64). However,
> the problem comes in that rep movsl (or movsd, movs, movll, movb, movsb,
> mobsbb, etc.) does not assemble. The objective is to get the framerate up
> from 48 fps to 60 fps (maybe 70 fps) with this code. NOTE: The current
> selector is _dos_ds when the inline ASM executes (also, assume that y =
> 0x10000, x = screen_width * screen_height, x2 = 0).
>
> __asm__ __volatile__ ("
> pushl %%esi
> pushl %%edi
> movl %0, %%esi
> movl %1, %%edi
> movl %2, %%ecx
> cld
> .byte 0x64
> rep movsl
> popl %%edi
> popl %%esi"
> :
> : "g" (&CurrMode.Buffer[x2]), "g" (0xB0000 - y), "g" ((x - x2) %
> 0x10000));
- Raw text -