home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff214.lzh / SmartIcon / src / hook.asm < prev    next >
Assembly Source File  |  1989-05-30  |  3KB  |  108 lines

  1. ***************************************************************************
  2. *                                      *
  3. * SmartIcon, release 1.0 - An Intuition object iconifier for the Amiga      *
  4. * Copyright (c) 1988 Gauthier H. Groult                                   *
  5. *                                      *
  6. * Written in January 1988 by Gauthier H. Groult               *
  7. *                 33, Boulevard Saint Denis,           *
  8. *                 92400 Courbevoie                  *
  9. *                 France - Europe                  *
  10. *                 Tel: (16) 1 47 89 09 54                      *
  11. *                 email: mcvax!inria!litp!germinal!groult      *
  12. *                                      *
  13. * This source code is not in public domain, please do not distribute.      *
  14. * The binary program is shareaware. Read docs files for details.      *
  15. *                                      *
  16. ***************************************************************************
  17.  
  18. * This code contains the routines that are called instead of the normal *
  19. * Rom routines.                             *
  20. * Speacial action is performed either before or after the normal Rom    *
  21. * code                                    *
  22. *                                    *
  23. * This code is rather heavy but it works.                *
  24.  
  25.    include 'include:exec/types.i'
  26.  
  27. GADGETUP    EQU    $00000040
  28.  
  29.    xref  _owhook
  30.    xref  _cwhook
  31.    xref  _mihook
  32.    xref  _pmhook
  33.    xdef  _OWentry_point
  34.    xdef  _CWentry_point
  35.    xdef  _MIentry_point
  36.    xdef  _PMentry_point
  37.  
  38.    STRUCTURE   HK,0
  39.    LONG   HK_SYSFUNC
  40.    LONG   HK_MYFUNC
  41.    LONG   HK_ENTRY
  42.    LONG   HK_LVO
  43.  
  44. regboys   reg  d1/d2/d3/d5/a0/a1/a2/a3/a4/a5/a6
  45.  
  46. _OWentry_point:                ; entry point for OpenWindow()
  47.    movem.l  regboys,-(sp)
  48.    lea        _owhook,a3
  49.  
  50.    move.l   HK_SYSFUNC(a3),a5
  51.    jsr        (a5)
  52.  
  53.    move.l   d0,-(sp)
  54.    move.l   HK_MYFUNC(a3),a5
  55.    jsr        (a5)
  56.    move.l   (sp)+,d0
  57.  
  58.    movem.l  (sp)+,regboys
  59.    rts
  60.  
  61. _CWentry_point:                ; entry point for CloseWindw()
  62.    movem.l  regboys,-(sp)
  63.    lea        _cwhook,a3
  64.  
  65.    move.l   a0,-(sp)
  66.    move.l   HK_MYFUNC(a3),a5
  67.    jsr        (a5)
  68.    move.l   (sp)+,a0
  69.  
  70.    move.l   HK_SYSFUNC(a3),a5
  71.    jsr        (a5)
  72.  
  73.    movem.l  (sp)+,regboys
  74.    rts
  75.  
  76. _MIentry_point:                ; entry point for ModifyIDCM()
  77.    movem.l  regboys,-(sp)
  78.    lea        _mihook,a3
  79.  
  80.    ori.l    #GADGETUP,d0
  81.    move.l   HK_SYSFUNC(a3),a5
  82.    jsr        (a5)
  83.  
  84.    movem.l  (sp)+,regboys
  85.    rts
  86.  
  87. _PMentry_point:                ; entry point for PutMsg()
  88.    movem.l  regboys,-(sp)
  89.    lea        _pmhook,a3
  90.  
  91.    movem.l  regboys,-(sp)
  92.    move.l   a1,-(sp)
  93.    move.l   a0,-(sp)
  94.    move.l   HK_MYFUNC(a3),a5
  95.    jsr        (a5)
  96.    move.l   (sp)+,a0
  97.    move.l   (sp)+,a1
  98.    movem.l  (sp)+,regboys
  99.  
  100.    lea        _pmhook,a3
  101.    move.l   HK_SYSFUNC(a3),a5
  102.    jsr        (a5)
  103.  
  104.    movem.l  (sp)+,regboys
  105.    rts
  106.  
  107.    end
  108.