Category : Assembly Language Source Code
Archive   : ASM_SUBR.ZIP
Filename : FPTNORM

 
Output of file : FPTNORM contained in archive : ASM_SUBR.ZIP
;-------------------------fptnorm routine begins--------------------------+
; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
; page : 84
;
; NAME FPTNORM
; ROUTINE FOR NORMALIZATION OF TEMPORARY FLOATING POINT
;
; FUNCTION: This routine normalizes temporary binary floating point
; numbers that have too large a mantissa.
;
; INPUT: Upon entry DS:DI points to a temporary binary floating point
; number whose mantissa is too large
;
; OUTPUT: Upon exit DS:DI points to a normalized temporary binary floating
; point number.
;
; REGISTERS USED: No registers are modified. DI must point to the number
;
; SEGMENTS REFERENCED: The data segment must contain the temporary
; floating point number.
;
; ROUTINES CALLED: None
; SPECIAL NOTES: Equates are used to shorten address fields. This is a
; near procedure needed by FPIN.
;
; ROUTINE TO NORMALIZE TEMP FLO-ATING POINT NUMBERS THAT HAVE TOO LARGE
; A MANTISSA.
;
fptnorm proc near
;
cmp diword+8,100h ; test if too high
jl fptnorm1 ; exit if low enough
sar diword+8,1 ; shift right all bytes
rcr diword+6,1 ; carry on
rcr diword+4,1
rcr diword+2,1
rcr diword+0,1
inc diword+11 ; increment exponent
jmp fptnorm
;
fptnorm1:
ret ; return
;
fptnorm endp
;-------------------------fptnorm routine ends---------------------------+


  3 Responses to “Category : Assembly Language Source Code
Archive   : ASM_SUBR.ZIP
Filename : FPTNORM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/