home *** CD-ROM | disk | FTP | other *** search
- **
- ** $Id: TaskHookEntry.s,v 1.2 1994/03/07 17:26:26 alex Rel $
- **
- ** BASIC task entry glue
- **
- ** (c) Copyright 1994 HiSoft
- **
- INCLUDE 'exec/tasks.i'
- INCLUDE 'utility/hooks.i'
-
- INCLUDE 'lvos/exec_lib.i' ; you may have this called differently
-
- CALLSYS MACRO
- jsr _LVO\1(a6)
- ENDM
-
- SECTION CODE,CODE
-
- XDEF TaskHookEntry
-
- TaskHookEntry:
- movea.l (4).w,a6 ; connect to Exec
- suba.l a1,a1 ; find this task
- CALLSYS FindTask ; go find the task
- movea.l d0,a6 ; the task control block pointer
- lea TC_Userdata(a6),a6 ; where we stashed the Hook
- movea.l (a6),a0 ; pointer to the Hook
- move.l a2,(a6) ; clear out user data
- move.l h_Entry(a0),-(sp) ; the Hook entry point
- rts ; run the hook
-
- END
-