Micro processor Lab Manual / Inverse Bit Position Of 8 Bit Number ALP

Program Name

Write a Assembly Language Program for Inverse Bit Position Of 8 Bit Number.
Theory
Instruction Mnemonic Operand Comments
MVI C,08 Move immediately the value 08 to register C
LDA 8100 Load the first 8-bit input of half second 16-bit to accumulator
MOV B,A Move the contents of accumulator to register B
MVI D,00 Move immediately the value 00 to register D
MOV A,B Move the contents of register B to accumulator
RAL Rotate accumulator to left through carry
MOV B,A Move the contents of accumulator to register B
MOV A,D Move the contents of register D to accumulator
RAR Rotate accumulator right through carry
MOV D,A Move the contents of accumulator to register D
DCR C Decrement the value of the contents of register C by 1
JNZ XX Jump to 8008 when zero flag is not set
MOV A,D Move the contents of register D to accumulator
STA 8200 Store the output at 8200
HLT Stop
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back