home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
204.lha
/
Wicon
/
stub.asm
< prev
next >
Wrap
Assembly Source File
|
1996-02-14
|
2KB
|
115 lines
;*************************************************************************
;*
;* stub.asm - assembler stubs for Wicon - Window iconifier
;*
;* Copyright (c) Steven Sweeting 01-Jan-88
;*
;*************************************************************************
CSEG
XREF _IntuitionBase
*------------------------------------------------------------------------*
XREF _WiconHandler
XDEF _WiconHandlerStub
_WiconHandlerStub:
MOVEM.L A0/A1,-(SP) ; Set up stack frame
JSR _WiconHandler
ADDQ.L #8,A7 ; Unset it
RTS
*------------------------------------------------------------------------*
XREF _OWVector
XDEF _OldOpenWindow
_OldOpenWindow:
MOVE.L 4(SP),A0 ; &NewWindow argument
MOVE.L _IntuitionBase,A6
MOVE.L _OWVector,A1
JSR (A1)
RTS
*------------------------------------------------------------------------*
XREF _CWVector
XDEF _OldCloseWindow
_OldCloseWindow:
MOVE.L 4(SP),A0 ; &Window argument
MOVE.L _IntuitionBase,A6
MOVE.L _CWVector,A1
JSR (A1)
RTS
*------------------------------------------------------------------------*
XDEF _GetFunction
_GetFunction:
MOVE.L 4(SP),A1 ; Library Base
ADD.L 8(SP),A1 ; Offset
ADD.L #2,A1 ; skip the JSR
MOVE.L (A1),D0 ; vector
RTS
*------------------------------------------------------------------------*
XDEF _WiconOpenW
XREF _M_Open
_WiconOpenW:
MOVEM.L SAVEDREGS,-(SP)
MOVE.L A0,-(SP) ; Push &NewWindow onto stack
JSR _M_Open
ADDQ.L #4,SP ; Restore the stack
MOVEM.L (SP)+,SAVEDREGS
RTS
*------------------------------------------------------------------------*
XDEF _WiconCloseW
XREF _W_Close
_WiconCloseW:
MOVEM.L SAVEDREGS,-(SP)
MOVE.L A0,-(SP) ; Push &Window onto stack
JSR _W_Close
ADDQ.L #4,SP
MOVEM.L (SP)+,SAVEDREGS
RTS
*------------------------------------------------------------------------*
SAVEDREGS reg d1/d2/d3/d4/d5/a0/a1/a2/a3/a4/a5/a6
END