Mail Archives: djgpp/1997/07/09/02:04:44
>void vgaBlitBuffer(BYTE *buffer)
>{
> int
> selector = _dos_ds;
>
> /* Synchronise with vertical retrace to avoid flicker */
> while ((inportb(IST1_ADDR) & 0x08) == 0); /* Wait for vertical retrace */
> while ((inportb(IST1_ADDR) & 0x08) == 8); /* Wait for end of retrace */
>
>#if 0
> /* Blit the double buffer */
> movedata(_my_ds(), (int) buffer, _dos_ds, 0xA0000, 320 * 200);
>#else
> asm("movw %%ax, %%es\n\t"
> "movl $0xA0000, %%edi\n\t"
> "movl $16000, %%ecx\n\t"
> "cld\n\t"
> "rep\n\t"
> "movsl\n\t"
> : /* no output registers */
> : "a" (selector), "S" (buffer)
> : "%eax", "%esi", "%edi", "%ecx");
>#endif
I don't think you have to put percent signs in front of your clobbered
registers. When I do inline stuff I never have to. Not sure if this
will have any effect but maybe gcc ignores percented register's
thinking they will be processed by gas? I don't know. Worth a try
maybe.
Lonnie McCullough
lonniem AT cs DOT utexas DOT edu
- Raw text -