delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/26/17:50:09

From: "Bob Platko" <platko AT ix DOT netcom DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: -ansi option, __tb don't work?
Date: 25 Jan 1997 20:12:29 GMT
Organization: Netcom
Lines: 36
Message-ID: <01b9cc8f$e8249320$b487d6ce@platko.ix.netcom.com>
NNTP-Posting-Host: clv-oh15-20.ix.netcom.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I decide to rewrite my graphics library using 100% ANSI C only.

The problem is that the DJGPP throws a bunch of error messages when I try
to use
__tb or __dpmi_regs, and __djgpp_conventional_base.

The following code works perfectly fine without the -ansi option:

#include <dpmi.h>
#include <go32.h>


VESA_INFO GetVesaInfo(void)
{
  /* Determines if VESA compatible by returning
   * a structure contain information about the video card.
   */
  static VESA_INFO Info;
  static __dpmi_regs r;

  r.x.ax = 0x4F00;
  r.x.di = __tb & 0x0F;
  r.x.es = (__tb >> 4) & 0xFFFF;
  dosmemput(&Info, sizeof(VESA_INFO), __tb);
  __dpmi_int(0x10, &r);
  dosmemget(__tb, sizeof(VESA_INFO), &Info);
  return Info;

}


How do I rewrite this so it will compile (and work) under the -ansi option?


BP

- Raw text -


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