:

Documentation for conversion of ZCPR33 for assembly by ZASM

                                                        05/21/87
                                                        Michal Carson

These files are gathered here and distributed in order that the
most popular command processor replacement for eight-bit machines
might be compiled by a public domain assembler.  The people of
Echelon, Inc. are good enough to distribute the source code of
ZCPR v3.3 free of charge over public bulletin boards; it is
important that an assembler for those files be as easily
accessible.
 
The Cromemco Macro Assembler v3.04, popularly known as ZASM, is
one of the most dependable and widely circulated Zilog mnemonic
assemblers (in spite of the lack of original documentation).  




With ZCPR version 3.3, Jay Sage and Echelon made an attempt to
produce code that was not compiler-specific.  This release has
achieved that goal better than any previous official or unofficial
release of the command processor.  Thus, the task of conversion
for ZASM was simplified.

There remain in the body of the code only a few unrecognized
pseudo-ops and a handful of over-long labels.  A Zex script
(compatible with Ex14 and maybe with its successors) is included
here to change the pseudo-ops and shorten the labels.  It will
require Eric Gans' FinRep24 which is also available in the public
domain.  

 
The script and FinRep will make a copy of ZCPR33.Z80 on the first
pass; subsequent passes of FinRep will operate on the new file,
Z33ZASM.Z80.  This will require at least 372K of disk space (three
copies of the source code).  The intent is to preserve ZCPR33.Z80
at least until the modifications are complete.  If this space is
not available, rename ZCPR33.Z80 to Z33ZASM.Z80 and edit the
script (delete the reference to ZCPR33.Z80 in the first line)
before you begin.  If you are limited to single-sided floppy
drives, FinRep can be instructed to copy the file from one drive
to the other as it runs; you'll have to add the drive and filename
specifiers in the script file.  The command line is

	B0>zex z33zasm
or	B0>ex z33zasm

The operation of FinRep requires several passes through a 124K
file.  This will take about ten minutes on a floppy disk.  A hard
disk or ram disk would be faster if one is available.  Remember,
though, that Zex may conflict with co-processors used as ram
disks.  



 
The Z33MAC.LIB, and Z33HDR.LIB included here make it possible for
ZASM to assemble the new version 3.3 command processor.  These
should be substituted for the header and macro files distributed
with the command processor.  The macro file will also work with
the 3.3-specific resident command and flow control packages.

For those not experienced with ZASM, just to get you moving a
little faster, if the source file, libs and ZASM are on the B: 
drive use this command line:

	B0>zasm z33zasm.bbz hex




Assembling the RCP and FCP segments is treated by a seperate batch
file.  Z33SEG.SUB, like Z33ZASM.SUB, will drive FinRep to convert
a few pseudo-ops and labels so that Z33FCP and Z33RCP are
acceptable to ZASM.  Most of the problems, though, involve
multiple definitions and the duplication of effort between
SYSDEF.LIB and Z3BASE.LIB.  This is quickly remedied with a little
editing.
 
For efficiency, edit the base lib and leave sysdef alone.  Several
equates must be hidden from the assembler by preceding them with a
semi-colon; they are then said to be "commented out."  The
definitions ("equates") to be hidden are listed below.  They may
appear in uppercase or lowercase in your Z3BASE.LIB, or they may
not appear at all.  If your word-processor's search function
cannot find them, neither will the assembler; that's fine.  The
labels here are shown already commented out.  



 
;false	equ	0 
;true	equ	not false 
;i8080	equ 	false 
;zas 	equ 	false 
;base	equ	0

Don't erase them.  Some of them may be needed later, either in
assembling another segment or in assembling the command processor.
If, in the future, ZASM complains of an undefined label, you may
need to uncomment these equates.




