; Multiply mantissa of x by mantissa of y, result to y ; subm( x, y ) PUBLIC _mulm
_mulm PROC NEAR push bp mov bp,sp push si push di push ax push bx push cx push dx pushes
pushds popes
; temp area for the product lea bx,temp ; clear the temp area xor ax,ax mov di,bx mov cx,NQ+2 rep stosw
; normalize and round off ; enter with source = bx, dest = di
PUBLIC mdnorm
mdnorm PROC NEAR
mov cx,3
$normlp:
test word ptr [bx]+6,08000H jnz $round ; Prevent exponent underflow. ; Rounding may be incorrect when this happens.
test word ptr [di]+2,0FFFFH jz $nlup subword ptr [di]+2,1 ; shift up 1 bit and decrement exponent
g = NQ+NQ
clc
rept OMG
rcl word ptr [bx]+g,1
g = g-2 endm
$nlup:
loop $normlp
$round:
; round off
g = NQ+NQ
test word ptr [bx]+g,08000H jnz $doround jmp $done
$doround: xor cx,cx
g = NQ+NQ-2 addword ptr [bx]+g,1
rept OMG-1
g = g-2 adcword ptr [bx]+g,cx endm
; check for overflow on rounding up
test word ptr [bx]+4,0FFFFH jz $done
; shift down 1 bit and increment exponent
g = 4
clc
rept OMG
rcr word ptr [bx]+g,1
g = g+2 endm addword ptr [di]+2,1
$done: ret
mdnorm ENDP
_TEXT ENDS END
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.