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

  1. | this function is for resident (ONLY RESIDENT !) mode only !
  2.  
  3.     .globl _hookEntryResa1a2
  4. _hookEntryResa1a2:
  5.     moveml    a3/a4,sp@-        | save a3/a4
  6.  
  7.     movel    a0@(16),a4        | get a4 from h_Data (hope it's there or we could get a nice crash if we use global data :-//
  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.  
  14.     movel    a0@(12),a3        | fetch C entry point ... (h_SubEntry)
  15.     jsr    a3@                    | ... and call it
  16.     lea    sp@(8),sp            | fix stack
  17.     moveml    sp@+,a3/a4        | load original a3/a4
  18.     rts
  19.