home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os9
- Path: sparky!uunet!usc!sdd.hp.com!think.com!cass.ma02.bull.com!ladcgw.ladc.bull.com!orchard.la.locus.com!optimla!ron
- From: ron@optimla.aimla.com (Ron Moore)
- Subject: Re: getc() bug?
- Message-ID: <1992Aug27.172741.8294@aimla.com>
- Sender: news@aimla.com
- Nntp-Posting-Host: hematite
- Organization: OptImage Interactive Services L.P.
- References: <17h1seINNcj4@agate.berkeley.edu>
- Date: Thu, 27 Aug 92 17:27:41 GMT
- Lines: 21
-
- In article <17h1seINNcj4@agate.berkeley.edu> kientzle@beirut.berkeley.edu (Tim Kientzle) writes:
- >I had this odd bug in a program which I finally solved by moving some
- >calls to getc. From studying the effect on the assembly, it looks as
- >if getc() is trashing D1. This is using the libraries supplied with
- >the MM/1, which I believe are the OS9 2.3 libraries. Can anyone
- >confirm or deny that getc() has a problem? And, if so, can
- >anyone suggest a simple workaround (other than re-arranging the code,
- >preferably).
- > - Tim
-
- Howdy,
- All of the OS9 system calls reserve D1 for returning error codes on
- failure. Many support routines for system calls take advantage of this
- and use D1 as a temporary variable. How did this show up for you?
- The Microware compiler knows better than to rely on holding onto D1.
- Are you using GNU?
-
- --
- Ron Moore
- OptImage Interactive Services Co., L.P.
- uunet!aimla!optimla!ron
-