cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/22/04:55:15

From: "Protozone" <foster AT tig DOT com DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Error: cannot convert `regs' from type `REGS' to type `REGS *'
Date: Mon, 22 Nov 1999 18:17:33 +1100
Organization: The Internet Group Ltd
Lines: 49
Message-ID: <81aqis$8r4$1@toto.tig.com.au>
NNTP-Posting-Host: p17-max15.syd.ihug.com.au
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,
I'm trying out some basic graphics in DJGPP using a tutorial I found ( and
when compiling RHIDE gives me the error:
Error: cannot convert `regs' from type `REGS' to type `REGS *'
I was wondering if anyone could tell me what this means and (hopefully) how
to fix it... Here is the source:

#include <dos.h>
#include <bios.h>
#include <dpmi.h>
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <stdlib.h>
#include <go32.h>
#include <pc.h>
#include <sys/nearptr.h>

// Init VGA Mode Function Prototype
int init_vga_mode(void);

// Global Variables
char *vgamemory;
char *vgabuffer;

// Main Function
void main()
{
init_vga_mode();
}

// Init VGA Mode Function
int init_vga_mode(void)
{
union REGS regs;
__djgpp_nearptr_enable();
vgamemory=(char *)(0xA0000 + __djgpp_conventional_base);
if((vgabuffer=(char *)malloc(320*200))==NULL)
{
return(1);
}
regs.h.ah=0x00; file://Procedure 0x00: Set Video Mode
regs.h.al=0x13; file://The mode to set (0x# = #h)
int86(0x10, regs, regs); file://Call BIOS intr 0x10
return(0);
}



- Raw text -


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