0% found this document useful (1 vote)
554 views1 page

8086 Assembly Code To Interface With An Printer Using 8255

This document contains assembly language code to print multiple strings to the screen using ports. It initializes data segments containing strings, sets port addresses, then prints the first string. It uses a loop to print each character in subsequent strings, checking a port to see if the printer is busy before sending each character, and adding a delay between characters. The program ends after printing all strings.

Uploaded by

Nikhil Voolla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
554 views1 page

8086 Assembly Code To Interface With An Printer Using 8255

This document contains assembly language code to print multiple strings to the screen using ports. It initializes data segments containing strings, sets port addresses, then prints the first string. It uses a loop to print each character in subsequent strings, checking a port to see if the printer is busy before sending each character, and adding a delay between characters. The program ends after printing all strings.

Uploaded by

Nikhil Voolla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 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