Mail Archives: djgpp/1995/09/04/18:26:35
Timothy Wilson <wilsont AT rahul DOT net> writes:
> Hey, it works, here is the code AGAIN!!
>
> _go32_dpmi_registers regs;
> unsigned short dos_sel;
>
> void gfx_mode(char mode)
> {
> dos_sel=_go32_conventional_mem_selector();
> regs.x.ax=mode;
> regs.x.ss=regs.x.sp=0;
> _go32_dpmi_simulate_int(0x10, ®s);
> }
>
> This DOES work, I use it DAILY!!!
I'm sure it does, but that's not the code to which people are
referring. Here's that code, verbatim, from a previous post by you:
> I don't do any of that, for both 1.6 and 2.0 I've used:
> char * screen
>
> screen=(char*)0xa0000;
>
> screen[x+y*320]=somecolor;
>
> As long as I set stuff up with a INT 10 call it works fine, no need
> to muck with this near/far pointer crapola. *bleh* This is GCC
> after all, not DOS. :)
The technique indicated in this code won't work (under DJGPP), which
is what the other poster discovered when he tried to write a test
program based on your advice.
-Mat
- Raw text -