.model small
.stack 100h
.data
	lsb equ 3f8h
	msb equ 3f9h
	lcr equ 3fbh
	lsr equ 3fdh
	fifo equ 3fah
.code
	;initialize the UART
	mov al,80h
	mov dx,lcr
	out dx,al
	mov al,0ch
	mov dx,lsb
	out dx,al
	mov al,0
	mov dx,msb
	out dx,al
	mov al,03h
	mov dx,lcr
	out dx,al
	mov al,07h
	mov dx,fifo
	out dx,al
l1:
	mov ah,1
	int 21h
	mov ah,al
t:
	mov dx,lsr
	in al,dx
	test al,20h
	jz t
	mov al,ah
	mov dx,lsb
	out dx,al
;r:
;	mov dl,10
;	mov al,2h
;	int 21h
;	mov dx,lsr
;	in al,dx
;	test al,01h
;	jz r
;	mov dx,lsb
;	in al,dx
;	mov dl,al
;	mov ah,2
;	int 21h
	jmp l1
	
	mov ah,4ch
	int 21h
end
	
	
	
	
	