delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/14/04:55:29

Date: Thu, 14 Aug 1997 11:53:25 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Temujin <temujin AT sentex DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: General fault error on a simple i++
In-Reply-To: <33F1DFF3.56E1@sentex.net>
Message-ID: <Pine.SUN.3.91.970814115255.6734L-100000@is>
MIME-Version: 1.0

On Wed, 13 Aug 1997, Temujin wrote:

> Okay, made a program that works fine putting an image to the screen
> pixel at a time. when I try to put a simple i++  into a for loop to make
> the image display right (320/200 onto a VBE 2.0 640/480) I get a general
> protection error.. ON THE simple  i++ command  why would it do this?  is
> DPMI just that touchy?

Please make a point of posting the code fragments that give you
trouble.  It makes the report much more specific and will usually
yield many more accurate solutions to your problems.  If you can write
a complete program that crashes in the same way and is short enough to
post here, it is even better, since then people could try to compile
it and see where does it crash.

> And when programming under DPMI  is there a memcpy that works?  I've
> tried the dosmemset and memcpy and BOTH give me a general protectino
> error or REboot my machine. (copying from a memory block created with
> malloc over to a linear frame buffer)

Once again, please show the code that you tried to use.  `memcpy' and
`dosmemget'/`dosmemput' both work, but if you use them incorrectly,
your program will crash because of the memory protection featured by
DJGPP.

You might also consider reading Chapter 18 of the DJGPP FAQ list
(available as v2/faq210b.zip from the same place you get DJGPP) which
explains some of the related issues at greater length.

- Raw text -


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