From: utzoo!watmath!watarts!bernie
Newsgroups: net.micro.atari
Title: Re: 6502 compilers
Article-I.D.: watarts.1667
Posted: Fri Feb 11 09:30:23 1983
Received: Sat Feb 12 00:40:00 1983
Reply-To: bernie@watarts (Bernie Roehl)
References: utcsrgv.940

I have not actually seen the C/65 compiler in operation, but have heard
from several sources that it's a (small) subset of the language.  Your
observations about design tradeoffs in the 6502 architecture are valid.
However,
	1. Doing any kind of 16-bit operations on the 6502 is still
		extremely inefficient; for example, adding two 16-bit
		signed integers requires several instructions, whereas
		a processor like the Z-80 can do 16-bit signed adds with
		a single 1-byte instruction.
	2. The stack on the 6502 is 8 bits wide and a fixed 256 bytes
		deep.  Since you want to keep intermediate results of
		calculations on the stack, as well as local vars and
		arguments to functions, you quickly run out of stack
		space.  The solution you suggest (a software stack) is
		fine, but slow and inefficient compared to a machine with
		a  real stack.
	3. The 6502 has been around a *long* time, and is widely used
		(apple, pet, atari...).  Yet in all this time and with
		all the demand for good software for the chip, no one
		has implemented any native-code compilers for the 6502.
		To me, this says something about the capabilities of the
		chip.  Even the 6800 has native-code compilers for it!
		(Granted, they're not very good, and produce terrible
		code, but at least they exist!)

The 6502 is a fast, cheap, widely used processor.  It is well-suited to
simple applications.  It is *not* suitable for supporting high-level
languages.
 				--Bernie Roehl
				...decvax!utzoo!watmath!watarts!bernie