Saludos, espero sea de utilidad
.model small
.stack 100h
.data
CR equ 0dh
LF equ 0ah
aster db '*'
mens db 'Ingresa un digito',CR,LF,'$'
cnum db 2 dup (' ')
numero db ?
.code
inicio:
mov ax,@data
mov ds,ax
push ds
pop es
;--------------------------------------------------------------------------
mov ah,09h
lea dx,mens
int 21h
mov ah,0ah
lea dx,cnum
int 21h
;---------------------------------------------------------
mov ax,0600h ;limpia pantalla
mov bh,07
mov cx,0000h
mov dx,314fh
int 10h
;..................................
mov ah,03h
mov bh,00
int 10h
inc dh
mov ah,02h
int 10h
;--------------------------------------------------------
xor ax,ax
xor dx,dx
xor bx,bx
xor si,si
lea si,cnum+2 ;el programa admite numeros del 0 al 9,
mov al,[si] ;si deseas mas cifras debes modificar esta rutina
xor al,30h
mov numero,al
xor cx,cx
ciclo1:
mov ah,09h
mov al,aster
mov bh,00h
mov bl,07h
int 10h
inc cl
inc dh
mov ah,02h
int 10h
cmp cl,numero
je ciclo2
jmp ciclo1
ciclo2:
mov ah,09h
mov al,aster
mov bh,00h
mov bl,07h
int 10h
dec cl
inc dh
mov ah,02h
int 10h
cmp cl,00
je salta
jmp ciclo2
salta:
mov ax,4c00h
int 21h
end inicio