Converting any hexadecimal value to decimal is very simple if you already remember the basic concept of hexadecimal conversion.
First, we are going to see the algorithms. It basically describes what you should do and how each step is performed.
After that, we will see the flowchart, which will tell us how the program flow works.
Algorithm
- Start
- Load the accumulator with 0FFH
- Load register B with decimal value 100
- Divide A by B
- Load R0 register with the content of Accumulator
- Load the content of B to the Accumulator
- Load B with the decimal value of 10
- Divide A by B
- Load the content of Accumulator to R1
- Load the content of B to R2 register
- Stop
Hexadecimal To Decimal Program (1st Method)
ORG 0000H
MOV A,#0FFH
MOV B,#100
DIV AB
MOV R0,A
MOV A,B
MOV B,#10
DIV AB
MOV R1,A
MOV R2,B
SJMP $
END
ASM
Output

Hexadecimal To Decimal Program (2nd Method)
ORG 0000H
MOV A,#0FFH
MOV B,#10
DIV AB
MOV R5,B
MOV B,#10
DIV AB
MOV R4,B
MOV B,#10
DIV AB
MOV R3,B
SJMP $
END
Output

Note:- If you want to run the program and see the output then I would highly recommend you install Keil uVision5.