Problem – Interface 8255 with 8085 microprocessor and write an assembly program that determines the addition of contents of port A and port B and store the result in port C.
- Construct the control word register
- Input the data from port A and port B
- Add the contents of port A and port B
- Display the result in port C
|MVI A, 90||A ← 92|
|OUT 83||Control Register ← A|
|IN 80||A ← Port A;|
|MOV B, A||B ← A;|
|IN 81||A ← Port B;|
|ADD B||A ← A+B;||OUT 82||Port C ← 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=1as Port B is taking the input.
- 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.
- MOV B, A copies the content of A register to B register.
- IN 81 take input feom 81H which is the port number of port B.
- ADD B add the contents of A register and B register.
- OUT 82 displaying the result in 81H which is the port number of port C.
- RET return
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Interface 8255 with 8085 microprocessor for 1’s and 2’s complement of a number
- Subtract content of two ports by interfacing 8255 with 8085 microprocessor
- Microprocessor | 8255 (programmable peripheral interface)
- 8255 microprocessor operating modes
- Interface 8254 PIT with 8085 microprocessor
- Programmable peripheral interface 8255
- Interrupts in 8085 microprocessor
- Registers of 8085 microprocessor
- Flag register in 8085 microprocessor
- Instruction cycle in 8085 microprocessor
- Arithmetic instructions in 8085 microprocessor
- Logical instructions in 8085 microprocessor
- Data transfer instructions in 8085 microprocessor
- Branching instructions in 8085 microprocessor
- Reset Accumulator (8085 & 8086 microprocessor)
- Differences between 8085 and 8086 microprocessor
- Pin diagram of 8085 microprocessor
- Bus organization of 8085 microprocessor
- Serial I/O Lines in 8085 Microprocessor
- Difference between SIM and RIM instructions in 8085 microprocessor
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.