source:
trunk/minix/lib/i86/em/em_mli4.s@
10
| Last change on this file since 10 was 9, checked in by , 14 years ago | |
|---|---|
| File size: 313 bytes | |
| Line | |
|---|---|
| 1 | .define .mli4 |
| 2 | .text |
| 3 | |
| 4 | yl=2 |
| 5 | yh=4 |
| 6 | ! x * y |
| 7 | ! xl in ax |
| 8 | ! xh in dx |
| 9 | |
| 10 | .mli4: |
| 11 | mov bx,sp |
| 12 | push dx |
| 13 | mov cx,ax |
| 14 | mul yh(bx) ! xl*yh |
| 15 | pop dx |
| 16 | push ax |
| 17 | mov ax,dx |
| 18 | mul yl(bx) ! xh * yl |
| 19 | pop dx |
| 20 | add dx,ax ! xh*yl+xl*yh |
| 21 | mov ax,cx |
| 22 | mov cx,dx |
| 23 | mul yl(bx) ! xl*yl |
| 24 | add dx,cx |
| 25 | ret 4 |
Note:
See TracBrowser
for help on using the repository browser.