home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_DEV08B.LHA / gerlib / not_equal / baserel / hookentry.s < prev    next >
Encoding:
Text File  |  1993-12-12  |  510 b   |  20 lines

  1. | this function is for baserel (NOT RESIDENT !) mode only !
  2.  
  3.     .globl _hookEntry
  4. _hookEntry:
  5.     moveml    a3/a4,sp@-        | save a3/a4
  6.  
  7.     jsr        _geta4            | get a4
  8.  
  9.     | save registers for C function that wants everything on the stack
  10.  
  11.     movel    a1,sp@-            | push message packet pointer
  12.     movel    a2,sp@-            | push object pointer
  13.     movel    a0,sp@-            | push hook pointer
  14.  
  15.     movel    a0@(12),a3        | fetch C entry point ... (h_SubEntry)
  16.     jsr    a3@                    | ... and call it
  17.     lea    sp@(12),sp            | fix stack
  18.     moveml    sp@+,a3/a4        | load original a3/a4
  19.     rts
  20.