[comp.sys.amiga] SetFunction and dos.library

CSD06ZX1%UNO.BITNET@vm.tcs.tulane.edu (04/06/89)

Hello (help..),
   I caught something in a thread about SetFunction() NOT working
properly with dos.library call, is this true? and if so, can someone
briefly explain why?
Thanks,
  Mark

pl@etana.tut.fi (Pertti Lehtinen) (04/07/89)

From article <12480@louie.udel.EDU>, by CSD06ZX1%UNO.BITNET@vm.tcs.tulane.edu:
> Hello (help..),
>    I caught something in a thread about SetFunction() NOT working
> properly with dos.library call, is this true? and if so, can someone
> briefly explain why?

	Normal libraries (exec, graphics, intuition, ... )
	all have jump vector of form:

		jmp	routine1
		jmp	routine2
		...

	and SetFunction call uses this fact.

	Dos-library has jump vector of form:

		moveq.l	#n,d0
		bra	stub
		moveq.l	#n1,d0
		bra	stub

	This doesn't fit into model, which is used by Setfunction.

	Another question is, that Exec Reference Manual doesn't 
	say anything about value returned by SetFunction.

	As we know, it returns old function address in d0,
	but this address relies on normal vector structure (jmp's)
	and with dos library address generated this way is incorrect.

				Pertti Lehtinen
				pl@tut.fi
pl@tut.fi				! -------------------------------- !
Pertti Lehtinen				!  Alone at the edge of the world  !
Tampere University of Technology	! -------------------------------- !
Software Systems Laboratory

A_HINDS%HVRFORD.BITNET@cornellc.cit.cornell.edu (04/11/90)

        This is repost since nobody anyswered me the first time.  Would
somebody please tell me how to SetFunction the dos.library?  I know
there was a discussion of it somtime ago....Thanks.

Alexander Hinds
A_HINDS@HVRFORD