0% found this document useful (0 votes)
716 views1 page

Pack The Unpacked BCD Numbers - Free 8085 Microprocessor Projects

The document describes a program to pack two unpacked binary coded decimal (BCD) numbers stored in memory locations 4200H and 4201H into a single packed BCD number stored in memory location 4300H. It provides sample input values of 04 stored in 4200H and 09 stored in 4201H, which would pack to 94 stored in 4300H. The program logic loads the digits, adjusts the position of the second digit, clears the least significant digit, stores the partial result, adds the lower digit, and stores the final result.

Uploaded by

sd_das99464
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
716 views1 page

Pack The Unpacked BCD Numbers - Free 8085 Microprocessor Projects

The document describes a program to pack two unpacked binary coded decimal (BCD) numbers stored in memory locations 4200H and 4201H into a single packed BCD number stored in memory location 4300H. It provides sample input values of 04 stored in 4200H and 09 stored in 4201H, which would pack to 94 stored in 4300H. The program logic loads the digits, adjusts the position of the second digit, clears the least significant digit, stores the partial result, adds the lower digit, and stores the final result.

Uploaded by

sd_das99464
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

6/3/2014 Pack the unpacked BCD numbers -Free 8085 Microprocessor projects

http://www.8085projects.info/Program10.html 1/1
Statement: 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.
Sample problem:
(4200H) = 04
(4201H) = 09
Result = (4300H) = 94
Source program
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
NOTE:
BCD NO.: The numbers "0 to 9" are called BCD (Binary Coded Decimal)
numbers. A decimal number 29 can be converted into BCD number by splitting
it into two. ie. 02 and 09.
Home
8085 Forum
8085 Free Projects
8085 Free Programs
8085 Tutorials
8085 details
Interfacing
Techniques
Electronic Tutorials
Electronic Projects
Assembler/ IDE
Datasheets
Guest Book
FLOWCHART

You might also like