[Coco] [Color Computer] OS-9 Editor and NitrOS-9 Download
David
dbree at duo-county.com
Tue Dec 9 19:40:00 EST 2003
On Mon, Dec 08, 2003 at 11:33:16PM -0500, Robert Gault wrote:
> David wrote:
>
> >In response to this and at least two others, here's the patch file.
> >
> >-------------- cut --------------------
> >* Fixes(?) bug in "scred" where alt-key crashes ???
> >l scred
> >c 0012 3c 3d
> >c 05db 2c 24
> >c 05f1 2e 22
> >c 05f7 2f 23
> >c 108d 30 31
> >v
> >-------------- cut ----------------------
> >
> >You apply the patch with modpatch (correct file name?) IIRC, you can't
> >have blank lines in this file. Let's see ... do you apply this with the
> >module in memory? Of course, you all know to keep a good copy of the
> >original for in case things go bad.
> >
> >To test it, try running scred before the patch and see if you don't get
> >crashes with ALT-<key> combos. IIRC, this will eliminate these. There
> >may be other bugs that this doesn't address.
> >
> >Robert -- All I have -somewhwere- is some rudimentary disassemblies of
> >the scred program. I didn't do a very good job of disassembly, and
> >really narrowed the "better" disassembly down to this bug. If you are
> >really interested, I can probably look up what I have.
> I was just curious about the nature of the bug and the method of fixing
> it. However, it could be of interest if we had the true source (not a
> disassembly of C produced ml code) to create an improved 6309 version
> for Boisy's NitrOS-9 project.
I'll try and see what I have. Right now, my coco is disassembled for
remodeling the room.
Here's the gist of what caused the crash. The keystrokes are monitored,
and there is an array of 256 elements, IIRC, which is a jump table. The
program is supposed to jump to a location held at the ASCII position
(x2, of course) of that table. However, they inadverently assigned a
signed number for a pointer, and the ASCII value of an ALT-key is sign
extended and thus points backwards from the base of the array, and thus
jumps to an undefined location, resulting in either a crash or some
undefined/unknown action.
More information about the Coco
mailing list