[comp.sys.amiga.tech] Inserting custom library routines

Classic_-_Concepts@cup.portal.com (03/05/89)

      Dan asked me to post this question.  He has done most of his programming
on Vax and MSDOS machines and is justing starting to program the Amiga.
He's trying to change the contents of a Library, found the section in the
RKM (1-78-79) but wants to know how to find the offsets.  How does he
substitute a routine which is a superset of the original?  He is particularly
interested in applying this to the Text function.

w-colinp@microsoft.UUCP (Colin Plumb) (03/07/89)

Classic_-_Concepts@cup.portal.com wrote:
> How does he substitute a routine which is a superset of the original?
> He is particularly interested in applying this to the Text function.

NAME
     SetFunction -- change a function vector in a library

SYNOPSIS
     oldFunc = SetFunction(library, funcOffset, funcEntry)
     D0                    A1       A0.W        D0

FUNCTION
     SetFunction is a functional way of changing those parts of
     a library that are checksummed.  They are changed in such a
     way that the summing process will never falsely declare a
     library to be invalid.

INPUTS
     library - a pointer to the library to be changed

     funcOffset - the offset that FuncEntry should be put at.

     funcEntry - pointer to new function

Basically, open the library and SetFunction() the apropriate routine.

Good luck!
-- 
	-Colin (uunet!microsoft!w-colinp)

"Don't listen to me.  I never do." - The Doctor