我编了个程,要输出200*150的结果,可是运行却出现divide overflow.
请问哪里错了。data segment
a dw 200
b dw 150
string db '200*150='
db '$'
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov dx,offset string
mov ah,09h
int 21h
mov bx,a
mov cx,b
mov ax,0
lop1:add ax,bx
loop lop1
s:mov bx,0 ;不断将ax除于0,判断余数属否为零
mov cl,10
div cl
mov bl,ah
add bx,30h
mov dx,bx
mov ah,02h
int 21h
cmp al,0
jnz s
mov ah,4ch
int 21h
code ends
end start