求助 打印完全数问题 急~~~~~
data segmentmess1 db 'the num is:$'
data ends
;**************************************
code segment
assume cs:code ds:data
main proc far
sub ax,ax
push ax
push bx
push cx
sub dx,dx
push dx
mov ax,data
mov ds,ax
mov es,ax
mov cx,10
mov ax,2
log: push cx
push ax
div ax,2
mov bx,0
mov cl,al
loog:inc bx
div ax,bx
sub ah,0
jz sum
loop loog
sum: add dx,bx
sub dx,ax
jz print
inc ax
loop log
print:push dx
lea dx,mess1
push ax
mov ah,09h
int 21h
pop dx
mov ah,2
int 21h
pop ax
loop log
ret
code ends
end