There are 2 other files named ma.mac in the archive. Click here to see a list.
SUBTTL Mathematical subroutines not covered by FORLIB
; Author: Peter W. Steele, Acadia Univ. June 1978
ENTRY .MACI, .MACL
Purpose: To convert an arithmetic value from long real to integer
(.MACI) or vice versa (.MACL).
These routines have been rewritten for SIMULA on the KA10
so as to avoid calling KA10 dependent UUO's and also to
correct the bug in the .MACI routine which caused improper
rounding of negative numbers. (i. e., all numbers of the
form -X.5 rounded to -X+1 instead of -X.)
Input: Value to be converted in Xtop (and Xtop+1).
Output: Converted value in Xtop (& Xtop+1).
Function: Load input by EXCH instructions to XWAC1-XWAC2.
Convert in XWAC1-XWAC2 and place result by EXCH.
.MACL: PROC ;Conversion from integer to long real
.MACI: PROC ;Conversion from long real to integer
IF ;XWAC1 < 0