Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

.

model small
.stack 64h
.data
msg1 db 'print interface',13,10,'$'
msg2 db 'nikhil voolla',13,10,'$'
db 'microprocessor lab',13,10,'$'
db 'ece dept',13,10,'$'
db 'cmrit bangalore-37',13,10,0ffh
pa equ 0e880h
pb equ 0e881h
pc equ 0e882h
cr equ 0e883h
cw equ 81h
.code
start:mov ax,@data
mov ds,ax
lea dx,msg1
mov ah,09h
int 21h
mov dx,cr
mov al,cw
out dx,al
mov bx,offset msg2
print:mov al,08h
mov dx,cr
out dx,al
mov al,09h
mov dx,cr
out dx,al
mov al,[bx]
cmp al,0ffh
jz stop
chk_busy:mov dx,pc
in al,dx
and al,02
jnz chk_busy
mov al,[bx]
mov dx,pb
out dx,al
call delay
mov al,08h
mov dx,cr
out dx,al
inc bx
jmp print
delay:mov cx,0fffh
rep1:loop rep1
ret
stop:mov ax,4c01h
int 21h
end start

You might also like