You are on page 1of 6

Date…………………………..

Experiment no: 06
Class: M.Sc 4th Semester Group………………………….
Roll no. 91 Sub……………………………..
Shift: Day Set……………………………...

TO PERFORM GIVEN PROGRAM BY USING 8085 MICROPROCESSOR

a) ADDITION OF 8-BIT NUMBER SERIES ( NEGLECTING


CARRY)
b) SEPARATION OF HEXADECIMAL NUMBER INTO TWO
DIGITS
c) COMBINATION OF TWO HEX NIBBLES TO FORM ONE
BYTE NUMBER

Apparatus Required
Microprocessor Kit/Device (8085)

Theory
It is programmable electronic chip ( Integrated circuit (IC). A single IC has
computing and decision making capabilities similar to central processing unit of
computer.
8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit
microprocessor designed by Intel in 1977 using NMOS technology.
It has the following configuration −
 8-bit data bus
 16-bit address bus, which can address upto 64KB
 A 16-bit program counter
 A 16-bit stack pointer
 Six 8-bit registers arranged in pairs: BC, DE, HL
 Requires +5V supply to operate at 3.2 MHZ single phase clock
The architecture of 8085 microprocessor mainly includes the timing & control unit,
Arithmetic and logic unit, decoder, instruction register, interrupt control, a register
array, serial input/output control. The most important part of the microprocessor is
the central processing unit. It has a set of registers for performing various
operations. The various registers include
Accumulator (register A)
Registers: B, C, D, E, H and L
· Stack pointer
· Program Counter
· Temporary register
The 8085 microprocessor has 74 basic instructions and 246 total instructions. The
instruction set of 8085 was defined by the manufacturer INTEL CORPORATION.
Each 8085 instruction has a one-byte (8-bit) operation codes or opcode. With 8-bit
binary opcode, a total of 256 different operation codes can be generated, each
representing a certain operation. It is used in washing machines, microwave ovens,
mobile phones, etc.

OBSERVATION OR CALCULATION

a) Addition of 8-bit number series ( neglecting carry )


Address
Code Label Mnemonic Operand Comments
Planning
NO. of hexadecimal to
8100 Data ( 04 )
be added
8101 Data ( 10 ) First Hex. No
8102 Data ( 02 ) 2nd Hex no.
8103 Data ( 08 ) 3rd Hex no.
8104 Data ( 04 ) 4th Hex no.
Steps 1: Load the content from 8100 location
Point to no. of bytes to be
8000 21 Start LXI H,8100
added
8001 00
8002 81
8003 46 MOV B,M Load count in register B

Steps 2: Initialize accumulator as the result will be stored in accumulator


8004 AF XRA a Clear A Registor

Steps 3: Initialize accumulator as the result will be stored in accumulator


8005 23 Loop INX H Point to 1st no.
8006 86 ADD M Add memory to total

Steps 4: Decrement of the counter having no. of bytes


8007 05 DRC B Subtract form count

Steps 5: Check if zero. NO repeat from point 3


8008 C2 INT Loop Test to see if done
8009 05
800A 80

Steps 6: Check if zero. NO repeat from point 3


800B 32 8TA 8100 Save the result
800C 00
800D 81

Steps 7: Check if zero. NO repeat from point 3


800E EF R&T 5

To run program Next → Go →8003→ Execute


To See result Reset →Exam Man →8105→ Next we get
8105→1E

b) Separation of Hexadecimal number into two digits


Address Code Label Mnemonic Operand Comments
8100 Data ( AF ) No. to be separated
8101 Result ( 00 ) Result for LSB
8102 Result ( 00 ) Result for MSB

Steps 1: load the bytes into Accumulator


8000 3A START LDA 8100 Get the no.
8001 00
8002 81

Steps 2: Clear the MS nibble and store in 8101


8003 E6 ANI Mask off the first 4-bits
8004 00 STA 8101
8005 81
8006 46 Store result first
8007 81

Steps 3: Load the byte from 8100


8008 3A LDA 8101 Get the no. again
8009 00
800A 81

Steps 4: Clear the L.S nibble and store it at 8102


800B E6 ANI F0 Mask off the last 4-bit
800C F0
800D 32 STA 8102 Store result of 8102
800E 02
800F 81

Steps 5: Decrement of the counter having no. of bytes


8010 EF RST 5

To run program Next → Reset→ Go → 8000 → Execute


To find result Next → Ex Mem→ 8100 → Next, we get
8100 → AF
8101 → OF [ LSB of AF ]
8102 → AO [ MSB of AF ]

c. Combination of two hexa-nibbles to form one byte number ( neglecting carry)


Address
Code Label Mnemonic Operand Comments

8100 Data ( 04 ) MSB of no.


8101 Data ( 05 ) LSB of no.
8102 Result ( 00 ) Result

Steps 1: Initialize memory pointer with 8100 and load MS into Accumulator
8000 21 START LXI H, 2100 Point 1st no.
8001 00
8002 81
8003 7E

Steps 2: Shift the 4 –bits towards left, shifted info. is stored in Accumulator
8004 07 RLC
8005 07 RLC Move it to MSB
8006 07 RLC
8007 07 RLC
Steps 3: Point the next location 8101 and ‘OR’ it’s contents with the contents of
ACC
8008 23 INX H Point to next no.
8009 B6 ORA M Or the no. together

Steps 4: Increment of the memory pointer to store result at 8102


800A 23 INX H Store result
800B B6 MOV M,A

Steps 5: Go Back to Monitor


800C EF RST 5

To run program Next → Reset→ Go → 8000 → Execute


To find result Next → Exam Mem→ 8100 → Next, we get
8100 → 04 ( MSB )
8101 → O5 ( LSB )
8102 → 45 [ No. ( result ) ]

Result and Conclusion

 The addition of four hex-no. 10,62,08 and 04 is 1E


 The separation of hex-no. AF gives MSB = AO and LSB = OF
 The formation of hex-no. from MSB = 04 and LSB = 05 is 45
The location of the data must be considered in mind so that the accumulator can be
loaded in that location.

Precautions:
a) The location of data must be taken in mind
b) The location of program must be remembered as the execution of program must
start from that location.

You might also like