ack/lang/m2/libm2/FIFFEF.e

47 lines
944 B
Plaintext
Raw Normal View History

1987-05-13 14:36:45 +00:00
#
mes 2,EM_WSIZE,EM_PSIZE
#define ARG1 0
#define ARG2 EM_DSIZE
#define IRES 2*EM_DSIZE
1987-05-13 14:36:45 +00:00
; FIF is called with three parameters:
1987-05-13 14:36:45 +00:00
; - address of integer part result (IRES)
; - float two (ARG2)
; - float one (ARG1)
; and returns an EM_DSIZE-byte floating point number
1987-05-13 14:36:45 +00:00
; Definition:
; PROCEDURE FIF(ARG1, ARG2: LONGREAL; VAR IRES: LONGREAL) : LONGREAL;
1987-05-13 14:36:45 +00:00
exp $FIF
pro $FIF,0
1987-05-13 14:36:45 +00:00
lal 0
loi 2*EM_DSIZE
fif EM_DSIZE
1987-05-13 14:36:45 +00:00
lal IRES
loi EM_PSIZE
sti EM_DSIZE
ret EM_DSIZE
1987-05-13 14:36:45 +00:00
end ?
#define FARG 0
#define ERES EM_DSIZE
1987-05-13 14:36:45 +00:00
; FEF is called with two parameters:
1987-05-13 14:36:45 +00:00
; - address of base 2 exponent result (ERES)
; - floating point number to be split (FARG)
; and returns an EM_DSIZE-byte floating point number (the mantissa)
1987-05-13 14:36:45 +00:00
; Definition:
; PROCEDURE FEF(FARG: LONGREAL; VAR ERES: integer): LONGREAL;
1987-05-13 14:36:45 +00:00
exp $FEF
pro $FEF,0
1987-05-13 14:36:45 +00:00
lal FARG
loi EM_DSIZE
fef EM_DSIZE
1987-05-13 14:36:45 +00:00
lal ERES
loi EM_PSIZE
sti EM_WSIZE
ret EM_DSIZE
1987-05-13 14:36:45 +00:00
end ?