[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C programming langauge on Apple II



 (mores_p@hotmail.com) writes:
> Hi!,
> 
> Do they (programmers) use C programming language on Apple II? (II+, IIe
> or IIc) I have the impression that most Apple II programmers normally
> use either Basic (I did on my Apple II days) or Assembly. I am not sure
> if it's correct.
> 
> Also, how do you rate C as a programming language on Apple II? Is it
> good? I ask because i consider myself now as a C programmer and it'll
> be great if i can use the language i am most skilled with to program my
> Apple II. 
> 
> Mark
> 

I can't address your question in respect to the Apple, but my first
C Compiler was for OS-9 on the Radio Shack Color Computer back in 1988.

I played with it a bit, but didn't go far.  With only floppy drives and
a 2MHz system clock, it was pretty slow to compile anything, which meant
I didn't play with it enough to get good.  And given that 8 bit computers
could only address 64K of memory, C programs tended to be large compared
to assembly language programs.  One example I remember well was a simple
program to clear the screen, a handful of bytes with assembly language but
the C program was in the thousands of bytes, because of the library.

Only this year did I really start to play with C again.  In part, because
I had need of a few things and I decided it was time to learn C.  One
thing that really excited me was that with a hard drive and a 1GHz clock,
compiling was a snap, basically instantaneous for the simple programs
I was trying.  ON that sort of system, it was as easy to fix things
as when using a BASIC interpreter on that old Color Computer.  I could
make mistakes and fix them almost immediately (admittedly not a factor
for those familiar with C).  The resulting programs may still be bigger
than the equivalent assembly program, but it has a 160gig hard drive
and 256megs of RAM, so that's not really an issue, unlike the old
8 bit systems.

Another factor is ease.  Most of the programming I've done was in assembly
language, actually a good portion was hand assembled, and it was on the 6502.
The instruction set was so simple, it was easy to remember the right
op-codes for the commonly used instructions.  Given taht, there is less
incentive to move to a C compiler on the 6502, other issues aside.  I
only felt a need to use an assembler when I moved to the CoCo, since
its 6809 CPU had a far more complicated instruction set.  That gets
even worse when you move to the 16-bit CPUs, and a C compiler starts
becoming more useful at that point.

Finally, a lot of existing programs one might want to compile would
result in a program way too big for the 6502's address space.  If
there aren't a lot of programs in C that you can use on the 6502, 
having source level compatibility is less of a factor than  today
when the same program can work on a Macintosh and on an MSDOS 
machine.

   Michael