Hi All,
DazzleStar is a disassembler written to work on CP/M 2.2 and is distributed with an install program to allow setting program data values, such as terminal attributes, for various machines. The Heath/Zenith terminal is listed, so one would expect the program to run on Heath computers, but the distributed package does not run. I used the program on my Ampro LB and found it to be quite useful, especially when used for generating a break table to use when running Z80DIS, another CP/M disassembler.
I decided to see if I could get DazzleStar to run on Heath. Diagnosing the problem was pretty easy, fixing it was a pill!
DazzleStar uses the interrupt service routine function (RST n) to speed up the process of keeping the multi-windowed screen updated for the interactive disassembly process. The program sets up and uses RST 2 (0010H), RST 3 (0018H) and RST 4 (0020H). It won't run on Heath computers because RST 3 is in use on the Heath for the keyboard interrupt service. When the program is loaded and run, the setup routine overwrites the keyboard interrupt at RST 3 and you can no longer type into the computer! The solution is to patch the program to use RST 5 (0028H) instead of RST 3..
The first task was to locate all of the RST 3 commands (DFh). There are 549 bytes of DFh code, some of which are data and the rest are RST 3 instructions. By disassembling and examining the code, one should be able to define the instruction bytes requiring replacement with EFh (RST 5). This is where it got tricky.
The first thing that I discovered is that the program tests the hardware to ensure that it is running on a Z80 processor, has sufficient memory and then validates the program code by running a simple checksum of most of the bytes. It compares the generated sum to a stored sum and will exit if it does not match. That means that the stored checksum must be updated after every modification before the program can be tested. This isn't very difficult to do. Next, I discovered that after the system checks, the program relocates almost every byte of code to different locations than the original load address. Because of this, one can not simply use DazzleStar or some other disassembler to generate a source for the program.
I puzzled on this for a while before I realized that I could load the program, immediately exit and then save the run-time memory environment as a *.COM file. Now, this can be disassembled to see how the program works. Once the bytes are identified, one needs a relocation map to find the address of each byte in the disk file to be patched.
After two months of work, I have a version that appears to run on Heath computers. I have been testing it and have not uncovered any problem. I don't have the manual which lists all functions of the program, so there are most certainly some that I have not tested. I will continue to test it and resolve any issues found. I decided that by getting it in the hands of the group, more users would provide a better chance of finding if there are any problems. Please NOTE that this program is not fully tested. Let me know of any problems found and I will attempt to fix them.
NOTE: I have not patched the
DZINSTAL.COM, so it will not work. I will update the site when this gets done.
For the curious, I have also included the DZ Run-time files.
-- ken