Date: Thu, 31 Oct 1996 08:05:26 +0200 (IST) From: Eli Zaretskii To: Neil Miller Cc: djgpp AT delorie DOT com Subject: Re: Help!! What's wrong with my code?? In-Reply-To: <01bbc6cf$711bd540$21d10bce@miller> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 31 Oct 1996, Neil Miller wrote: > I am new to using DJGPP and am trying to use Denthor's VGA trainers to > program graphics in 13h. This is the code I have so far. This is from the > first tutorial. I am getting errors on _AX (from SetMCA & SetText) > something about the function is not declared?? The code you posted is specific to Borland/Turbo C, it won't compile with any other compiler. Instead of this: > _AX = 0x0013; > geninterrupt (0x10); use this: #include #include __dpmi_regs r; r.x.ax = 0x0013; __dpmi_int (0x10, &r); > The other is vga, in the > tutorial it says it is a pointer to the address 0xa000, is this automatic > or do I have to do something with it?? Any help would be appreciated. This is too long to explain here. Please download the DJGPP FAQ list (v2/faq202b.zip from the same place you get DJGPP) and read Chapter 18 there. Accessing absolute memory addresses is done differently in DJGPP because of memory protection (this is what protected mode is all about!). The following excerpt from your code will most probably crash your program: > void CLS() { > memset(vga, Colour, 0xffff); > }