oldFunc = SetFunction(library, funcOffset, funcEntry)
    D0                    A1       A0.W        D0
    APTR SetFunction(
struct Library *,LONG,APTR);
    
 
  
    SetFunction is a functional way of changing where vectors in a library point. They are changed in such a way that the checksumming process will never falsely declare a library to be invalid.
  
  
    If you use SetFunction on a function that can be called from interrupts, you are obligated to provide your own arbitration.
  
  
    SetFunction cannot be used on non-standard libraries like pre-V36 dos.library.  Here you must manually 
Forbid(), preserve all 6 original bytes, set the new vector, 
SumLibrary(), then 
Permit().
    The function offset is limited to an unsigned 16 bit number. See the notes on 
MakeLibrary() and 
MakeFunctions().