PROGRAM NO.8
OBJECT:Write a program to read 8-bit data from port B. Complement this data & send it back to port A of IC8255-PPI in mode-0.
Control word- 83H
Port Address of Control Register- FFFE
Port Address of Port A- FFF8
Port Address of Port B- FFFA
INSTRUMENT REQUIRED: 8086 Microprocessor Trainer Kit.
PROGRAM:
| MEMORY LOCATION | MACHINE CODE | OPCODE | OPERAND |
| 0200 | BA FE FF | MOV | DX,FFFE |
| 0203 | B083 | MOV | AL,83H |
| 0205 | EE | OUT | DX,AL |
| 0206 | BA FA FF | LOOP1: MOV | DX,FFFA |
| 0209 | EC | IN | AL,DX |
| 020A | F6 D0 | NOT | AL |
| 020C | BA F8 FF | MOV | DX,FFF8 |
| 020F | EE | OUT | DX,AL |
| 0210 | 75 F4 | JMP LOOP1 | |
| 0212 | F4 | HLT |
DESCRIPTION:
To solve the given objective we have taken a Control Word to control the input.
83H is the memory location where the control word i.e. Input is placed or stored. Control word has a program which is used to make the Microprocessor Unit(MPU) understand the Input. Logic Controller Interface Card is used when we do not want to use 7-segment LED display.
To solve the given objective we have taken the following steps:
BIT PATTERN FOR CONTROL WORD
| D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
- Move the data register (DX) to the memory location where the Control word i.e. 83H is stored, i.e. at FFFE.
- Move the control word 83H to the AL register.
- Complement the data of port B i.e. FFFA using NOT instruction and sent it back to port A i.e. FFF8 using a loop to JMP at port A.
- And finally Halt, the program.
INPUT:
| MEMORY LOCATION | VALUE |
| FFF8 (Address of Port A) | 00 |
| FFFA (Address of Port B) | 03 |
| FFFE (Address of Control Register) | 83 |
OUTPUT:
| MEMORY LOCATION | VALUE |
| FFF8 (Address of Port A) | FC |
| FFFA (Address of Port B) | 03 |
| FFFE (Address of Control Register) | 83 |
RESULT: The complemented data from port address FFFA i.e. Port B has been transferred to port address FFF8 i.e. Port A using IC8255-PPI in mode-0.
FLOWCHART:

Most Important Question for Exam
Microprocessor
Register
16 bit
One
Internal Decoder
MCMR
Memory
Address
Control
Micro Computer
Memory
Microprocessor
Handshaking
Set
Control Logic
A0
Cascade
Decoder
1978
High performance metal oxide semiconductor
29000
Deta Enable
Signed numbers go out of their range after an arithmetic operation
Coprocessor is interfaced in min mode
SRAM
Microcontrolle
Direct memory access(DMA)
Assembler
1,048,576 locations
ROL (rotate left)
Related Link
- 8086 Instruction Hex Code
- Write a program to two add 16 bit Hexadecimal numbers without carry.
- Write a program to two add 16 bit Hexadecimal numbers with carry.
- Write a program to find the greatest number from an array of 10 numbers.
- Write a program to calculate the factorial of a number.
- Write a program to multiply two 16-bit numbers result should be greater than 16 bit.
- Write a program to input 5 numbers and arrange them in descending order.
- Write a program to convert the string data it’s Two’s complement form.
- Write a program to read 8 bit data from Port B. Complement this data & send it back to Port A of
- Write a program to move a block of data from one memory location to another. Input Value
- Write a program to find Gray code equivalent of a Binary number using Lookup Table.
- Microprocessor 8086 Video Play List
