1987-01-08 10:13:48 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
|
|
|
.sect .text
|
1985-02-07 15:33:13 +00:00
|
|
|
.define .mli4
|
|
|
|
|
1987-06-09 10:22:50 +00:00
|
|
|
yl=2
|
|
|
|
yh=4
|
|
|
|
! x * y
|
|
|
|
! xl in ax
|
|
|
|
! xh in dx
|
1985-02-07 15:33:13 +00:00
|
|
|
|
|
|
|
.mli4:
|
1987-06-09 10:22:50 +00:00
|
|
|
mov bx,sp
|
|
|
|
push dx
|
|
|
|
mov cx,ax
|
|
|
|
mul yh(bx) ! xl*yh
|
|
|
|
pop dx
|
|
|
|
push ax
|
|
|
|
mov ax,dx
|
|
|
|
mul yl(bx) ! xh * yl
|
|
|
|
pop dx
|
|
|
|
add dx,ax ! xh*yl+xl*yh
|
|
|
|
mov ax,cx
|
1987-06-10 13:46:21 +00:00
|
|
|
mov cx,dx
|
1987-06-09 10:22:50 +00:00
|
|
|
mul yl(bx) ! xl*yl
|
1985-02-07 15:33:13 +00:00
|
|
|
add dx,cx
|
1987-06-09 10:22:50 +00:00
|
|
|
ret 4
|