home *** CD-ROM | disk | FTP | other *** search
-
-
-
- January 11, 1986
- This is the READ-ME file from the Z80DIS.LBR package, version 2.1
- -----------------------------------------------------------------
-
- Version 2.1 change note:
-
- Version 2.0 added artificial intelligence to Z80DIS.
-
- Version 2.1 corrects a small bug in the processing of INC,
- DEC, and LD using index registers IX and IY. Version 2.1
- also significantly enhances the abilities of the disassem-
- bler to distinguish between ASCII blank (20 hex) and the
- instruction "JR NZ,xxxx" (also 20 hex) which leads to lots
- and lots of phony instruction jump references. Version 2.0
- worked well in determination of correct break types for 8080
- code. With version 2.1, you now have that reliability with
- Z80 code as well.
-
- Z80DIS is an entirely new disassembler for Z80 based CP/M sys-
- tems. Z80DIS is written in TURBO PASCAL. Z80DIS generates Z80
- mnemonics and prepares an assembly language file with many spe-
- cial features for ease of understanding the intent of the disas-
- sembled code. The source for Z80DIS has grown, with this version,
- up to 5800 lines of coding.
-
- With versions 2.0 and higher, you need know very little about the
- format of the *.COM file to produce a nearly finished source file
- in most cases. In addition a large number of convenience features
- and defaults have been added that were not present in version 1.
- A full synopsis of the versions of the program in current distri-
- bution is included in the Z80DIS20.DOC file. Highlights of the
- current changes follow at the end of this paper.
-
- Both the Z80DIS program and the Z80DIS documentation are (C)
- Copyright 1985 and 1986 by Kenneth Gielow; All Rights Reserved.
- While I am freely distributing the binary code for non-profit
- use, I am reserving the source code as a trade secret.
-
- This program requires a Z80 based computer running CP/M version
- 2.2 or higher. The code was compiled for a 50K TPA; the top
- address is C7FF. This slightly small size was done for compatibi-
- lity with CP/M 3.0 and ZCPR3.
-
- The following files will be found on Z80DIS21.LBR for this prog-
- ram distribution library package:
-
- Z80DIS.COM - the disassembler program
- Z80DIS.000 - overlay file for Z80DIS
- Z80DIS.001 - overlay file for Z80DIS
-
- ZDINSTAL.COM - a terminal command installation program
- ZDINSTAL.MSG - contains text of ZDINSTAL messages
- ZDINSTAL.DTA - contains terminal characteristics data
-
- Z80DIS20.DOC - an abbreviated user manual in ready to print
- format. (See documentation notice )
-
-
-
-
-
-
-
- Z80DIS 2.1 01/11/86
-
-
- The Z80DIS binary is in three files. The ZDINSTAL files are based
- on the TURBO Toolbox GINST program and will tailor the interac-
- tive displays to your terminal.
-
- The program is easy to use with interactive displays for para-
- meter specification. All control parameters have defaults preset
- to the most likely values. The DOC file is the text of a short
- user manual which explains most of the important points needed to
- get going.
- DOCUMENTATION NOTICE
- --------------------
- The original, forty-plus page user manual gave extensive examples
- and used disassembly of the public domain program D.COM as an
- example. Unfortunately, with the additions to document the newer
- features and give additional suggestions for use, that user
- manual and expanded program together have both gotten so large
- that most system operators would not carry the complete library.
- Something had to give. I feel that the program is largely self
- explanatory so that you can get started very well with only a
- shortened manual. This abbreviated manual is included here. The
- short user manual deals mainly with installing the Z80DIS program
- and doing a simple disassembly. This short manual is all that a
- casual user would probably need.
-
- The longer manual expands on the discussion of the features and
- explains the step-wise approach to dealing with much larger
- source codes. The manual also deals with disassembling code which
- relocates itself. Extensive examples are included. All error
- messages and secondary options are discussed in detail.
-
- The full Z80DIS USER MANUAL is available by mail. I am asking a
- nominal charge of $ 20.00 which includes the manual, postage,
- handling, and an update notification service. You are granted the
- right to make not-for-profit copies of the manual. The program
- itself is not available by mail as I do not have extensive,
- multi-format disk copy capability. The notification service will
- consist of a letter to you anytime a new version is released so
- that you may be on the lookout for it.
-
- To order a copy of the Z80DIS USER MANUAL, send a request with
- your name, address, and a check for $ 20.00 to --
-
- Kenneth Gielow
- 79 Tulip Lane
- Palo Alto, CA 94303
-
- -----------------------------------------------------------------
-
- FEATURES OF Z80DIS
- ------------------
- The major feature of Z80DIS is an extensive analysis of the
- memory usage by the program under investigation. This analysis
- capability forms the basis for an automatic partitioning of the
- code to generate the break table. This analysis also produces a
- fully-annotated cross reference of all addresses.
-
- A disassembler must know whether the bytes are instructions or
-
-
- 2
-
-
-
- Z80DIS 2.1 01/11/86
-
-
- data in order to proceed. Z80DIS is the first disassembler to
- produce its own break table for this purpose. Some previous
- programs, such as RESOURCE, have included a search for ASCII text
- regions, but have left the verification and interpretation up to
- the user. Most other disassemblers are fooled by the trick of
- adding nonsense bytes after jumps to cause the analysis to fall
- out of synchronization with instruction code interpretation.
-
- Z80DIS produces an output listing which itemizes all addresses
- referenced by the code, distinguishes types of label references,
- marks subroutines and jumps and produces an annotated cross-
- reference. This listing shows the exact mode of usage for every
- reference: Jump absolute, Jump relative, Call, Restart, Load 16-
- bit, Store 16-bit, Immediate 16-bit, Load 8-bit, Store 8-bit. In
- version 2.1, this listing also shows the break table region of
- residency for each label so that you may inspect the list for
- inconsistencies.
-
- An address labeling convention assists in understanding the
- assembly code generated. Each label generated on the assembly
- listing indicates, by format, not only the generic type (Jump,
- Call, Data, Other) of any references, but also the singularity of
- the reference.
-
- For example, J#02E3 used at address 02E3 indi-
- cates that only one reference was made to address
- 02E3 and that that reference was a JUMP.
-
- In addition to helping you by automatic analysis of memory use,
- Z80DIS also assists you by styling the presentation of the disas-
- sembled code. The disassembled code is output in two forms: Both
- the usual *.MAC file and a printer formatted *.PRN file.
-
- The *.PRN file is styled to look like the output of an assembler
- with both the instructions and assembled bytes shown. The juxta-
- position of the hexadecimal bytes and the assembly mnemonics
- allows the user to recognize errors caused by an incorrectly
- defined break table.
-
- -----------------------------------------------------------------
-
- A personal note:
-
- I wrote this disassembler because I could not find another
- that would really open up a foreign program for inspection.
- RESOURCE and its spin-offs give you only a pin-hole look at a
- program without indicating the important interactions with other
- parts of the code. Z80DIS rectifies that lack via the cross-
- reference, disassembly comments, and automatic structure analy-
- sis. I hope that you will find it as useful as I have.
-
- Kenneth Gielow
-
-
-
-
-
-
-
- 3
-
-
-
- Z80DIS 2.1 01/11/86
-
-
- Significant Changes in Version 2.1
- ----------------------------------
-
- 1) BUG CORRECTION: During automatic break table creation in
- version 2.0, the codes DD34, DD35, DD36, FD34, FD35, FD36 were
- not correctly recognized. This resulted in false assumptions
- about the legality of some Z80 code regions which were then
- thought to be data regions rather than instruction regions. This
- has been corrected in version 2.1.
-
- 2) IMPROVEMENT IN HANDLING JR REFERENCES: In disassembling
- 8080 coding, instruction jumps and calls use 3-byte addressing;
- that is unambiguous and not easily misinterpreted. With Z80 code,
- ASCII text blocks contain codes that are easily mistaken for Z80
- relative jumps; that creates apparent jump references to code
- within 128 bytes before or after the misinterpreted byte. The
- ASCII blank (20 hex) is especially bad as it looks exactly like a
- "JR NZ,xxxx" code. Version 2.1 has been much improved to distrust
- relative jump references as a basis for declaring a region to be
- instructions. Version 2.1 examines corroborative evidence to
- distinguish ASCII data from instruction codes.
-
- 3) OTHER IMPROVEMENTS: The entire Expert system comprising
- the Automatic Break Determination feature was enhanced to yield a
- more complete analysis of the code structure.
-
- Highlights of Changes in Version 2.0
- ------------------------------------
-
- 1) AUTOMATIC BREAK TABLE CREATION: When the program asks for
- break table inputs, you may now enter '*' which will trigger a
- detailed analysis of the structure and relationships of the input
- code.
-
- 2) The COM file and overlay files for Z80DIS no longer need
- to be on your default disk drive.
-
- 3) The cross-reference listing now shows the break table
- region of residency for each label.
-
- 4) Overflow of memory or disk space during pass 1 will not
- abort execution.
-
- 5) You may now disassemble direct to your printer by speci-
- fying LST: as the list file name.
-
- 6) You may now suppress creation of either .PRN or .MAC
- output files.
-
- 7) The default name for the break table save file is now the
- same name as that of your input file.
-
- _________________________________________________________________
- CP/M is a registered trademark of Digital Research Inc.,
- TURBO PASCAL is a trademark of Borland International,
- Z-80 is a trademark of Zilog Corp.
-
-
-
- 4
-
-
-