Write an assembly language program to CONVERT a packed BCD to itsequivalent BINARY format: A BCD number between 0 and 99 is stored in memory location 9100H. Write a main program and a conversion subroutine to convert the BCD number into its equivalent binary number. Store the result in the memory location 9200H and also display at Port 3H.
# ORG 8000H
START : LDA 8500
MOV B,A
ANI 0FH
MOV C,A
MOV A,B
ANI F0H
RRC
RRC
RRC
RRC
MOV B,A
XRA A
MVI D,0AH
SUM:ADD D
DCR B
JNZ SUM
ADD C
STA 8501H
HLT
# ORG 8500
# DB 15
Post a Comment
0 Comments