Mail Archives: djgpp/1995/03/10/23:15:36
>void getmodeinfo (word mode)
>{
> _go32_dpmi_registers r;
> _go32_dpmi_seginfo sinfo;
>
> sinfo.size=(256+15)/16; /* Need 256 bytes */
> _go32_dpmi_allocate_dos_memory(&sinfo); /* grab some DOS memory */
> memset(&r,0,50); /* zero out the registers */
> r.x.ax=0x4f01; /* select mode info int */
> r.x.cx=mode; /* set up registers */
> r.x.ss=r.x.sp=0;
> r.x.di=sinfo.rm_offset; /* point segments to */
> r.x.es=sinfo.rm_segment; /* buffer in DOS mem */
> _go32_dpmi_simulate_int (0x10,&r); /* generate interrupt */
> dosmemget(sinfo.rm_segment*16, 256, (void *)&vesainfo);
>}
Remember to set the flags portion of the registers struct to zero.
- Raw text -