Category : Assembly Language Source Code
Archive   : ASM-SUBR.ZIP
Filename : DECDOUBL

 
Output of file : DECDOUBL contained in archive : ASM-SUBR.ZIP
;-------------------------decdoubl routine begins--------------------------+
; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
; page : 103
;
; NAME DECDOUBL
;
; ROUTINE FOR Doubling A Temporary Decimal Floating Point Number
;
; FUNCTION: This routine multiplies a temporary decimal floating point
; number by two.
;
; INPUT: Upon ebtry DS:DI points to a temporary decimal floating point
; number.
;
; OUTPUT: Upon exit the number has been doubled.
;
; REGISTERS USED: AX, CX and DI are modified.
;
; SEGMENTS REFERENCED: The data segment contains storage for the temporary
; decimal floating poiint number.
;
; ROUTINES CALLED: None
;
; SPECIAL NOTES: This is a near procedure called by FPOUT
;
; ROUTINE TO MULTIPLY TEMPORARY DECIMAL FLOATING POINT NUMBER BY 2 - RESULT
; NOT NORMALIZED.
;
decdoubl proc near
;
mov cx,25 ; for a count of 25
mov ah,0 ; clear previous carry
;
decdoubl1:
mov al,[di] ; get digit
sal al,1 ; multip0ly by 2
and al,ah ; add the carry
aam ; adjust for decimal multiplication
mov [di],al ; put the byte back
inc di ; point to next byte
loop decdoubl1
;
ret ; return
;
decdoubl endp
;-------------------------decdoubl routine ends---------------------------+


  3 Responses to “Category : Assembly Language Source Code
Archive   : ASM-SUBR.ZIP
Filename : DECDOUBL

  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/