[Coco] error trapping
Wayne Campbell
asa.rand at yahoo.com
Fri Dec 4 18:53:19 EST 2009
That is the most true allegory I have ever read. In addition to assembly language programming, I can relate my efforts with Basic09 I-Code. Figuring out every step needed in the process requires breaking each part down to the most basic steps, then building the steps into the whole part. And each part is required to be complete in itself before the next part can be dealt with.
I am now roughly 2/3 of the way through the second part of decoding I-Code. When this part is completed, I will be able to reproduce the variable declaration statements required by the procedure being decoded.
The third part will reproduce the source instructions from the procedure. At that point, I will be able to fully decompile any I-Code module. After that, I plug that engine into unpack, and you will be able to deal with merged module files. unpack already contains the code for determining if a file is a program module or not, whether or not it is I-Code, and will skip over object-code subroutines that have been merged into the file.
When unpack is complete, it will be time to start work on comparing parameter variables in one procedure with parameter variables in the corresponding called procedure. This will help with renaming variables that are common between procedures.
That is going to be fun, because Basic09 allows this:
PROCEDURE caller
DIM myArray(32):BYTE
RUN myProc(myArray)
PROCEDURE myProc
PARAM myString:STRING
Because both variables are the same size, Basic09 will put the contents of myArray into myString.
This going to take extra steps to ensure that the match is made between myArray and myString.
Wayne
________________________________
From: Bob Devries <devries.bob at gmail.com>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Wed, December 2, 2009 10:51:21 PM
Subject: Re: [Coco] error trapping
That line I alluded to earlier goes like this:
"Writing programs in assembly language is a lot like digging a fence post
hole with a tablespoon. It takes a lot of steps, but you have complete
control over all the dirt."-Jim K. Issel
Regards, Bob Devries
--
Besides a mathematical inclination, an exceptionally good mastery of one's
native tongue is the most vital asset of a competent programmer.
Edsger W.Dijkstra, 18 June 1975
----- Original Message -----
From: "Willard Goosey" <goosey at virgo.sdc.org>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Thursday, December 03, 2009 12:43 PM
Subject: Re: [Coco] error trapping
> On Wed, Dec 02, 2009 at 04:48:39PM -0800, Wayne Campbell wrote:
>
>> I just got this post. I guess you posted it before I posted my own
>> reply.
>
> Beware the bug. The Param string needs to have a length or it'll
> default to 32 bytes. :-( I looked that up in the BASIC09 manual last
> night.
>
>>You have sshown me something I didn't think about, or realize
>> might be necessary. I've never cleared the cc field before making
>> the call.
>>
> I don't know if it's really necessary. I think that just got added
> when I was chasing another bug, and left in.
>
> I don't know BASIC-09 that well, so debugging it can make me thrash
> around wildly.
>
>> Also, my routine ended up being shorter than yours, so I need to
>> compare the differences and see what you are doing that I didn't
>> think about.
>
> Well, I'm aiming at a general case, and you might be looking for
> something more specific. Other than that, the only thing I can think
> of is make sure the filename ends in a newline.
>>
>> Thanks for the help. :)
>
> No problem!
> Willard
> --
> Willard Goosey goosey at sdc.org
> Socorro, New Mexico, USA
> I search my heart and find Cimmeria, land of Darkness and the Night.
> -- R.E. Howard
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list