Q. Write an 8085 program and draw a flow chart to mask the higher nibble of an 8-bit number.(8085 Microprocessor Program)
|2000||LDA||3000H||3A||Load H-L pair with data from 3000H.|
|2003||ANI||0FH||E6||AND Immediate 0FH with reg. A.|
|2005||STA||3001H||32||Store the result at memory location 3001H.|
- This program masks the higher nibble of an 8-bit number stored in memory location 3000H.
- Let us assume that the operand stored at memory location 3000H is 45H.
- The operand is moved to accumulator from memory location 3000H.
- Then, AND operation of 0FH is performed with the accumulator. This results in the masking of the higher nibble.
- The result is stored at memory location 3001H.