Subject: Patching protocols
From: [email-masked] (Anthony Morton)
Date: Tue, 8 Mar 1994 01:07:59 GMT
Newsgroups: comp.sys.apple2.programmer

Apple IIgs Tech Note #87 gives the protocol for patching the tool locator
dispatch vectors at $E10000-$E1000F.  As far as I'm aware, there is no
protocol currently defined for patching other system vectors, or for patching
individual tool calls, that allows patches to be removed after being
patched over.

Assuming that this is the case, I intend to define a protocol for use by
Desktop Utilities 4.0 and its modules, which combines features of Tech Note
#87 and the generalised queue protocol, and allows patches to cooperate.  I
propose that in order to comply with this protocol, patches to individual
tool calls and system vectors (other than the tool dispatch vectors) include
an eight-byte header before the actual patch code, defined as follows:

	Offset	Length	Description

	   0	   4	Long JMP instruction to next call handler
	   4	   2	Flags describing nature of patch (use zero)
	   6	   2	Signature word; must be set to $A55A

Desktop Utilities 4.0 will contain routines for patching individual tool calls
and system vectors, that manage patches according to this protocol.

If you have any comments, please reply.  In particular, I want to be sure that
this isn't already covered by a Tech Note I've missed.

Tony Morton ([email-masked])
Electrical Engineering Masters student & diehard IIGS lover
University of Melbourne, Australia