[Color Computer] [coco] Learning MW C

Carey Eugene carey at cebridge.net
Sat Aug 12 00:07:22 EDT 2006


From: "George's Coco Address" <yahoo at dvdplayersonly.com>


> For several years, I've been wanting to learn "C" .. the one that comes
> with OS-9.
>
> The hang up is peeks and pokes. I can't find a way to do this with "C".


The other replies have already told you how to do the equivalent of peek & 
poke, however I have just got to add a few things.

First, I'm not so sure it's a good idea to learn that old MW C.  It's a 
limited form of K&R style C.  It doesn't meet the current 1999 ISO C 
standards, or the 1989 C standards.  It doesn't even completely meet the old 
K&R unofficial C standards.  It has some limitations and quirks due to it 
being an 8 bit compiler.

Microware's C compiler was the first version of C that I learned, and when I 
later switched to a more modern compiler, I had a lot to unlearn and 
re-learn.

Now, having said that, if you want to learn it and use it, go ahead....

But, unless you are planning on doing something rather unusual, like 
accessing hardware directly, you shouldn't really need 'peek' and 'poke'.

C can do that sort of thing, and about anything else.  But C prefers that 
you deal with more abstract data types.  Arrays, structures, pointers to 
them, etc.

Never directly 'peek' and 'poke'ing data.  You can do it.  But you rarely 
will need to do it.  If you do, then you are probably doing something 
'wrong'.  (Like writing ASM style code in BASIC, Fortran, PASCAL or C... You 
can do it, but it'll look ugly, be awkward and wont take advantage of the 
features and abilities of the language.)

I'd suggest you browse the web for a few good free C tutorials.  (Just be 
aware that whatever you find will likely be for ANSI / ISO C, rather than 
the older K&R C.  If you browse hard enough or search the p2p networks, you 
might be able to find a scanned copy of the Kernighan & Ritchie's original 
K&R C book.)


If you are so inclined, you might browse the web for a warez copy of Turbo C 
or Microsoft Quick C.  These were back from the days of DOS.  (I never trust 
warez, so don't run them directly.  Instead, see if you can get them to work 
in the opensource DosBox program, or set up a Qemu emulator with DOS.)

You could also download a legit copy of Turbo C 2.0 from the Borland 
community museum.  I've never used it, so I don't know how good of an IDE it 
has or what kind of online help.

I don't know of any other old k&r compilers with IDE's.


The point is, that way you'd have a somewhat usable IDE, with some online 
help, a compiler that will help you learn K&R C, rather than the simple 
command line compiler of MW c.







More information about the Coco mailing list