8085 program-Ascii to Decimal conversion
AIM
To prepare a program for 8085 to convert a decimal number to its corresponding ASCII number and to convert a given ASCII TO decimal.
PROGRAM FOR DECIMAL TO ASCII CONVERSION
LDA 4200
CPI 0A
JC LABEL1
ADI 30
JMP LABEL2
LABEL1:MVI A,EE
LABEL2:STA 4201
HLT
SAMPLE OUTPUT:
|
ADDRESS |
DATA |
INPUT/OUTPUT |
|
4200 |
01 |
Input |
|
4201 |
31 |
Output |
PROGRAM FOR ASCII TO DECIMAL CONVERSION
LDA 4200
SUI 30
JC LABEL2
CPI 0A
JC LABEL1
LABEL2:MVI A,EE
LABEL1:STA 4201
HLT
SAMPLE OUTPUT
|
ADDRESS |
DATA |
INPUT/OUTPUT |
|
4200 |
36 |
Input |
|
4201 |
06 |
Output |
RESULT
A program to convert decimal to ascii and ascii to decimal was prepared and output obtained.

