Programa que repite mensajes
; You may customize this and other start-up templates;
; The location of this template is c:\emu8086\inc\0_com_template.txt
org 100h
.model small
.stack 64
.data
mensaje db "Ingrese el numero de veces que se repetira el mensaje (1-9)",13,10,'$'
repetir db 13,10, "Repitiendo el ciclo $"
.code
inicio proc far
mov ax, @data
mov ds, ax
mov ah, 09
lea dx, mensaje
int 21h
mov ah, 01
int 21h
;convertir a valor que se tecleo
sub al, 30h
mov cl,al
ciclo:
mov ah, 09
lea dx, repetir
int 21h
loop ciclo
mov ax,4c00h
int 21h
inicio endp
ret
Resultado:

No hay comentarios:
Publicar un comentario