Mail Archives: djgpp/1998/12/22/09:45:38
Simon writes:
> I am going away for a few days and have borowed an old
> 386 laptop for coding (yes I know its ridiculously slow) but I need
> to use it, anyway I have probems setting any screen mode from
> the dpmi int code such as :
>
> #define SET_MODE_FUNCTION 0x4F02
> #define VIDEOBIOS 0x10
>
> void SetVideoMode(int mode){
> __dpmi_regs registers;
>
> registers.x.ax=SET_MODE_FUNCTION;
> registers.x.bx=mode;
> __dpmi_int(VIDEOBIOS,®isters);
> }
You are calling a VESA function (int 0x10, ax=0x4F02), but the chances
are that you don't have any VESA driver installed on this machine.
Either get a VESA driver, if one exists for this machine, or use
standard video BIOS routines instead. Mode 0x10 is a standard VGA
resolution, so there is no need to be calling VESA at all for this.
Try something like:
__dpmi_regs r;
r.x.ax = 0x10;
_dpmi_int(0x10, &r);
Shawn Hargreaves.
- Raw text -