Sunday, August 19, 2012 -
microprocessor

## ASCII TO HEX CONVERSION

8085 instruction set.

ALGORITHM:

1. Load the given data in A- register

2. Subtract 30 H from A – register

3. Compare the content of A – register with 0A H

4. If A < 0A H, jump to step6. Else proceed to next step.

5. Subtract 07 H from A – register

6. Store the result

7. Terminate the program

PROGRAM:

LDA 4500

SUI 30

CPI 0A

JC SKIP

SUI 07

SKIP: STA 4501

HLT

OBSERVATION:

Input: 4500 31

Output: 4501 0B