【发布时间】:2014-03-09 18:02:29
【问题描述】:
include io.h
cr equ 0dh
lf equ 0ah
stacksg segment stack
dw 100 dup(?)
stacksg ends
datasg segment
prp1 db '1st Number:',cr,lf,0
prp2 db '2nd Number:',cr,lf,0
prp3 db 'The result:',cr,lf,0
numA dw ?
numB dw ?
sum dw 20 dup(?),0
entersim db cr,lf
datasg ends
codesg segment
start:
assume cs:codesg,ds:datasg
mov ax,datasg
mov ds,ax
output prp1
inputs numA,10
atoi numA
mov numA,ax
output prp2
inputs numB,10
atoi numB
mov bx,ax
mov ax,numA
mul bx
itoa sum,ax
output entersim
output prp3
output sum
output entersim
mov al,0
mov ah,4ch
int 21h
codesg ends
end start
如果乘法的结果大于 16 位并且答案存储在 dx:ax 对寄存器中,我无法显示整个结果,如何在屏幕上显示操作的正确答案? 如果有这种情况的示例代码,请将其写出来...... tnx朋友
【问题讨论】:
标签: assembly multiplication tasm