[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C programming langauge on Apple II
In article <1156133565.964730.91130@b28g2000cwb.googlegroups.com>,
Eric <englere_geo@yahoo.com> wrote:
> 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.
:-) ....well that depends on who you are....
The reason I chose the Apple II as my very first personal computer was
partially its floating-point properties: Applesoft gave 9-10 digits of
precision in its floating-point. Most other personal computers gave
only 7 digits of precision, which was too little for some of my needs.
And I was used to 10 digits of precision on the HP programmable calculators
I had used earlier, and I wasn't prepared to downgrade that to get a
computer.
The reason I later went from the Apple II to the PC, rather than to the
Mac, was also related to floating-point: even the earliest PC's had a
socket for the 8087 floating-point coprocessor, which greatly speeded
up floating-point math. Early Mac's lacked a socket for the 68881
floating-point coprocessor - it wasn't added until the Maciotosh II.
And then the software support of hardware f.p. was lackluster: you had
to use SANE, the compilers didn't generate f.p. coprocessor instructions
inline.....
If I hadn't felt any need to use my computers for actual computing :-)
(i.e. if I normally hadn't needed floating-point), my choices might have
been different....
> 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
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/