汇编语言编程求1*2*3*4*5*6*7,将结果存入fac中并显示出来
时间: 2023-12-04 10:40:08 浏览: 72
```assembly
assume cs:code
data segment
fac dw 1
data ends
code segment
start:
mov ax, 1
mov bx, 2
mov cx, 7
mov dx, 0
mov si, offset fac
mov [si], ax
mov [si+2], dx
L1:
mul bx
mov si, offset fac
mov [si], ax
mov [si+2], dx
inc bx
loop L1
mov ah, 09h
lea dx, [fac]
int 21h
mov ah, 4ch
int 21h
code ends
end start
```
阅读全文