初学汇编 遇到的问题
提示: 作者被禁止或删除 内容自动屏蔽
data segment num db 3,?,?,? cnt db ? data ends code segment main proc far assume cs:code,ds:data start: mov ax,data mov ds,ax mov dx,offset num mov ah,0ah int 21h mov al,num+1 cmp al,1 jz flag1 mov al,num+2 sub al,30h mov bl,10 mul bl mov bl,num+3 sub bl,30h add al,bl jmp flag2 flag1: mov al,num+2 sub al,30h flag2: mov bl,al shr bl,1 jb flag3 inc al flag3: mov cnt,al mov cl,al mov ch,0 inc cl loop1: dec cx push cx sub al,cl jz flag4 mov cl,al loop2: mov dl,' ' mov ah,2 int 21h loop loop2 flag4: pop cx push cx loop3: mov dl,'*' mov ah,2 int 21h loop loop3 mov al,cnt pop cx loop loop1 mov ax,4c00h int 21h main endp code ends end start