• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/H03-May-2022-11382

examples/H03-May-2022-2,6462,341

loader/H03-May-2022-1,045921

man/H09-Nov-2019-1,3021,231

misc/H09-Nov-2019-1,8931,485

src/H26-Nov-2021-6,8945,032

tests/H15-Dec-2020-4,9984,121

vstudio/H03-May-2022-1,1271,120

COPYINGH A D09-Nov-201917.6 KiB341281

ChangeLogH A D03-May-202012.8 KiB366265

MakefileH A D25-Nov-20211.5 KiB7040

README.1stH A D09-Nov-20195 KiB11784

TODOH A D09-Nov-2019284 116

README.1st

1This is the readme for xa, a cross-assembler for the 6502 and 65816 CPUs (and
2derivatives). xa is a small, fast, portable two-pass assembler that compiles
3under most ANSI C compilers. It is distributed under the GNU Public License
4(see COPYING).
5
6The current version is 2.3.10, a bug fix to the long-lived 2.3.0, itself with
7compatibility improvements and new man-based documentation. It also completed
8the merge of the 65816 and 6502/R65C02 versions and thus the current xa can
9generate code for all targets now.
10
11To install on a generic Unixy thing, you should be able to just type
12
13	% make # to build the executable, and if it works ...
14	% make test # if you have Perl, make and prerequisites, otherwise
15	% make install # to install man pages and binaries into the system
16
17This will create xa along with its various support utilities. Try assembling
18the cpk depacker in examples/ as a test. xa also comes with uncpk (a program
19for generating cpk archives) and printcbm (a program for listing Commodore
20BASIC test) and file65, ldo65 and reloc65 for displaying, linking and
21relocating o65 files in Andre's relocatable format (see doc/fileformats.txt).
22The loader/ directory also has goodies for managing relocatable binaries.
23
24Don't forget the man pages in man/. Install these into your MANPATH at your
25leisure, or read them with nroff -man (and/or groff -man).
26
27xa is no longer broadly supported outside of Unix due to my inability to test
28it, but has nothing that should impair it from compiling elsewhere. To wit,
29DOS compilation is still supported with the GO32 package. You should just be
30able to type
31
32	C:\> make dos
33
34In addition, there are compatibility updates to allow it to compile under
35Microsoft Visual Studio and mingw. It should compile under VS2005 as written;
36look in the vstudio directory for solution and project files provided by
37Fabian Nunez. For mingw, use
38
39	make mingw
40
41Similarly, Amiga and Atari ST compilation should still also function with
42their particular compatible packages.
43
44xa has a companion disassembler, the dxa package. dxa is not included in the
45standard xa distribution, but can be downloaded from the xa home page at
46
47	http://www.floodgap.com/retrotech/xa/
48
49Please check by periodically for the latest version of both packages.
50
51xa was originally written and maintained by Andre Fachat. The current version
52is maintained by Cameron Kaiser.
53
54Please send me your comments at ckaiser@floodgap.com -- Andre's original
55readme follows and applies generally to the present version.
56
57-------------------------------------------------------------------------------
58
59XA is a 6502 cross compiler:
60
61 - under GNU public license
62
63 - can produce _relocatable_ binaries
64
65 - The full fileformat description and 6502 file loader included.
66
67 - also included relocation and info utilites, as well as linker
68
69 - for any ANSI-C compliant computer (only utilities need 'stat' call
70   for file size).
71
72 - fast by hashtables
73
74 - Rockwell CMOS opcodes
75
76 - running under DOS and any ANSI C system (Unix, Amiga, Atari ST)
77
78I developed this cross assembler for the 6502 CPU family quite some time
79ago on my Atari ST. The assembler has successfully been ported to Amiga
80and Unix computer (ported? just compiled... :-)
81Lately I came across the problem to need relocatable 6502 binary files, so
82I revised the assembler from version 2.0.7 to 2.1.0, adding a (admittedly
83proprietary) 6502 relocatable binary format. But there are not many other
84formats around and they didn't fit my needs. I have developed this format
85myself and it is under the GNU public license.
86With version 2.1.1 the 'official' version of the fileformat is supported.
87
88To compile it, just type "make" (if you have the GNU gcc. If not, edit the
89Makefile for the compiler options). This produces "xa", the cross assembler;
90"uncpk", a small packing utility (where the C64 counterpart is in the
91examples subdirectory), "printcbm", that lists C64 BASIC files and
92'file65' that prints some information about o65 files.  The "loader" in
93the loader subdirectory is a basic 6502 implementation of a relocating
94binary loader.
95"file65" prints file information on 'o65' relocatable files. "reloc65"
96can relocate 'o65' files.
97
98If you want to use it under DOS, you have to have the GO32 DOS crosscompiling
99tools to compile. Then just type "make dos" and you'll end up with the
100appropriate DOS binaries. This has been tested only under i386 Linux, however.
101Another archive with the DOS binaries included is provided.
102
103One problem on the Atari was it's broken "malloc". Therefore I used to
104alloc everything in one chunk and divide the memory by hand. So everything
105was kind of statically allocated. This is almost gone now. Only the
106temporary storage between pass1 and pass2 and the preprocessor are still
107allocated in one chunk (size definitions in xah.h). The rest is allocated
108as needed.
109
110The docs are in the 'doc' subdir. There also is a description of the
1116502 relocatable binary format. If you think some things could be
112expressed in a better way, feel free and mail me to improve my english ;-)
113[ The documentation is now maintained in man(1) format in man/ . -- CK ]
114
115Andre
116
117