Date: Mon, 22 Nov 1999 13:24:37 +0200 From: Marius Myburg Subject: Re: Error: cannot convert `regs' from type `REGS' to type `REGS *' To: djgpp AT delorie DOT com Message-id: <0FLL00LEGJR9OU@cpt-proxy1.mweb.co.za> MIME-version: 1.0 X-Mailer: Microsoft Internet Mail 4.70.1154 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-MSMail-Priority: Normal X-Priority: 3 Reply-To: djgpp AT delorie DOT com Instead of int86(0x10, regs, regs); try int86(0x10, ®s, ®s); I hope I explain it correctly, but here goes anyhow: If you declare union REGS regs, regs is a pointer to a memory location, not the data contained at the memory location. The & means "use the data pointer to by the following pointer, not the pointer itself". I may be wrong, but I may be right. Marius Myburg ---------- > From: Protozone > To: djgpp AT delorie DOT com > Subject: Error: cannot convert `regs' from type `REGS' to type `REGS *' > Date: Monday, November 22, 1999 9:17 AM > > 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 > #include > #include > #include > #include > #include > #include > #include > #include > #include > > // 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); > } > >