| 1 |
|
| 2 |
D52 8052 Disassembler (includes D48 and DZ80) |
| 3 |
============================================= |
| 4 |
|
| 5 |
Licence: GNU General Public License version 3 (see the file COPYING). |
| 6 |
NOTE: As Novell and Microsoft are in violation of the GPL, this software |
| 7 |
may not be distributed by either Novell or Microsoft. The same prohibition |
| 8 |
applies to any company that enters into an agreement with Microsoft regarding |
| 9 |
Microsoft's phony patent claims against Linux. In addition, no one who cannot |
| 10 |
honor ALL the requirements of GPL version 3 may distribute this software. |
| 11 |
|
| 12 |
Maintainership Note: |
| 13 |
-------------------- |
| 14 |
|
| 15 |
D52 appears to be unmaintained. Neither of the locations named in the original |
| 16 |
README still exist (8052.com or http://home.pacbell.net/theposts). |
| 17 |
|
| 18 |
A mirror of the D52 homepage is at http://www.brouhaha.com/~eric/software/d52/. |
| 19 |
|
| 20 |
I checked in the d52v341.zip available there into GitHub and applied the |
| 21 |
following patches: |
| 22 |
|
| 23 |
- Fix format security issue: https://src.fedoraproject.org/rpms/d52/blob/master/f/d52v341-format-security.patch |
| 24 |
- Don't strip binaries: https://src.fedoraproject.org/rpms/d52/blob/master/f/d52v341-nostrip.patch |
| 25 |
- Fix N directive bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706728 |
| 26 |
- Fix T directive bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706730 |
| 27 |
|
| 28 |
Time permitting, I will be making additional bug fixes and adding features that |
| 29 |
I personally want. I welcome pull requests from others. |
| 30 |
|
| 31 |
New Features: |
| 32 |
------------- |
| 33 |
Version 3.3 now includes a code analysis option for the 8052 disassembler. |
| 34 |
The -t command line option causes D52 to trace and analyze the code in the |
| 35 |
file to be disassembled to determine which parts of the file are actually |
| 36 |
executable code, and which parts are data, such as ascii text, 8-bit binary |
| 37 |
data, 16-bit binary data or pointers. |
| 38 |
|
| 39 |
The results of the analysis are written to a control file which is then used in |
| 40 |
the disassembly process. Use of the -t option will overwrite any existing |
| 41 |
control file for the program to be disassembled, and so should only be used on |
| 42 |
the first disassembly. You may modify the control file with any text editor to |
| 43 |
correct any analysis errors or to add new directives for subsequent |
| 44 |
disassemblies of a file. |
| 45 |
|
| 46 |
The code analysis option is available only in D52 and DZ80. This feature should |
| 47 |
be considered beta test, although D52 as a whole is a mature program. |
| 48 |
|
| 49 |
History: |
| 50 |
-------- |
| 51 |
|
| 52 |
Version 3.4.1 |
| 53 |
Changed license to GNU General Public License Version 3. |
| 54 |
Improved code analysis routines. |
| 55 |
If code analysis (-t option) fails, outputs a warning message instead of an |
| 56 |
error message. Increased size of trace stacks for code analysis. |
| 57 |
Changed date/time output to year/month/day format. |
| 58 |
Added address offset directive ('o' control file directive that has the same |
| 59 |
effect as the x command line option. |
| 60 |
Fixed errors in 8048 cycle table. |
| 61 |
Applied Frieder Ferlemann's patch to allow hexadecimal values in the control |
| 62 |
file to optionally be prefixed with "0x" (ie: either 1234 or 0x1234). |
| 63 |
Fixed bug that would cause all data from an Intel hex record to be lost if |
| 64 |
the addresses for the block included 0ffffh. |
| 65 |
|
| 66 |
Version 3.4.0 |
| 67 |
Added cycle count directive('z' control file directive) and command line |
| 68 |
option to read cycle count file for d52 derivatives. Many thanks to Jan |
| 69 |
Waclawek for suggesting this feature and for implementing the code. Please |
| 70 |
read Jan's documetation in the 'cyclefiles' directory. |
| 71 |
Bug fixes for the 8048 disassembler. |
| 72 |
Improvements in output formatting. |
| 73 |
Improved control file error messages. |
| 74 |
Fixed bug that caused quoted operand symbols (ie: ' ') with non-visible |
| 75 |
characters to be truncated. |
| 76 |
Added Y directive. This is the same as the X directive except that an EQU |
| 77 |
statement will not be generated for the operand name. |
| 78 |
Added N directive to suppress automatic generation of a label for addresses |
| 79 |
referenced that are really constants instead of addresses. |
| 80 |
Added N command line option to output operands in C style (0xcd instead of 0cdh). |
| 81 |
Added P command line option to output pseudo ops with a leading dot (eg: .equ). |
| 82 |
|
| 83 |
Version 3.3.9 |
| 84 |
Adds dz80 flags -80 and -85 for disasembling with 8080 or 8085 mnemonics. |
| 85 |
|
| 86 |
Version 3.3.8 |
| 87 |
Fixes compile errors on Mac OSX and BSD unixes. Also fixed error in Z80 |
| 88 |
analysis trace routine. Thanks to Brian Foley for spotting these problems. |
| 89 |
|
| 90 |
Version 3.3.7 |
| 91 |
Adds the 'n' directive to suppress automatic generation of a label for a |
| 92 |
referenced address. |
| 93 |
|
| 94 |
Version 3.3.6 |
| 95 |
Now allows you to specify the file extension of the file to be disassembled |
| 96 |
(eg: d52 -d testfile.hex). If you specify the extention, the -b (binary), |
| 97 |
-h (Intel hex), and -c (CP/M .com file if using DZ80) flags are not required. |
| 98 |
Fixed bug that caused assembler pseudo opcodes to not be output in upper |
| 99 |
case if the -u option was given on the command line, but no control file |
| 100 |
existed for the file to be disassembled. |
| 101 |
Suppress generation of an equ statement for an address if a label for |
| 102 |
that address had already been output. (This bug would cause some cross- |
| 103 |
assemblers to output an error even though the value of the equ matched |
| 104 |
the address of the label.) |
| 105 |
The keil A51 option (-k) should be used only if you intend to re-assemble |
| 106 |
the output file using the older DOS version of A51. |
| 107 |
|
| 108 |
Version 3.3.5 |
| 109 |
Fixes bug with patch directive. Code cleanup and minor bug fixes. |
| 110 |
Will no longer abort if input file exceeds 64KB, but code beyond 64K will be |
| 111 |
ignored. |
| 112 |
|
| 113 |
Version 3.3.4 |
| 114 |
Adds a new command line option and a new control file directive. |
| 115 |
The -u option causes mnemonics, labels, symbols, etc to be output in upper |
| 116 |
case for cross assemblers that may require upper case code. Strings, |
| 117 |
literal data, and comments are not affected. The P directive is similar to |
| 118 |
the header comment directive (#) except that the user string will be output |
| 119 |
as code, rather than as a comment. May be useful for inserting include |
| 120 |
statements or macro definitions into the output file. A preliminary trace |
| 121 |
option has been added to the Z80 disassembler (DZ80), but is still |
| 122 |
experimental--use it with caution. V3.3.4 also includes some bug fixes. |
| 123 |
|
| 124 |
Version 3.3.3 |
| 125 |
Corrects a bug that would allow more than one equate statement to be |
| 126 |
generated for name symbols with the same value. Inline comments now allowed |
| 127 |
for byte (8-bit) data. Corrected endian problem with Z80 disassembler. |
| 128 |
Changed format of 'd' directive. |
| 129 |
|
| 130 |
Version 3.3.2 |
| 131 |
Allows inline comments after address and word data. |
| 132 |
Corrects a bug that would force word data following a header comment to be |
| 133 |
interpreted as byte data. |
| 134 |
|
| 135 |
Version 3.3.1 |
| 136 |
D52 corrects a bug regarding the Keil flag. |
| 137 |
|
| 138 |
Version 3.3 |
| 139 |
DZ80 now has a command line option (-c) to disassemble CP/M .com files, in |
| 140 |
addition to hex and binary files. |
| 141 |
|
| 142 |
The Future: |
| 143 |
----------- |
| 144 |
|
| 145 |
Dis52, a GUI front end for D52, D48 and DZ80, is currently under development, |
| 146 |
and a preview version for Linux (or other Unix-like OS) is now available. (Due |
| 147 |
to flaws in the design of Windows, Dis52 is not available for Windows.) |
| 148 |
|
| 149 |
Dis52 requires the SDL (Simple DirectMedia Layer) library. SDL can be downloaded |
| 150 |
from http://www.libsdl.org. |
| 151 |
|
| 152 |
Jeff Post |
| 153 |
j_post <AT> pacbell <DOT> net |
| 154 |
September, 2007 |
| 155 |
|