From Inupt / Output Interfaces chapter in PU/ Microprocessor and Assembly Language Programming
Asked on 7 Feb, 2021
0
454 Views
Write a program to take input from 8 switches
connected to PORTB of 8255A PPI and display the status of the switches to 8 LEDs connected to PORTA of 8255A PPI.
switches to 8 LEDs connected to PORTA of 8255A PPI.
Given:
PORTA: Output Port
PORTB: Input Port
Mode of Operation: Mode 0 (Simple IO)
Control Word=10000010=82H
Consider:
Address of PORTA=8000H
Address of PORTB=8001H
Address of PORTC=8002H
Address of Control register=8003H
8085 ProgramMVI A, 82H ;move control word to A
STA 8003H ; store control word to control register
LDA 8001H ;load input from port B into A
STA 8000H ;send output to port B
HLT
Add your answer