delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/17/05:24:02

MBOX-Line: From owner-djgpp-list AT delorie DOT com Wed Dec 4 07:12:07 1996
Date: Tue, 3 Dec 1996 13:19:03 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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
Status: O
To: alex AT adam DOT com DOT au

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.

--------------------------------------------.
| Orlando Andico                email: orly AT gibson DOT eee DOT upd DOT edu DOT ph |
| IRC Lab/EE Dept/UP Diliman   http://gibson.eee.upd.edu.ph/~orly |
|  "through adventure we are not adventuresome" -- 10000 Maniacs  |
`-----------------------------------------------------------------'

- Raw text -


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