汇编语言编程求1*2*3*4*5*6*7,将结果存入fac中并显示出来。
时间: 2023-12-04 21:40:08 浏览: 99
以下是汇编语言实现求1*2*3*4*5*6*7的代码,并将结果存入fac中并显示出来:
```assembly
include io32.inc
.data
fac dword 1
.code
start:
main proc
mov ecx, 1
mov ebx, 7
loop1:
cmp ecx, ebx
jg endloop1
imul fac, ecx
inc ecx
jmp loop1
endloop1:
call dispdec
call dispcrlf
ret
main endp
end main
```
相关问题
汇编语言编程求1*2*3*4*5*6*7,将结果存入fac中并显示出来
```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
```
汇编语言 编程求1*2*3*4*5*6*7,将结果存入fac中并显示出来
以下是汇编语言实现求1*2*3*4*5*6*7的代码,并将结果存入fac中并显示出来:
```assembly
include io32.inc
.data
fac dword 1
.code
start:
main proc
mov ecx, 1
mov ebx, 7
loop1:
cmp ecx, ebx
jg endloop1
imul fac, ecx
inc ecx
jmp loop1
endloop1:
call dispuid
call dispcrlf
ret
main endp
end main
```
阅读全文