www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/03/06:29:32

Date: Tue, 3 Dec 1996 13:19:03 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
cc: DJGPP AT delorie DOT com
Subject: Re: Failures when writing to screen in v2
In-Reply-To: <48FCF22D58@fs2.mt.umist.ac.uk>
Message-ID: <Pine.SUN.3.91.961203131130.3994B-100000@is>
MIME-Version: 1.0

On Mon, 2 Dec 1996, A.Appleyard wrote:

>   I have a big Gnu C++ program which runs OK under v1. But in v2, when it
> writes to text screen, it errors thus, however big the runtime stack is:-
> 
>     Exiting due to signal SIGSEGV
>     Page fault at eip=0001dd94, error=0004
[snip]
>   What is the correct method with v2?

The same.  I didn't look long enough at your source, but it seems that it 
should have worked.  Can you see if that works in a plain C source?  If 
so, the problems might be caused by changes in the C++ compiler (since 
the C++ standard is still evolving, and GCC tries to track the changes).

> inline c_short operator[](int i) { c_short x; x.addr=addr+2*i; return x; };

Are you sure this is correct?  x.addr is a short, not class c_short, 
right?  But maybe I just don't know enough C++.

Anyway, the farptr functions work in v2 with C programs, that's a fact.

- Raw text -


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