prnchar macro char
mov ah,02h
mov dl,charint 21h
endm
data segment
temp db ?
msg db 10,13, "The digits are : $"
data ends
code segment
assume ds:data, cs:code
start:
mov ax,data
mov ds,ax
prnchar 0ah
mov ah,09h
lea dx,msg
int 21h
mov ah,00h
mov al,30h
l1:
prnchar al
inc al
cmp al,3ah
jnz l1
prnchar 0ah
mov ah,4ch
int 21h
code ends
end start