This Week With My Coleco ADAM 9711.17

by Richard F. Drushel (drushel@apk.net)

I. Another Long Week, Short Article.

I've done a lot of ADAM stuff this week, something almost every day. Unfortunately, it doesn't translate into a very long article. Most of the work is preparatory for some larger efforts which may end up as future articles, though, so it's not wasted.

II. Source code for ADAMlink V.

George Koczwara asked me if I could produce an assembly code listing for ADAMlink V, preparatory to HLM-GMK seeking a formal copyright on the program. I suspect that this is related to the demonstrated piracy of the program by Terry Fowler of ADAM's House. I'm not a lawyer, and don't play one on TV, so I will not attempt to discuss the legal ramifications. Instead, I will briefly outline what I've been doing to create such an assemblable source code listing from the disparate "source" pieces which went into making ADAMlink V.

ADAMlink V began as ADAMlink IValpha, a major overhaul of ADAMlink III/III+ by Tom Clary which was never officially released, but which has evidently had some "underground" circulation. A few years ago, HLM-GMK Co. tracked down Mr. Clary and purchased the rights to ADAMlink IValpha. This buyout was supposed to have included the original source code (ADAMlink IValpha is a de novo creation with no inherited code from Coleco's original ADAMlink I; I have the disassemblies to prove it), but it never appeared. Thus, back in 1991 or so, I began to disassemble the ADAMlink IValpha binary to see how it worked, with the thought of adding some extra features to it (such as support for the Micro Innovations-type serial ports, disk/tape catalog features, EOS RAMdisk support, hard drive support, and some other amenities).

Using my old UNASMHEX-based program which had been ported to MS-DOS, I created the disassembly and edited it as a WordPerfect 5.0 file. I pretty much totally commented it (it's a 25K+ program, about as big as SmartBASIC 1.0) and made an elegant listing, which I laser-printed and used as a reference. I figured out where I could patch/break into the code to make the changes that I wanted, then used a crufty DOS-based Z80 cross assembler to assemble just the code patches. (This is the same assembler that I used to create the SmartBASIC 1.x source code--ugh!) Using the assembly listing files, which gave the resulting machine code in hexadecimal, I manually entered the changed bytes on an ADAMlink IValpha binary on an ADAM using the block editor of File Manager. Thus, while the patches exist as commented source code (which with minor editing can be made compatible with my current assembler, SLR's Z80ASM+), the final ADAMlink V program does not.

How could I get an assembly-ready listing of ADAMlink V? One possibility would be to use my current dissasembler (Kenneth Gielow's Z80DIS 2.2 for CP/M), using the ADAMlink IValpha disassembly and mini-ADAMlink V assemblies as a guide for where to place the breakpoints. The major problem with this method is that all the comments, laboriously typed in over a few months, would be missing...and I have no desire (and no time) to retype them from scratch.

The next method would be to somehow alter the existing ADAMlink IValpha disassembly to be in assembly-ready format. Doing this by hand in a text editor would be as laborious (and error-prone) as retyping all the comments on a Z80DIS 2.2 disassembly. The alternative would be some sort of "intelligent" filter program which could read the ADAMlink IValpha listing and automatically convert it into Z80ASM+ format. It would take a while to write and debug, but when thoroughly tested, it could be unleashed upon the disassembly and in one step generate assemblable code, comments intact. Then, since the ADAMlink V patches already exist as assemblable code, I could easily do the minor editing necessary to integrate the patches with the main ADAMlink IValpha source. The final test would be to run the integrated source through Z80ASM+ and verify that it produced a binary identical to that of the current ADAMlink V.

The bulk of this week has been spent in writing such a filter program, which I call DIS2ASM. As always with me, I'm writing it in QuickBASIC 4.5 for MS-DOS and compiling it to run on my 486DX2-66 system. Currently, the DIS2ASM program is about 50% completed, and the parts which are completed have been tested and validated. It will probably take me the rest of the week and next weekend to complete it. I will then have some small editing or "regularizing" of the ADAMlink IValpha disassembly file to do, in order to make sure that certain "special cases" (which would break my simple-as- possible code) don't exist. The final DIS2ASM run will probably take about 5 minutes to run...even with the 2-week development time, though, the result will be far more accurate and painless to achieve than manual retyping/ editing.

II. Prospect for SmartBASIC 1.0 and 2.0 Source Code Listings.

While I won't be able to release the completed ADAMlink V code (not if HLM-GMK are copyrighting it), there is an indirect payoff in that I have completed (in 1990!) disassemblies of SmartBASIC 1.0 and 2.0 (including the STDMEM and EXTMEM versions for 2.0) which are in exactly the same UNASMHEX format as the ADAMlink IValpha listing. This means that (again, with some "regularizing" editing) I should be able to run these disassembly listings through DIS2ASM and regenerate commented, assemblable source for them as well! No promises that I'll get to this anytime soon, but it could be done.

III. Prospect for an ADAMlink VI.

Having real source for ADAMlink V in hand would allow for future expansion and enhancement, including EOS-8 type support for the ADAMnet serial and parallel devices, a decent VT100 terminal emulator, and maybe even ZMODEM file transfer capability. No firm promises for this ADAMlink VI, but it would be possible. Consider it "vaporware" for the time being.

See you again next week!

*Rich*


Next Article
Previous Article
TWWMCA Archive Main Page