In this post, we will see how to convert a given ASCII Character into its equivalent Hexa Decimal (HEX) number using the 8085 microprocessor program or instruction set.
Algorithm for ASCII to HEX Conversion with 8085 microprocessor
- Load the given data in A register
- Subtract 30 H from A register
- Compare the content of A register with 0A H
- If A < 0A H, jump to step6. Else proceed to next step.
- Subtract 07 H from A register
- Store the result
- Terminate the program
8085 Program to convert ASCII to Hexa Decimal number | ASCII to HEX program code in 8085
SKIP: STA 4501
Input: 4500 31
Output: 4501 0B
Thus the given ASCII character was converted into its equivalent Hexa Value using the 8085 microprocessor program.