Compiling CaS
-------------

To compile CaS for yourself, first copy the desired makefile to `Makefile':

     Makefile.dj        DJGPP (dos)
     *.PRJ              Turbo C (dos)
     Makefile.nix       UNIX systems (tested on Linux).

then run `make'.  If there are any nasty object files lying around, then
run `make new'.  If you use a compiler other than gcc, you may need to
fiddle with the Makefile.

  As I or others test CaS on more systems, more tailored Makefiles are
sure to be created.

Unix users will have to remove all the CRs from the source .h and .c files.
It is likely that you will have a utility for doing this (eg fromdos),
otherwise you can use "tr -d '\015'"

  CaS is written entirely in ANSI C (As far as I can see), and so should be
quite portable.  Just make sure char is 8 bits for the file accesses.


Serial Comms
------------

If you are compiling under djgpp, and want to compile CaSport, you will
first need to compile the serial library in SVASYNC.ZIP.  Unzip this with
the -d parameter in your DJGPP directory, and Make it wherever the Makefile
ends up.  This is not included due to the silly size of the resulting library.

(Don't worry, CaS `strips` very nicely!)

You should be able to get updates to svasync from:

  ftp://ftp.delorie.com/pub/contrib/

* Turbo C users have the required object file AYSNCL.OBJ in the Project file.

* Unix users have all the comms routines within cunix.c.  Note that these
  are not very good, and so you are *very* welcome to improve them for me :)

CaS source files
================

   cas.h        General defines and abstract data structures.  Also includes
                all major standard header files.  Req'd by every .c file.
 
   main.[ch]    command line parsing, main program flow -- calls input, list
                and output routines according to parms

   misc.[ch]    Miscellaneous utility functions (not casio specific at all)
                eg wrappers for printf, malloc and fopen.  Hash and wildmat
                functions.

   args.[ch]    Routines for processing arguments lists for the -i, -l and
                -o switches; eg -l,inverse.  Also includes some routines
                to keep main()'s cmd line processing cleaner.

   token.[ch]   Token file parsing routines, plus translation of token to
                ctoken.

   list.[ch]    Routines for listing casio data.

   ssconv.[ch]  Algorithm to transform screenshots into programs which draw
                them.

   s9700.[ch]   Converts CaS's internal data structures to/from transmission
                format data structures (old style: 7700/9700/9800).

   s9x50.[ch]   Same as c9700, but converts to/from the new style
                transmission format.  (9850/9950)

   ftxt.[ch]    Routines for reading and writing .TXT files to and from
                CaS's internal data sytructures.

   ffxp.[ch]    Routines for reading and writing .FXP single program files.

   fbmp.[ch]    Windows 3.0 RGB Bitmap (.BMP) reading and writing functions.

   fgif.[ch]    GIF file writing routines (no reading supported).

   fcas.[ch]    Routines for reading/writing .CAS format files.
                
   fcom.[ch]    Communicates files to/from the calculator.

   commsys.h    Communications subsystem:
                + cdjgpp.c  - routines for djgpp
                + cturboc.c - rotines for Turbo C
                + cunix.c   - POSIX (I think) routines for Unix systems.

   libsv.a      SVASync communications library for DJGPP.

   asyncl.obj   ASync communications library for Turbo C.

Other Utilities
---------------

 tokcheck.[ch]   main() for the tokcheck program

 castrate.[ch]   main() for the castrate program

 vardump.c       dumps A-Z memory .CAS files

 mkalltok.c      utility to create a text file containing every token.


TW 96/11/14
