Mail Archives: djgpp/1998/03/01/19:18:52
At 01:44 2/28/1998 -0800, Peter Jakubowicz wrote:
>Hi,
>Wld someone be kind enough to tell me why this doesn't compile w/ gcc. I
>know other ways to plot a point in 16 colors. I'm actually just curious what
>is wrong here and too addled to figure it out myself
>Thank you
>
>
>void plot(int x, int y, int color)
>{
> #define graph_out(index,val) {outp(0x3CE,index);\
> outp(0x3CF,val);}
> int dummy,mask;
> char far * address;
> address = (char far *) 0xA0000000L + (long)y * xres/8L +
> ((long)x / 8L);
Because you're not in real mode any more. :) Such absolute pointer accesses
don't work from protected mode, and GCC has no such thing as a `far'
keyword. See section 17.7 of the FAQ for ways to access conventional memory.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -