#: 8119 S12/OS9/68000 (OSK)
11-Nov-90 15:35:35
Sb: #8109-OSK module patching
Fm: Kevin Darling (UG Pres) 76703,4227
To: Timothy J. Martin 71541,3611 (X)
Tim -
If you're patching at all, then you must have already figured out at least a
tiny bit of the offending code already. How large is the module?
I guess it depends on the tools you have, and what you're patching.
When I first started patching, I simply assembled the extra code.. which I then
merged onto the _end_ of the module in question... plus a few extra bytes where
a new CRC would be made, using Verify. Obviously I also used debug (or a
program) to change some of the old code to jump to the new routines. This
method is relatively quick and easy.
Nowadays, I disasm the whole thing... but you have to get it into just good
enough shape so that adding code in the middle doesn't screw up something else
(like a table of offsets)... which means you have to go through the whole
module and look for stuff like that. If the module is small enough, this can
be done fairly quickly, tho.
No matter how you patch it, the way to distribute the patches (if patching
something that's commercial, that is) is to use Bob Santy's MakPatch/IPatch
programs (see PATCH.AR in Lib 12). They generate what we call "ipatch" files
(".ipc") so that anyone with the original code can insert/delete new code.
best - kev
|