This is the first public release of my adaption of CC65 for the Lynx.
It's available in it's original for on atari.archive.umich.edu in
/Atari/8bit/Cc65.

I've hacked up the compiler to compile under Watcom C v10.0.  It should
probably compile under pretty much everything else, unless it's overly
stingey about ANSI C, that is.

There are a few things that you should know:

- the compiled programs use some zero page space, right around $80-$95.
  see global.m65.

- ints are 16 bit, so are unsigned ints.

- chars are 8 bit, unsigned chars may not work quite right, I'm not sure.

- structs and unions don't hide their members from the world (ooh, that
  sounds disgusting!)

- function definitions are K&R, not ANSI.

- the default stack is 4096 bytes.  you can change it with the -s flag
  to the linker.  like this:

     link65 -b200 -s512 myprogram.obj

  this results in a program that loads at $200 and has a stack of 512 bytes.
  notice that the -b takes hexdecimal numbers and -s takes decimal.  sorry.

- the stack starts right above the executable program.  so if you underflow
  the stack you will be stomping on your program.  you've been warned.

- it's sort of slow.  if you want it to be even slower, use the xopt program
  which will make your program slower, but smaller.

- currently there isn't any floating point support or long integer
  support.

- don't even think about using any text output functions.

- or file handling stuff.

- look in demos/ to see some (simple/bad) examples of what you can
  do with this thing.  if you don't have wmake, well I might be
  persuaded to send you a copy (even though it's commercial, etc.)
  
- I've been using the extensions:

  .c65 - c files
  .m65 - machine code files
  .obj - object files
  .com - final linked programs  (don't try to run these under dos)
  
- the .com files have a 6 byte header:
  $ff $ff - a magic number to indicate .com file
  $ll $hh - program starts at $hhll in memory
  $ll $hh - high water mark that the program extends to in memory
  
- there's no argc or argv or environment, so don't try any funny stuff

- the C library is rather useless to us on the Lynx, since it all
  expects to be used on the 8 bit Atari home compuers (800, 400, XL, etc.)
  
- symbol names are very short (something like 8 or 10 letters.)

- if it totally sucks for you, sorry.

Well, that's all I can think of right now.  If you figure out why it
does not properly handle structs and unions I would be glad to know.
If you can think of some routines that you would like to see as part
of a Lynx specific library, let me know.

Don't forget that you can set CC65LIB to point to the location of your
runtime.obj, rtextra.obj and c.olb files.  Otherwise they need to be
in your current directory.

I also put the original documentation in docs/ where you can see what's
what.

Kurt Olsen
June 23, 1996.
