home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d500 / swindows.lha / sWindows / Source / swStubs.a < prev   
Text File  |  1991-06-06  |  2KB  |  47 lines

  1.         CSECT       text
  2.  
  3.         XREF        _cOpenWindow
  4.         XREF        _OldOpenWindow
  5.         XREF        _cCloseWindow
  6.         XREF        _OldCloseWindow
  7.         XREF        _cCloseScreen
  8.         XREF        _OldCloseScreen
  9.  
  10.         XDEF        _aOpenWindow
  11.         XDEF        _aOldOpenWindow
  12.         XDEF        _aCloseWindow
  13.         XDEF        _aCloseScreen
  14.  
  15. _aOpenWindow:
  16.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  17.         MOVE.L      A0,-(SP)               ; push NewWindow pointer
  18.         JSR         _cOpenWindow           ; call our C OpenWindow
  19.         ADDQ.L      #4,SP                  ; pop the pointer
  20.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  21.         RTS
  22.  
  23. _aOldOpenWindow:
  24.         MOVE.L      4(SP),A0               ; move NewWindow pointer to register
  25.         MOVE.L      _OldOpenWindow,A1      ; move old address to A1
  26.         JMP         (A1)                   ; JMP to old OpenWindow routine
  27.  
  28.  
  29. _aCloseWindow:
  30.         MOVE.L      A0,-(SP)               ; push the Window pointer
  31.         MOVE.L      _OldCloseWindow,A1     ; move old address to A1
  32.         JSR         (A1)                   ; JSR to old CloseWindow routine
  33.         JSR         _cCloseWindow          ; call our C CloseWindow
  34.         ADDQ.L      #4,SP                  ; pop the pointer
  35.         RTS
  36.  
  37. _aCloseScreen:
  38.         MOVEM.L     D0-D7/A0-A6,-(SP)      ; save registers on stack
  39.         MOVE.L      A0,-(SP)               ; push the Screen pointer
  40.         JSR         _cCloseScreen          ; call our C CloseScreen
  41.         ADDQ.L      #4,SP                  ; pop the pointer
  42.         MOVEM.L     (SP)+,D0-D7/A0-A6      ; restore registers
  43.         MOVE.L      _OldCloseScreen,A1     ; move old address to A1
  44.         JMP         (A1)                   ; JMP to old CloseScreen routine
  45.  
  46.         END
  47.