Problem – Write an assembly language program in 8085 of interfacing between 8085 and 8255. 8 switches are connected at port A. Transfer the status of these switches into port B where LEDs are connected.
Input port is A and output port is B.
- Construct the control word register
- Input the data from port A
- Display the result in port B
|MVI A, 90||A ← 92|
|OUT 83||Control Register ← A|
|IN 80||A → Port A;||OUT 81||Port C A ← A|
- MVI A, 92 means that the value of control register is 92.
D7=1 as it is in I/O mode D6=0 & D5=0 as Poet A is in m0 mode D4=1 as Port A is taking input D3=0 & D0=0 as Port C is not taking part D2=0 as mode of Port B is m0 D1=0as Port B is displaying the result
- OUT 83 putting the value of A in 83H which is the port number of port control register.
- IN 80 taking input from 80H which is the port number of port A.
- OUT 81 displaying the result in 81H which is the port number of port B.
- RET return
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Assembly language program to find the range of bytes
- Assembly language program to find largest number in an array
- Program execution transfer instructions in 8086 microprocessor
- 8086 program to transfer a block of 4 bytes by using string instructions
- 8086 program to transfer a block of bytes by using string instruction
- Convert C/C++ code to assembly language
- Register Transfer Language (RTL)
- RS232C for Data Transfer
- Exit status of a child process in Linux
- Register content and Flag status after Instructions
- Synchronous Data Transfer in Computer Organization
- Data transfer instructions in 8085 microprocessor
- Data transfer instructions in 8086 microprocessor
- Program Execution in the CPU
- Program error signals
- 8085 program to add two 16 bit numbers
- 8085 program to add 2-BCD numbers
- 8086 program to add two 8 bit BCD numbers
- Reasons for a C++ program crash
- 8085 program to add two 8 bit numbers
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai