CA


Norbert Doerry
August 1999

CA is a cross assembler for generic 8 bit processors. It uses a lookup table for the assembly language instruction so that it can be device independent

   format:

   ca sourcefile -ooutputfile -d -fXXXX -pXXXX -T

   where sourcefile is the name of the source code file
         outputfile holds the cross compiler results
         -d sets the debug flag
         -f sets the outputfile format where XXXX is
              binary - binary data file
              hex    - each byte  is encoded into 2 ascii hex chars
              source - uses hex format, but includes source as comment

         -p sets the filename of the OpCode definition file (Default is 6502.OC)
         
         -S print the symbol table only, then exit

         -T print the opcode table, then exit

The OpCode definition file has the following format:

Lines beginning with ! are ignored

Opcode_Name  Opcode_Hexvalue  Opcode_Nbr_bytes Rel_Addr

definition of assembler directions

#include filename        ! includes the contents of the specified file
#debug   value           ! sets the debug flag to specified value
#string  label "string"  ! inserts the values of string at that location
                           with the specified label.  String can contain
                           ascii characters or the following codes:
                           \"  quote symbol (instead of end of string)
                           \\  slash sybol
                           \$xx inserts byte with hexadecimal value xx
                           \n  new line $0D

#byte   value            ! inserts byte with value 'value' at current
                           location.  value can be:
                           'c'     ascii character or code as in string
                           $xx     hexidecimal value
                           +label  higher byte of label address
                           -label  lower byte of label address
                           label   lower byte of label address

#define label value      ! creates an entry into the symbol table
                           value can be:
                           $xxxx   hexidecimal format
#address value            ! set the current address to the specified value

#fillto addr value       ! fills memory from the current address
                           up to and including addr with byte 'value'
                           addr must be of form $xxxx and must be greater
                           than current address.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. If you discover any bugs, or have any questions concerning these programs, please send me an email (doerry@aol.com)