home *** CD-ROM | disk | FTP | other *** search
- xdef @MySetMenuStrip
- xdef @MyClearMenuStrip
- xdef @MyOnMenu
- xdef @MyOffMenu
- xdef @Mystrlen
-
- xref _OldSetMenuStrip
- xref _OldClearMenuStrip
- xref _OldOffMenu
- xref _OldOnMenu
- xref _PopUpSemaphore
-
- _LVOObtainSemaphore EQU -$0234
- _LVOReleaseSemaphore EQU -$023a
- AbsExecBase EQU 4
-
- section text,code
-
- @MySetMenuStrip:
- MOVEM.L A2/A6,-(SP)
- MOVEA.L _OldSetMenuStrip,A2
- BRA.B CallOldFunction
-
- @MyClearMenuStrip:
- MOVEM.L A2/A6,-(SP)
- MOVEA.L _OldClearMenuStrip,A2
- BRA.B CallOldFunction
-
- @MyOnMenu: MOVEM.L A2/A6,-(SP)
- MOVEA.L _OldOnMenu,A2
- BRA.B CallOldFunction
-
- @MyOffMenu: MOVEM.L A2/A6,-(SP)
- MOVEA.L _OldOffMenu,A2
-
- * ------------ Obtain semaphore and then call the intuition function.
- CallOldFunction:
- MOVEM.L D0/A0-A1/A6,-(SP)
- LEA _PopUpSemaphore,A0
- MOVE.L AbsExecBase.W,A6
- JSR _LVOObtainSemaphore(A6)
- MOVEM.L (SP)+,D0/A0-A1/A6
- JSR (A2)
- LEA _PopUpSemaphore,A0
- MOVE.L AbsExecBase.W,A6
- JSR _LVOReleaseSemaphore(A6)
- MOVEM.L (SP)+,A2/A6
- RTS
-
- * ------------ This is the shortest strlen (I think).
- @Mystrlen: MOVEQ.L #-1,D0
- 1$: ADDQ.L #1,D0
- TST.B (A0)+
- BNE.B 1$
- RTS
-
- END
-
-
-