Statement:Convert an 8 bit hex no to its binary form & store in memory
|
Source Program:
- LXI H, 4150 : Initialize memory pointer
- MVI B, 08 : count for 8-bit
- MVI A, 54
- LOOP : RRC
- JC LOOP1
- MVI M, 00 : store zero it no carry
- JMP COMMON
- LOOP2: MVI M, 01 : store one if there is a carry
- COMMON: INX H
- DCR B : check for carry
- JNZ LOOP
- HLT : Terminate the program
|
Related Programs for Beginners: (Click down)
Sub routine to perform the task of DAA
Program to test RAM
Program to generate Fibonacci number
Generate a delay of 0.4 seconds