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

 
Output of file : DFP2SFP contained in archive : ASM_SUBR.ZIP
;-------------------------dfp2sfp routine begins--------------------------+
; ROUTINE FOR CONVERSION FROM DOUBLE PRECISION TO SINGLE PRECISION
;
; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
; page : 113
;
; NAME DFP2SFP
;
; FUNCTION: This routine converts from double precision binary floating point
; to internal double precision floating point.
;
; INPUT: Upon entry a internal double precision binary floating point
; number is stored in DFPBUFF. The internal double precision floating point
; number has a 40-bit binary mantissa, a sign bit,and an 8-bit exponent
; biased by 128 (See fig 5-8).
;
; OUTPUT: Upon exit a number is stored in single precision binary floating
; point form in SFPBUFF. The single precision binary floating point number
; has a 24-bit binary mantissa, a sign bit, and an 8-bit exponent biased by
; 128 (See fig 5-3).
;
; REGISTERS USED: No registers are modified.
;
; SEGMENTS REFERENCED: Upon entry the data segment must contain the
; storage for the variables SFPBUFF and DFPBUFF.
;
; ROUTINES CALLED: None
;
; SPECIAL NOTES: Equates are used to shorten address fields.
;
; ROUTINE TO CONVERT FROM INTERNAL DOUBLE PRECISION FLOATING POINT TO
; INTERNAL SINGLE PRECISION FLOATING POINT
;
dfp2sfp proc far
;
push ax ; save registers
;
mov ax,dfpbuffw4 ; get word from double precision
mov sfpbuffw0,ax ; put in single precision
;
mov ax,dfpbuffw6 ; get word from double precision
mov sfpbuffw2,ax ; put in single precision
;
pop ax ; restore registers
ret ; return
;
dfp2sfp endp
;-------------------------dfp2sfp routine ends---------------------------+



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

  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/