[net.micro.atari16] YAMMB

braner@batcomputer.TN.CORNELL.EDU (braner) (09/05/86)

[]

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