Mail Archives: djgpp/1996/06/18/19:53:31
Bob Platko wrote:
>
> I been having some problems trying to get some
> basic VESA information from my video card via
> bios calls in DJGPP's C complier. My modified
> Borland 3.0 code gets the information correctly,
> as specified by the DOS graphic utilities I
> have. Yet, with using the __dpmi_regs, I have
> had some problems getting other bios calls to
> work properly. (text stuff like moving the
> cursor on the screen, clearing the screen,
> writing characters to the screen, etc..,
> which did not work properly, but DID work
> using the int86 function.)
>
> Does anybody know what is causing the incorrect
> information about VESA video mode 0x103? (When
> I ran it, it said I don't have an A or B window.
> This contadicts the Borland compiled version, and
> the utilities I used to test it.)
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <pc.h>
> #include <dpmi.h>
> #include <go32.h>
> #include <dos.h>
>
> #define TRUE 1
> #define FALSE 0
>
> #define BYTE unsigned char
> #define WORD unsigned int
> #define DWORD unsigned long
in djgpp, an int is 32-bit, 4-bytes, DWORD, and a long is the same thing.
'short' on the other hand is 16-bit, WORD:
#define BYTE unsigned char
#define WORD unsigned short
#define DWORD unsigned int
this is what probably messed up your results.
--
http://www.unm.edu/~strider7
<strider7 AT unm DOT edu>
- Raw text -