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.