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
Wrap
Text File
|
1991-06-06
|
2KB
|
47 lines
CSECT text
XREF _cOpenWindow
XREF _OldOpenWindow
XREF _cCloseWindow
XREF _OldCloseWindow
XREF _cCloseScreen
XREF _OldCloseScreen
XDEF _aOpenWindow
XDEF _aOldOpenWindow
XDEF _aCloseWindow
XDEF _aCloseScreen
_aOpenWindow:
MOVEM.L D2-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push NewWindow pointer
JSR _cOpenWindow ; call our C OpenWindow
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D2-D7/A0-A6 ; restore registers
RTS
_aOldOpenWindow:
MOVE.L 4(SP),A0 ; move NewWindow pointer to register
MOVE.L _OldOpenWindow,A1 ; move old address to A1
JMP (A1) ; JMP to old OpenWindow routine
_aCloseWindow:
MOVE.L A0,-(SP) ; push the Window pointer
MOVE.L _OldCloseWindow,A1 ; move old address to A1
JSR (A1) ; JSR to old CloseWindow routine
JSR _cCloseWindow ; call our C CloseWindow
ADDQ.L #4,SP ; pop the pointer
RTS
_aCloseScreen:
MOVEM.L D0-D7/A0-A6,-(SP) ; save registers on stack
MOVE.L A0,-(SP) ; push the Screen pointer
JSR _cCloseScreen ; call our C CloseScreen
ADDQ.L #4,SP ; pop the pointer
MOVEM.L (SP)+,D0-D7/A0-A6 ; restore registers
MOVE.L _OldCloseScreen,A1 ; move old address to A1
JMP (A1) ; JMP to old CloseScreen routine
END