[Coco] Post to the list
Wayne Campbell
asa.rand at yahoo.com
Thu Jul 16 22:22:39 EDT 2009
Hi everyone. I am new to this list, and haven't been directly involved with the Color Computer or OS-9 crowd in a long time. Over 15 years. I have come back because I want to preserve a program that I wrote a long time ago. I'd like to tell you about the program, and more recent events.
>From 1991-93 I developed a program, in Basic09 on a 512K CoCo3 running OS-9 Level 2, designed to de-code Basic09 I-Code files. The object was to retrieve the source code if the user (me) lost a source code file and needed it back. I named it DCom. The full title is "DCom - Basic09 I-Code De-Compiler". I marketed it through Animajik Productions, owned by Alan Sheltra. At the 92 or 93 (not sure which) CoCoFest in Atlanta, Georgia, Alan sold nine copies. Since the cost of packaging and marketing was not covered by the sales, I conceded to allow Alan to keep it all. I never saw a penny.
I managed to hold onto the original source (in printed form), along with related materials, until about two years ago. Recently, I realized how long it's been since I wrote the program, and decided to see if someone ever put a copy online to preserve it. I found that the CoCo group is very worthy of praise, as not one single copy was to be found. My copyright had been upheld by the group. I was happy, and sad. I want to release it to the public domain in order for it to be preserved.
Through contact with Alan, who I haven't seen in over 16 years, I found that he didn't have any of the materials left, but he put me in touch with Dean Lieber, to whom he had given everything he had years ago. I am esctatic! Dean had a copy! I got the .os9 image file, installed Mess and NitrOS-9 and tried to read the disk. Bummer. Disk isn't being acknowledged. Upon investigation, I find that, somehow, a byte in the disk header in LSN0 was set to $07, when it was supposed to be $03. Finally reading the disk, and everything is there! Everything but the source code, because that wasn't included in the distribution disk.
I have tried to see if the old 3-ring binder I lost still exists, in the hope of preserving what may well prove be the most important OS-9 Level 1 and Level 2 code that still exists. Back when I was developing it, Boisy Pitre send me a copy of the header to the original Basic09 source code! As far as he knew, it was the last 6809 version of Basic09. He couldn't send me the entire source. That header info was invaluable. From what I understand, Microware had already destroyed everything related to Level 1 and Level 2 by then, because they were already developing OS-9000, which didn't even include a Basic language. In addition, there were many pages of my notes. And I even had a printout of the hexadecimal representations of the I-Code modules. That was in case I ever had to manually create the I-Code files.
Alot of good all that work did. Without the binder I only have what I can remember, which hasn't proven to be much. It's like I'm learning OS-9 for the first time. I'm looking at version numbers and differences now. Which brings me to the point of this post.
I finally got everything done, meaning I had to set the executable attrs on the cmds directory and on every file in it. I also had to make copies of the I-Code modules to work on, because I had to get past the internal security that blocked self-decompile. It wasn't a difficult thing, but I had to change every single procedure that makes up the program. That was my attempt to discourage it. I also knew I'd probably forget it altogether if I made it too complex. Anyway, I started the de-compile. It got all the way to printing out the instruction statements when it stopped. Examination of the source file being constructed showed it got hung before it was done writing the DIM, TYPE and PARAM statements to the file. Checking the disk space available proved there was plenty of room on the disk.
I knew that the Basic09 in Level 2 had been upgraded from the version for Level 1. I decided to see if I could tell what version was in NitrOS-9. The versions of Basic09 and RunB in NitrOS-9 are listed below.
NitrOS9 version:
Basic09
BASIC09
6809 VERSION 01.01.00
COPYRIGHT 1980 BY MOTOROLA INC.
AND MICROWARE SYSTEMS CORP.
REPRODUCED UNDER LICENSE
TO TANDY CORP.
ALL RIGHTS RESERVED.
RunB
BASIC09
RS VERSION 01.00.00
COPYRIGHT 1980 BY MOTOROLA INC.
AND MICROWARE SYSTEMS CORP.
REPRODUCED UNDER LICENSE
TO TANDY CORP.
ALL RIGHTS RESERVED.
I found a copy of an archive that contains both OS-9 Level 1 and Level 2. The Level 1 version didn't contain Basic09 or RunB, but the Level 2 version did. The versions are listed below.
cocoos9 version:
Basic09
BASIC09
RS VERSION 01.00.01
COPYRIGHT 1980 BY MOTOROLA INC.
AND MICROWARE SYSTEMS CORP.
REPRODUCED UNDER LICENSE
TO TANDY CORP.
ALL RIGHTS RESERVED.
RunB
BASIC09
RS VERSION 01.00.01
COPYRIGHT 1980 BY MOTOROLA INC.
AND MICROWARE SYSTEMS CORP.
REPRODUCED UNDER LICENSE
TO TANDY CORP.
ALL RIGHTS RESERVED.
I could swear I remember Level 2 Basic09 displaying the version number 1.2. How many versions are there? From what I can deduce, the versions may be as follows:
Dragon L1:
1.00.00
CoCo L1:
1.00.01 or 1.01.00
CoCo L2:
1.01.00 or 1.02.00
Does anyone on this list have the original OS-9 Level 1 version of Basic09 and RunB, and/or the original Level 2? I feel it may be that I am running an older version of Basic09 than I used when I wrote the program. I need to figure this out, or I'm stuck trying to decode the I-Code manually. I already started doing that. Using the smallest procedure in the program, named DCIA, I was able to remember something of the structure of I-Code, but attempts with the primary procedure, DCom, prove I don't remember enough to make that difference. It will take a long time manually. But, I did get DCIA decompiled. The only thing I'm not sure of about it is if I'm using TRUE and FALSE in the correct order. In case you haven't guessed it, DCIA is the procedure that seeks to prevent self-decompile.
Here's the listing, for those interested. The variable names are new. I can't remember what names I used originally. The condition tests in comments are versions I think I used, but without compiling it I can't tell.
PROCEDURE DCIA
DIM verify(6):BOOLEAN
DIM copyRight:STRING[1]
DIM id:BYTE
DIM index:INTEGER
PARAM idents(6):BYTE, verified:BOOLEAN
copyRight := "@8y at aa"
copyRight := " DCom - Basic09 I-Code De-Compiler: Copyright (c) 1991,1992,1993 by Wayne Campbell All Rights Reserved "
FOR index := 1 TO 6
READ id
IF id = idents(index) THEN
verify(index) := TRUE
ELSE
verify(index) := FALSE
ENDIF
NEXT index
FOR index := 1 TO 6
IF verify(index) = FALSE THEN (* IF NOT(verify(index)) THEN *)
verified := FALSE
ENDIF
NEXT index
IF verified = FALSE THEN (* IF NOT(verified) THEN *)
PRINT
PRINT " ==> WARNING!! <=="
PRINT " Attempt to De-Compile DCom Related or DCom Protected Module!"
PRINT " De-Compile ABORTED!!"
ENDIF
END
DATA $40, $38, $79, $40, $61, $61
More information about the Coco
mailing list