home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 204.lha / Wicon / stub.asm < prev    next >
Assembly Source File  |  1996-02-14  |  2KB  |  115 lines

  1. ;*************************************************************************
  2. ;*
  3. ;*        stub.asm  - assembler stubs for Wicon - Window iconifier
  4. ;*
  5. ;*    Copyright (c) Steven Sweeting  01-Jan-88
  6. ;*
  7. ;*************************************************************************
  8.  
  9.  
  10.  
  11.         CSEG
  12.  
  13.         XREF    _IntuitionBase
  14.  
  15. *------------------------------------------------------------------------*
  16.  
  17.  
  18.         XREF    _WiconHandler
  19.         XDEF    _WiconHandlerStub
  20.  
  21. _WiconHandlerStub:
  22.  
  23.         MOVEM.L A0/A1,-(SP)            ; Set up stack frame
  24.         JSR    _WiconHandler
  25.         ADDQ.L    #8,A7                ; Unset it
  26.         RTS
  27.  
  28.  
  29. *------------------------------------------------------------------------*
  30.  
  31.         XREF    _OWVector
  32.         XDEF    _OldOpenWindow
  33.  
  34. _OldOpenWindow:
  35.  
  36.         MOVE.L    4(SP),A0            ; &NewWindow argument
  37.  
  38.         MOVE.L    _IntuitionBase,A6
  39.         MOVE.L    _OWVector,A1
  40.         JSR    (A1)
  41.  
  42.         RTS
  43. *------------------------------------------------------------------------*
  44.  
  45.         XREF    _CWVector
  46.         XDEF    _OldCloseWindow
  47.  
  48. _OldCloseWindow:
  49.  
  50.         MOVE.L    4(SP),A0            ; &Window argument
  51.  
  52.         MOVE.L    _IntuitionBase,A6
  53.         MOVE.L    _CWVector,A1
  54.         JSR    (A1)
  55.  
  56.         RTS
  57.  
  58.  
  59. *------------------------------------------------------------------------*
  60.  
  61.         XDEF    _GetFunction
  62.  
  63. _GetFunction:
  64.         MOVE.L    4(SP),A1            ; Library Base
  65.         ADD.L    8(SP),A1            ; Offset
  66.         ADD.L    #2,A1                ; skip the JSR
  67.         MOVE.L    (A1),D0             ; vector
  68.  
  69.         RTS
  70.  
  71.  
  72. *------------------------------------------------------------------------*
  73.  
  74.         XDEF    _WiconOpenW
  75.         XREF    _M_Open
  76.  
  77. _WiconOpenW:
  78.         MOVEM.L SAVEDREGS,-(SP)
  79.  
  80.          MOVE.L  A0,-(SP)            ; Push &NewWindow onto stack
  81.          JSR     _M_Open
  82.          ADDQ.L  #4,SP                ; Restore the stack
  83.  
  84.         MOVEM.L (SP)+,SAVEDREGS
  85.  
  86.         RTS
  87.  
  88. *------------------------------------------------------------------------*
  89.  
  90.         XDEF    _WiconCloseW
  91.         XREF    _W_Close
  92.  
  93. _WiconCloseW:
  94.         MOVEM.L SAVEDREGS,-(SP)
  95.  
  96.          MOVE.L  A0,-(SP)             ; Push &Window onto stack
  97.          JSR     _W_Close
  98.          ADDQ.L  #4,SP
  99.  
  100.         MOVEM.L (SP)+,SAVEDREGS
  101.  
  102.         RTS
  103.  
  104. *------------------------------------------------------------------------*
  105.  
  106.  
  107. SAVEDREGS    reg    d1/d2/d3/d4/d5/a0/a1/a2/a3/a4/a5/a6
  108.  
  109.  
  110.         END
  111.  
  112.  
  113.  
  114.  
  115.