🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.6809
Article #713

Re: Microware C Compiler Bugs

#713
From: Neal Sedell
Date: Mon, 23 Jun 1986 18:49
36 lines
2101 bytes
In article <204@vaxb.calgary.UUCP>, ingoldsby@calgary.UUCP (Terry Ingoldsby) writes:
> I've been meaning to do this for some time, but have never gotten around
> to it.  I was wondering how many people have found bugs in the Microware
> OS9 C compiler, specifically the CoCo implementation sold by RS.  I've
> found at least one:
> 
   Now that you mention it, I did run into a compiler bug with '&' too.
I wanted to mask all but the lower 8 bits of an int:

	#define byte_mask 0xFF
	.
	.
	.
	if ( integer_array[index] & byte_mask )
		{ don't bother putting code here :-}


   Looking at the asm output revealed that the wunnerful compiler performs
the '&' by loading the D Register with the expression and doing a CLR A,
ALWAYS setting the zero flag and thus the IF evaluates false.  Of course
the workaround is simply inserting a compare with zero in the if clause.
I sent the good people at uWARE mail on this about a year ago and the
resounding silence convinced me that they assume no responsibility for
the compiler R-S sells, as it would seem R-S does ;-)  Keep those
interesting snafus coming.

   Oh yes, I'm about to attempt a SASI driver.  I have a COCO host adapter 
prototyped, a Xebec controller and a SA606 8M disk all ready to go.  After
I get moved and a few other things out of the way and assuming I get it
done before I will lose net access in two months... :-(


			Neal Sedell

-- 
 {zehntel | uw-beaver | reed | hp-pcd | hplabs | decvax}!tektronix!tekigm!neals
Technical Details
Message-ID: <817@tekigm.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!nike!ucbcad!ucbvax!hplabs!tektronix!tekig5!tekigm!neals
References: <204@vaxb.calgary.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!nike!ucbcad!ucbvax!hplabs!tektronix!tekig5!tekigm!neals
From: neals@tekigm.UUCP (Neal Sedell)
Newsgroups: net.micro.6809
Subject: Re: Microware C Compiler Bugs
Message-ID: <817@tekigm.UUCP>
Date: Mon, 23-Jun-86 14:49:20 EDT
Article-I.D.: tekigm.817
Posted: Mon Jun 23 14:49:20 1986
Date-Received: Thu, 26-Jun-86 03:19:19 EDT
References: <204@vaxb.calgary.UUCP>
Organization: Tektronix, Vancouver WA
Lines: 36
Keywords: C Compiler Bugs
Summary: ddd