home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d183
/
pcq
/
runtime
/
mathtrans.asm
< prev
next >
Wrap
Assembly Source File
|
1989-02-25
|
3KB
|
192 lines
* MathTrans.asm (of PCQ Pascal runtime library)
* Copyright (c) 1989 Patrick Quaid
* This file implements the routines found in MathTrans.i
* The only interesting ones are the opening and closing
* of the library.
SECTION MATHTRANS
XREF _AbsExecBase
XREF _LVOOpenLibrary
XREF _LVOCloseLibrary
XREF _LVORemLibrary
XREF _LVOSPAsin
XREF _LVOSPAcos
XREF _LVOSPAtan
XREF _LVOSPSin
XREF _LVOSPCos
XREF _LVOSPTan
XREF _LVOSPSincos
XREF _LVOSPSinh
XREF _LVOSPCosh
XREF _LVOSPTanh
XREF _LVOSPExp
XREF _LVOSPLog
XREF _LVOSPLog10
XREF _LVOSPPow
XREF _LVOSPSqrt
XREF _LVOSPTieee
XREF _LVOSPFieee
XDEF _OpenMathTrans
_OpenMathTrans
move.l #mathtransname,a1
moveq.l #0,d0
move.l _AbsExecBase,a6
jsr _LVOOpenLibrary(a6)
move.l d0,_p%MathTransBase
beq.s 1$
move.b #-1,d0
1$ rts
XDEF _CloseMathTrans
_CloseMathTrans
move.l _p%MathTransBase,a1
move.l _AbsExecBase,a6
jsr _LVOCloseLibrary(a6)
move.l #0,_p%MathTransBase
rts
XDEF _FlushMathTrans
_FlushMathTrans
move.l _p%MathTransBase,a1
move.l a1,d0
beq.s 1$
move.l _AbsExecBase,a6
jsr _LVORemLibrary(a6)
bra _CloseMathTrans
1$ rts
XDEF _SPAsin
_SPAsin
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPAsin(a6)
rts
XDEF _SPAcos
_SPAcos
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPAcos(a6)
rts
XDEF _SPAtan
_SPAtan
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPAtan(a6)
rts
XDEF _SPSin
_SPSin
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPSin(a6)
rts
XDEF _SPCos
_SPCos
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPCos(a6)
rts
XDEF _SPTan
_SPTan
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPTan(a6)
rts
XDEF _SPSincos
_SPSincos
move.l 8(sp),d1
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPSincos(a6)
rts
XDEF _SPSinh
_SPSinh
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPSinh(a6)
rts
XDEF _SPCosh
_SPCosh
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPCosh(a6)
rts
XDEF _SPTanh
_SPTanh
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPTanh(a6)
rts
XDEF _SPExp
_SPExp
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPExp(a6)
rts
XDEF _SPLog
_SPLog
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPLog(a6)
rts
XDEF _SPLog10
_SPLog10
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPLog10(a6)
rts
XDEF _SPPow
_SPPow
move.l 8(sp),d1
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPPow(a6)
rts
XDEF _SPSqrt
_SPSqrt
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPSqrt(a6)
rts
XDEF _SPTieee
_SPTieee
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPTieee(a6)
rts
XDEF _SPFieee
_SPFieee
move.l 4(sp),d0
move.l _p%MathTransBase,a6
jsr _LVOSPFieee(a6)
rts
SECTION MTB,DATA
_p%MathTransBase dc.l 0
mathtransname dc.b 'mathtrans.library',0
END