assume cs: code code segment mov cx,10d mov ax,0 mov bx,0 s: inc bx add ax,bx loop s mov bl,10d div bl mov bh,ah mov bl,al mov dl,bl add dl,30h mov ah,2 int 21h mov dl,bh add dl,30h mov ah,2 int 21h code ends end
运行结果
assume cs: code code segment mov cx,10d mov ax,0 mov bx,0 s: inc bx add ax,bx loop s mov bl,10d div bl mov bh,ah mov bl,al mov dl,bl add dl,30h mov ah,2 int 21h mov dl,bh add dl,30h mov ah,2 int 21h code ends end
运行结果