home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++ Library:
- * "math_double"
- * Jens Gelhar 19.03.93, 15.04.94
-
- xdef _INIT_1_Math_double_o,_EXIT_1_Math_double_o
- xdef _MathIeeeDoubBasBase,lib_MathDoubleBase,GetDoubmath
- xdef lib_int2double,lib_double2int
- xdef _fabs,_floor,_ceil
-
- xref __OpenLib
-
- Execbase = 4
-
- CloseLibrary = -414
- OpenLibrary = -552
-
- GetDoubmath:
- move.l _MathIeeeDoubBasBase,a6
- cmp.w #0,a6
- bne.b ret
- movem.l d0-d2/a0-a2,-(a7)
- bsr.b _INIT_1_Math_double_o
- movem.l (a7)+,d0-d2/a0-a2
- bra.b GetDoubmath
-
- _INIT_1_Math_double_o:
- lea mathieeedoubname,a1
- jsr __OpenLib
- move.l d0,_MathIeeeDoubBasBase
- rts
-
- _EXIT_1_Math_double_o:
- move.l _MathIeeeDoubBasBase,d0
- beq.b ret
- move.l d0,a1
- move.l Execbase.w,a6
- jsr CloseLibrary(a6)
- ret: rts
-
- lib_double2int:
- movem.l a0/a1/a6,-(a7)
- move.l _MathIeeeDoubBasBase,a6
- jsr -30(a6)
- movem.l (a7)+,a0/a1/a6
- rts
-
- lib_int2double:
- movem.l a0/a1/a6,-(a7)
- move.l _MathIeeeDoubBasBase,a6
- jsr -36(a6)
- movem.l (a7)+,a0/a1/a6
- rts
-
- _fabs: movem.l 4(a7),d0/d1
- move.l a6,-(a7)
- move.l _MathIeeeDoubBasBase,a6
- jsr -54(a6)
- move.l (a7)+,a6
- rts
-
- _floor: movem.l 4(a7),d0/d1
- move.l a6,-(a7)
- move.l _MathIeeeDoubBasBase,a6
- jsr -90(a6)
- move.l (a7)+,a6
- rts
-
- _ceil: movem.l 4(a7),d0/d1
- move.l a6,-(a7)
- move.l _MathIeeeDoubBasBase,a6
- jsr -96(a6)
- move.l (a7)+,a6
- rts
-
- mathieeedoubname: dc.b 'mathieeedoubbas.library',0
-
- SECTION D,DATA
-
- lib_MathDoubleBase:
- _MathIeeeDoubBasBase: dc.l 0
-
- end
-
-