[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C programming langauge on Apple II
Leor Zolman wrote:
> I never played with an Apple II, but I do recall learning that the 6502
> had an 8-bit stack pointer... which meant that the usual way of
> implementing automatic storage, on the stack, wouldn't be possible...
The traditional method of doing this on a 6502 is to implement your own
stack pointer using 2 bytes in page 0. This is much less efficient than
using a 16 bit native SP, but it works when there are no better
options.
cc65 is quite good. It doesn't have floating point, but you normally
don't need that. And as someone mentioned, you can't run the compiler
itself on a 6502 - it's only a cross-compiler that can run on linux and
Windows and generate code that can run on a 6502. They have custom
support for the Apple II and several other computers (C64, etc). It's
also undergoing active development, which is always a good thing.
I think one of the big 6502 assembler makers also made a C compiler
(Orca or Merlin), but I think it required ProDOS, and may even have
required an Apple IIgs. I never tried it myself.
Leor, didn't you write BDS C in 8080 assembly language? As I recall it
was faster than the alternatives, and perhaps the best overall 8-bit C
compiler. I think I saw that you've also opened the source for it, so
I'll have to check on it for old times sake.
UPDATE: as I was writing this message I found this link from Google.
Very cool site for BDS C. Thanks much Leor! If you're ever in the
Atlanta area I'll buy you a beer!
http://www.bdsoft.com/resources/bdsc.html
Eric