这个程序的目的是输出234
disp macro nnn
mov ah,0eh
mov al,nnn
int 10h
endm
data segment
x dw 234
y db 10
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
sub bx,bx
mov bx,word ptr y
mov cx,0
mov ax,x
last1:
mov dx,0
div bx
push dx
inc cx
cmp ax,0
jnz last1
last2:
pop dx
add dl,30H
disp dl
loop last2
mov ah,4ch
int 21h
code ends
end start