www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/18/19:53:31

Xref: news2.mv.net comp.os.msdos.djgpp:5144
From: strider7 AT unm DOT edu
Newsgroups: comp.os.msdos.djgpp
Subject: Re: __dmpi_regs bug?
Date: Tue, 18 Jun 1996 14:29:10 -0600
Organization: University of New Mexico, Albuquerque
Lines: 48
Message-ID: <31C71196.7AE6@unm.edu>
References: <31C615A7 DOT 3FD4 AT ix DOT netcom DOT com>
NNTP-Posting-Host: ppp_023.unm.edu
Mime-Version: 1.0
To: Bob Platko <platko AT ix DOT netcom DOT com>
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019