🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari16
Article #1702

YAMMB (yet another Megamax bug)

#1702
From: braner
Date: Fri, 05 Sep 1986 03:46
22 lines
1421 bytes
[]

Seems that the assembler built into the Megamax C compiler has a bug:
BRA.S n(PC) with a negative n yields pretty much random code. The same
holds for Bcc.S.

Note the absolute displacement.  I am not sure if it works right with labels.
Changing it to a word displacement (BRA instead of BRA.S) fixes it.

Usually you would use labels, and also use just plain BRA.  The mmimp
program can then be used to convert branches to short ones where possible.
But the fun starts when you mmdis-assemble some existing .o file for
which you don't have the source...

There is also a bug in the disassembler: very large numbers (32-bit)
are sometimes displayed as garbage characters, e.g.

	AND.L #)(&.)/(*.)(,D0

(Conclusion: don't buy a compiler until it's perfect - and obsolete :-)

- Moshe Braner
Technical Details
Message-ID: <973@batcomputer.TN.CORNELL.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!nbires!hao!hplabs!tektronix!uw-beaver!cornell!batcomputer!braner

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!nbires!hao!hplabs!tektronix!uw-beaver!cornell!batcomputer!braner
From: braner@batcomputer.TN.CORNELL.EDU (braner)
Newsgroups: net.micro.atari16
Subject: YAMMB (yet another Megamax bug)
Message-ID: <973@batcomputer.TN.CORNELL.EDU>
Date: Thu, 4-Sep-86 23:46:50 EDT
Article-I.D.: batcompu.973
Posted: Thu Sep  4 23:46:50 1986
Date-Received: Sat, 6-Sep-86 00:00:34 EDT
Reply-To: braner@batcomputer.UUCP (braner)
Organization: Theory Center, Cornell University, Ithaca NY
Lines: 22
Summary: Don't use BRA.S -n(PC)