8 bit BCD to ASCII-8085
??????? ???????? (Er. Anoushka Tripathi)
Verification Trainee @COVERIFY|RISC V Design & Verification|Final year|VLSI Engineer|Bhāratīya
Simplified through Visualization......
Here we will reverse engineer the hardware to understand how program works at hardware level
So now for converting a number from BCD to ASCII we will obviously need data so we will get the data from memory to accumulator...
Obviously for this we will have to fetch the instruction from memory,how we will do it ....
So, finally we have learnt how instruction gets fetched inside a microprocessor now when the instruction is getting decoded the program counter is incremented and a new instruction is fetched.
So,other instructions of this program will be fetched in similar way...
Let us reverse engineer the ALU to understand how this works at hardware level
Now we have got the desired output we will store it in the memory
Timing control unit will generate write signal...
So,finally we have successfully achieved our one goal...
What about the other...
how will store 32 at 3051...
But...
now we have no original data i.e 23 in the processor
So,dont you think we have missed something crucial....
We missed moving the content of A into B...
So how we will achieve the above outcomes...
Before this AND operation we must have content in accumulator so
MOV A,B
Success After 4 RLC operation we have got 2 at LSB
Now add 30 to it
ADI 30H
store the content at 3051 H
STA 3051H
So, finally we did it
LDA 2050
MOV B, A
ANI 0F
ADI 30
STA 3050
MOV A, B
ANI F0
RLC
RLC
RLC
RLC
ADI 30
STA 3051
HLT
Thank you so much