Mail Archives: djgpp/1997/09/01/16:02:28
In article <Pine DOT OSF DOT 3 DOT 96 DOT 970819023856 DOT 6408A-100000 AT alpha DOT hut DOT fi>,
Samuli Takala <tax AT cc DOT hut DOT fi> wrote:
>Problem here is that we are dealing with a 32-bit compiler so the size of
>'int' is 32-bits. So to get the right offset to the screen_y array, you need
>to multiply y by 4, not by 2:
> shll $2, %%ebx
>
>> addl %%ds:_screen_y(%%ebx), %%edi
>> movb %%al, %%es:(%%edi)"
>> : /* no outputs */
>> : "g" (x), "g" (y), "a" (col), "g" (_dos_ds), "D" (0xA0000)
>> : "eax", "ebx", "edi"); }
>
Right, but GCC is smart enough to turn a *320 into a shift and lea. No
multiply will occur. Skip the table stuff.
Brennan
--
brennan AT rt66 DOT com | "Developing for Windows is not fun." -- John Carmack
Riomhchlaraitheoir|
Rasterfarian | <http://brennan.home.ml.org> -O
- Raw text -