# FY-3-a Easy 8085 program to pack the two unpacked BCD numbers stored in memory locations

## 8085 program to pack the two unpacked BCD numbers stored in memory locations

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.

`0700 010701 09LDA 0700  # 0700 = 01 || 0701 = 09 || A = 01 || B = 00MOV B A   # 0700 = 01 || 0701 = 09 || A = 01 || B = 01LDA 0701  # 0700 = 01 || 0701 = 09 || A = 09 || B = 01RLC            # 0700 = 01 || 0701 = 09 || A = 12 || B = 01RLC            # 0700 = 01 || 0701 = 09 || A = 24 || B = 01RLC            # 0700 = 01 || 0701 = 09 || A = 48 || B = 01RLC            # 0700 = 01 || 0701 = 09 || A = 90 || B = 01ORA B       # 0700 = 01 || 0701 = 09 || A = 91 || B = 01STA 0702 # 0700 = 01 || 0701 = 09 || A = 01 || B = 00 || 0702 = 91HLT`

LDA 0700 – A 24 bits (3 bytes) command which will load content of memory location 0700 in register A i.e. Accumulator.

MOV B A – A 8 bits (1 byte) command which will copy and load data of Accumulator to register B.

LDA 0701 – This command will load content of memory location 0701 in register A i.e. Accumulator.

RLC – It stands for “Rotate Left Accumulator”. It rotates the Accumulator contents to the left by 1-bit position and MSB bit will be shifted in Carry flag and LSB.

ORA B – It stands for “OR Accumulator”. This command will perform Logical OR operation of content of B with content of Accumulator

STA 0702 – A 24 bits command which will store data of accumulator in memory location 0702.

HTL – It means Halt the microprocessor.

### 8085 program to pack the two unpacked BCD numbers

Video coming soon..