5.3.3 - 2


+ x0) * (y1* 232 + y0) = x0 * y0 + (x1 * y0 + x0 *y1) 232 + x1 * y1.

, , .

dataseg

x dd 12345678h, 9abcdefah

y dd 0ffffffffh, 0ffffffffh

z dd 4 dup (?)

...

Codeseg

...

sub eax, eax

mov [z+8], eax

mov [z+12], eax

; z0

mov eax, [x]

mul [y]

mov [z], eax

mov z[4], edx

; z1

mov eax, [x+4]

mul [y]

add [z+4], eax

adc [z+8], edx

mov eax, [x]

mul [y+4]

add [z+4], eax

adc [z+8], edx

adc [z+12], 0

; z2 z3

mov eax, [x+4]

mul [y+4]

add [z+8], eax

adc [z+12], edx

3. 64 32-.

x dd ...,

y dd

z dd ?, ?

mov edx, 0

mov eax, [x+4]

div [y]

mov [z+4], eax

mov eax, [x]

div [y]

mov [z], eax

:

mov edx, 0

mov edx, [x+4]

mov eax, [x]

div [y]

mov [z], eax

0, EAX, , x>232, y = 1!