1987-05-13 14:36:45 +00:00
|
|
|
#
|
|
|
|
mes 2,EM_WSIZE,EM_PSIZE
|
|
|
|
|
|
|
|
#define ARG1 0
|
1987-05-27 10:05:01 +00:00
|
|
|
#define ARG2 EM_DSIZE
|
|
|
|
#define IRES 2*EM_DSIZE
|
1987-05-13 14:36:45 +00:00
|
|
|
|
1987-05-27 10:05:01 +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)
|
1987-05-27 10:05:01 +00:00
|
|
|
; and returns an EM_DSIZE-byte floating point number
|
1987-05-13 14:36:45 +00:00
|
|
|
; Definition:
|
1987-05-27 10:05:01 +00:00
|
|
|
; PROCEDURE FIF(ARG1, ARG2: LONGREAL; VAR IRES: LONGREAL) : LONGREAL;
|
1987-05-13 14:36:45 +00:00
|
|
|
|
1987-05-27 10:05:01 +00:00
|
|
|
exp $FIF
|
|
|
|
pro $FIF,0
|
1987-05-13 14:36:45 +00:00
|
|
|
lal 0
|
1987-05-27 10:05:01 +00:00
|
|
|
loi 2*EM_DSIZE
|
|
|
|
fif EM_DSIZE
|
1987-05-13 14:36:45 +00:00
|
|
|
lal IRES
|
|
|
|
loi EM_PSIZE
|
1987-05-27 10:05:01 +00:00
|
|
|
sti EM_DSIZE
|
|
|
|
ret EM_DSIZE
|
1987-05-13 14:36:45 +00:00
|
|
|
end ?
|
|
|
|
|
|
|
|
#define FARG 0
|
1987-05-27 10:05:01 +00:00
|
|
|
#define ERES EM_DSIZE
|
1987-05-13 14:36:45 +00:00
|
|
|
|
1987-05-27 10:05:01 +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)
|
1987-05-27 10:05:01 +00:00
|
|
|
; and returns an EM_DSIZE-byte floating point number (the mantissa)
|
1987-05-13 14:36:45 +00:00
|
|
|
; Definition:
|
1987-05-27 10:05:01 +00:00
|
|
|
; PROCEDURE FEF(FARG: LONGREAL; VAR ERES: integer): LONGREAL;
|
1987-05-13 14:36:45 +00:00
|
|
|
|
1987-05-27 10:05:01 +00:00
|
|
|
exp $FEF
|
|
|
|
pro $FEF,0
|
1987-05-13 14:36:45 +00:00
|
|
|
lal FARG
|
1987-05-27 10:05:01 +00:00
|
|
|
loi EM_DSIZE
|
|
|
|
fef EM_DSIZE
|
1987-05-13 14:36:45 +00:00
|
|
|
lal ERES
|
|
|
|
loi EM_PSIZE
|
|
|
|
sti EM_WSIZE
|
1987-05-27 10:05:01 +00:00
|
|
|
ret EM_DSIZE
|
1987-05-13 14:36:45 +00:00
|
|
|
end ?
|