PCW16 pages
Home -> CP/M -> PCW16 -> Cross-assembly

The PCW16: Cross-assembly

Here are my experiences of PCW16 cross-assembly using Z80ASM, the assembler in Udo Munk's Z80PACK. My host OS was Linux, but Z80ASM works under DOS if you compile it with DJGPP or Pacific C.

Before compiling Z80ASM, edit z80a.h, and change the #define SYMSIZE 8 line to #define SYMSIZE 32. This change is necessary because the Rosanne function names are not unique in their first eight characters. You might also want to change the #define OBJEXT line to ".prg" instead of ".bin".

The files in the Anne SDK (ROSANDOC.ZIP) are for a more sophisticated assembler than Z80ASM. You will have to remove all the macros, and replace sequences like:

xp_end	rb	1
xp_cold	rb	1
xp_end	equ	0
xp_cold	equ	1
replacing each sequence of rb 1 s with a list of increasing equ s. The RSSET line gives the number at which to start.

To get your file onto the PCW16 to test it, use the PCW16 to put a .PRG file on a floppy (for example, copy Wordcount from the rescue disc). Then replace it with the file you have been developing, keeping the same name (PCW000.PRG). You can add this to your Makefile with a command like:

	mcopy -noO test.prg a:/pcw/folder01/pcw000.prg