;
                                    XXI.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
               8k (60)   EE04  1.0        Gene Pizzetta 4/90       Z3COM17

  1- Syntax/Options  2- Translation  3- Notes  4- Examples of Use             


   XXI converts  assembly  source  code  written  in  Zilog Z80  mnemonics  to 
Extended Intel mnemonics.   Extended Intel is  used  by SLRMAC, and by Digital 
Research's  MAC and RMAC with Z80.LIB.   Opcodes for  registers  X and Y  that 
include displacements are flagged, but not translated.  ZCPR3 is required.
:1

    Syntax   XXI {dir:}infile{.typ} {dir:}{outfile}{.typ} {/option}

   If no DIR or DU specification is given the current  (default) drive/user is
assumed.   If no output filename is given, the  source filename will  be used.
If no filetypes are given, the source filetype defaults to Z80 and the destin-
ation filetype defaults to MAC.


   Options   L    <- Convert assembler instructions to lower-case.

             U    <- Convert assembler instructions to upper-case.

The default is for XXI to preserve the case of instructions as it finds them.
:2
 Translation 

   This version translates all  Zilog  opcodes  to  so-called  Extended  Intel 
opcodes,  except those  referencing  index  registers  X and Y that  include a 
displacement.  (Maybe I'll get those later.)   The  extended Intel set is used 
by SLR Systems' SLRMAC and by the  Z80.LIB supplied by  Digital Research  with 
their MAC and RMAC assemblers.   It is similar to, but not completely compati-
ble with, the TDL extensions.

   Untranslated opcodes are flagged with a hash mark ("#").   In addition, the
numbers of the lines containing  untranslated  opcodes are added to the end of
the output file and are displayed on the screen.  Since few programs use X and
Y displacements, the flagged opcodes will normally be few.

   XXI will also display a  warning message when it  finds the  ELSE and MACRO
pseudo-opcodes,  because those occurences may have to  be  edited individually 
before re-assembly.

   Asterisks at the  beginning of  lines  will  be  replaced  with semicolons.
Lines are limited to 128 characters.   Longer lines will be truncated.   A dot
is printed at the console for every 100 lines of input file that is processed.
:3
 XXI Notes 

   a. XXI is based on  Frank J. Zerilli's XLT80 version 1.05 (10/28/84), which
      was in turn based on Richard Conn's XLATE2.   XLATE does the opposite of 
      XXI; it translates Intel 8080 opcodes to  Zilog Z80.   XLT80  translates 
      from Intel to Zilog,  but it does not include the intrinsic Z80 instruc-
      tions provided  for in  Digital Research's  Z80.LIB for  use  with  8080 
      assemblers.   In any case  Zerilli's code,  which was  a bit kludgy, has 
      been extensively revised, so it is even more kludgy now.

   b. Vs 1.0 updates (04/28/90, Gene Pizzetta):
      - Translates Zilog mnemonics to  extended Intel mnemonics,  except those 
        referencing registers IX & IY.  Inserts "MACLIB Z80" at head of file.

   c. XXI can probably be fooled  by certain computed labels  and  by operands
      that use brackets instead of parentheses,  but I  have found no problems 
      so far.   The huge variety of syntax  available in  Zilog  source  files 
      practically assures that there are some bugs lurking in the code,  which 
      is a bit of a kludge anyway.
:4
 Examples of Use 

   a. A0>xxi
      A0>xxi //
          Both of these print a brief usage message.

   b. A0>xxi program
          Translates PROGRAM.Z80 to PROGRAM.MAC, both on the
          default drive (A0).

   c. A0>xxi b3:abc c:xyz /l
          Translates ABC.Z80 in drive/user B3 to XYZ.MAC in C0,
          converting all opcodes to lower-case.

   d. A0>xxi asm:myfile.mac newfile.asm
          Translates MYFILE.MAC in the ASM directory to
          NEWFILE.ASM in A0, the default directory.

   e. A0>xxi oldfile.asm d15: /u
          Translates OLDFILE.ASM on A0 to OLDFILE.MAC on D15,
          translating all opcodes to upper-case.