我想实现:(v-(x*y+z-540))/x的运算并输出结果。请哪位高手指点一下。
我的代码是:
title jisuan
data segment
x db 2
y db 3
z dw 540
v dw 10
s db ?
r db ?
data ends
code segment
assume cs:code,ds:data
start:mov ax,data
mov ds,ax
mov ah,x
imul y
add ax,z
sub ax,540
sub v,ax
mov ax,v
mov cl,x
cbw cl
div ax,cl
mov ch,4
loop1:mov cl,4
rol ax,cl
push ax
add ax,000fh
cmp al,9
ja l2
add al,30h
jmp l1
l2: add al,37h
l1: mov ds,al
mov ah,4ch
int 21h
dec ch
jnz loop1
mov ch,4
loop2:mov cl,4
rol dx,cl
push dx
add dx,000fh
cmp dl,9
ja l4
add dl,30h
jmp l3
l4: add dl,37h
l3: mov ds,al
mov ah,4ch
int 21h
dec ch
jnz loop2
mov ah,4ch
int 21
code ends
end start
错误提示:warning a4001:extra characters online
warning a4001:extra characters online
error a2019:wrong type of register
error a2019:wrong type of register