.post large { float:left; color: $headerBgColor; font-size:100px; line-height:80px; padding-top:1px; padding-right:5px; }

News and Materials Headline Animator

Sunday, June 6, 2010

A microprocessor Program to convert BCD pack and Unpack number for 8085.

Please find the Below program to Pack the two unpacked BCD numbers stored in memory locations 4200H and 4201H and store result in memory location 4300H. Assume the least significant digit is stored at 4200H.


Here is the Sample problem:
(4200H) = 04
(4201H) = 09
Result = (4300H) = 94


Source program for the above logic

LDA 4201H : Get the Most significant BCD digit
RLC
RLC
RLC
RLC : Adjust the position of the second digit (09 is changed to 90)
ANI FOH : Make least significant BCD digit zero
MOV C, A : store the partial result
LDA 4200H : Get the lower BCD digit
ADD C : Add lower BCD digit
STA 4300H : Store the result
HLT : Terminate program execution

No comments:

Post a Comment

Popular Posts

News and Materials

Subscribe Now: Feed Icon

Infolinks In Text Ads

Related Posts with Thumbnails

Latest News

Time