ZXLATE - AN 8080 TO Z80 SOURCE CODE TRANSLATOR Copyright (c) 1986 by G. Benson Grey All Rights Reserved, Worldwide ZXLATE is an 8080 to Z80 Source Code Translator in the tradition of Richard Conn's ZXLATE2 and Frank Zerilli's XLATE104 and is a direct descendant from the two programs. This version has been labeled as Version 1, Revision 1 since it was completely re-written in Z80 code. In addition, it is designed to operate on systems which utilize Richard Conn's exceptional command processor replacement, ZCPR3. ZXLATE relies on ZCPR3's SYSLIB3, VLIB and Z3LIB relocatable libraries. It must be assembled using M80 (or equivalent) and linked with L80 (or equivalent). ZXLATE is largely a complete re-write of Frank Zerilli's XLATE. The default locations were removed from the front of the program as each of the options has a manual override from the command line. ZXLATE has a variety of options which are used to control the translation of programs. The options define such things as whether multiple commands separated by Digital Research's ! separator should be output on separate lines (default) or left intact; if opcodes should be followed by a space (20H) or a tab (09H default); what column to align comments in (41 is the default); and whether to translate special TDL opcodes (no translate default); translate DB and EQU (no translate default); and whether to translate the "standard Z80.LIB" macros to Z80 opcodes (default). The standard command line syntax for invoking ZXLATE is: ZXLATE [du:]filename.typ [du:filename.typ] / [options] Items enclose in square brackets are optional. The space between the filename.typ and separator and between the separator and the options are required. The du: refer to the standard ZCPR system of disk and user specifications followed by a colon. The only item which must be specified is the source filename. The filetype, if omitted, is assumed to be .ASM. If the destination filename.typ is not specified. ZXLATE will create an output file of du:filename.Z80, where du:filename is the same as the source file. If the destination file is specified, any part of the filename specification may be given. A typical example is: ZXLATE B1:SOURCE.ASM A0:DESTIN.MAC / E U M C=33 where B1:SOURCE.ASM is the input file; A0:DESTIN.MAC is the output file; TDL extended mneumonics will be translated; labels, opcodes and operands will be translated to upper case; .Z80 and ASEG statements will be output to the beginning of A0:DESTIN.MAC file; multiple commands on one line will be translated to commands on separate lines; and comments will be aligned in column 33. The source and destination files may be on any legal Disk/User. No checks are done by ZXLATE as to the validity of these specifications. However, if improperly specified, a Disk/User Error will be issued and the program will be terminated. Invoking ZXLATE with no parameters or as ZXLATE // will cause an internal help file to be displayed on the console. The following single characters may be used to change the default values at run time. The square brackets are not part of the specification. [A] Output .Z80 and ASEG assembler pseudo-ops to the destination file for M80. [C=nn] Align comments in column nn. (C=41 is the default.) Note: there must be no intervening spaces between the C and the = or between the = and the column number. ZXLATE does not check the column number as being valid and will attempt to align to whatever column is specified if it is possible. [D] Translate DB and EQU statements. (No translation is the default.) [E] Translate TDL pseudo-ops into standard Z80 mnemonics. [L] Translate labels, opcodes and operands to lower case. (No case translation is the default.) [M] Put instructions separated by DRI's ! separator into single lines. Remove the ! separator (default). [S] Separate opcode from operand by a space (20H). [T] Separate opcode from operand by a tab (09H) (default). [Z] Translate Z80.LIB macro pseudo-ops into standard Z80 mnemonics (default). Any of the above options may be specified on the command line. They must be preceeded by the / separator to be recognized by ZXLATE. No other syntax checks are done on the source file. ZXLATE will ignore any instructions (opcodes) which are not defined it its internal tables. ZXLATE will recognize the M80 .COMMENT pseudo-op. Any text appearing in this type of statement, will be copied verbatim to the destination file. The "standard Z80.LIB" file has has several new additions since it was first released. The majority of the additions are only to rename some of the Jump (JP) and Jump Relative (JR) instructions. The new codes have been added to ZXLATE's tables with the corresponding Z80 instruction being generated. These first appeared in J. Sage's experimental ZCPR314 and RCP145 which have not been released to public domain. It is my desire to contribute to the realm of public domain software. This is just one of a series of programs which will be developed for use by serious microcomputer users. This program is registered with the US Government and is copyright (c) 1986 by G. Benson Grey and Virtual Micro Systems International. Any comments and or suggestions regarding the program may be addressed to: G. Benson Grey, Sysop [503] 641-6101 Voice Portland ZNODE #24 [503] 644-4621 Data 1200 12275 NW Cornell Rd, Ste 5 Portland, OR 97229-5611 The ZNODE system data phone is available from 22.00 - 06.00 daily. Voice phone calls will be accepted from 06.00 - 2200 daily. Collect calls will not be accepted under any circumstances.