Mail Archives: djgpp/1996/03/05/10:34:35
On Sat, 02 Mar 1996 19:53:42 -0800 Chris Dial wrote:
>
> /* So how come this does not send one byte to 'screen2'? */
> asm ("
> pushw %es <---- skip!
> movw _our_global_selector,%es <--- skip!
why on earth use _dos_ds to access *program's* data? We have our
good old DS for that!
> movl _screen2,%edi
^^^^ here's another bug. Use `leal _screen2,%edi' or `movl $_screen2,%edi'
> movb $255,%es:(%edi)
^^^ - skip that stuff.
> popw %es <--- skip!
> ");
>
And don't forget to restore *all* registers you clobber in your inline
asm unless you specify them in "clobberred registers" field after the
third colon (see info on inline asm syntax).
> return 0;
>};
>
>
>-Chris Dial
Martynas Kunigelis
- Raw text -