org 100h
.model small
.data
star db 0
starcount db 5
.code
mov ax,@data
mov ds,ax
main proc
mov star,1 ; i=0
cond:
mov dl,starcount ;i<=n
cmp star,dl
jle print
jmp exit
print:
mov ah,2 ;print
mov dl,'*'
int 21h
inc star ;i++
jmp cond
exit:
endp
end main
Output
*****
Add your comment