You are on page 1of 7

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

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

TO PERFORM GIVEN PROGRAM BY USING 8085 MICROPROCESSOR

a) HEXADECIMAL ADDITION OF TWO 8-BIT HEXADECIMAL NUMBERS


b) DECIMAL ADDITION OF 2-BIT DECIMAL NUMBERS
c) ADDITION OF TWO 16-BIT HEXADECIMAL NUMBER NEGLECTING CARRY

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) Hexadecimal addition of two 8-bit hexadecimal no.


Steps:
1) Initialize HL register pair with address where 1st no. lying
2) Store the no. in accumulator
3) Get 2nd no.
4) add two no. and store the result in 8002
5) Go back to Monitor

Address Code Label Mnemonic Operand Comments


8000 Data ( 1A ) 1st no. to be added
8001 Result ( 18 ) 2nd no. to be added
8002 Result ( 00 ) Result

Steps 1:
8003 11 START LXI H, 8000 Load HL pair and
8004 00 Point 1st no.
8005 80

Steps 2:
8006 7E MOV A,M Load the accumulator

Steps 3:
8007 23 INX H Advance pointer

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


8008 86 ADD M Add 2nd no.
8009 23 INX H Advance pointer
800A 77 MOV MA Store result

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


800B EF RST 5

To get Result
To run program Next → Reset→ Go → 8003 Starting point of program and →
Execute
To Observe result
Reset →Ex Mem→ Location of data ( 8000 ) → Next for next Data at ( 8001 ) and for
result press next i.e at ( 8002 ) , we get
8000 – 1A
8001 – 18
8002 – 32

b) Decimal addition of two 8-bit decimal number


Eg. 81+15 =96 (Result)
Steps:
1) Load the contents of first location in accumulator
2) add it with the contents of second location
3) Adjust the decimal
4) Store result and go back to monitor.

Address Code Label Mnemonic Operand Comments


8000 Data ( 23 ) 1st no. to be added
8001 Result ( 32 ) 2nd no. to be added
8002 Result ( 00 ) Result

Steps 1:
8003 21 LXI H, 8000 Point of IN no.
8004 00
8005 80
8006 7E MOV A,M Load no. in a accumulator

Steps 2:
8007 23 INX H Point to 2nd no.
8008 86 ADD M Add two no.

Steps 3:
8009 27 DAA Convert to decimal

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


800A 23 INX H Point to storage
800B 77 MOV M,A Store it
800C EF RST 5

For result: Next →Reset→ Go→ 8003 →Execute


Reset → Ex→ Mem→ 8000→ Next
8000 – 23
8001 – 32
8002 – 55

c) Addition of two 16-bit Hexadecimal no. neglecting carry


Steps:
1) Load the 1st no. in HL pair
2) Load 2nd no.
3) Add the two no. and store result
4) Go back to monitor.
Address Code Label Mnemonic Operand Comments
8000 LSB 1(A) LSB of 1st no.
8001 MSB 1(A7) MSB of 1st no.
8002 LSB 2(68) LSB of 2nd no.
8003 MSB 2(B9) MSB of 2nd no
8004 00 Result for LSB
8005 00 Result for MSB

Steps 1:
8006 2A START LHLD 8000 Load HL pair with 1st no.
8007 00
8008 80
Exchange HL and DE
8009 EB
resistor

Steps 2:
Load the HL pair with 2nd
800A 2A LHLD 8002
no.
800B 02
800C 80

Steps 3
800D 19 DAD
Add HL and DE registors
800E 22 SHLD 8004
store result in 8004
800F 04
8010 80

Steps 5:
8011 EF RST 5

For result: Next →Reset→ Go→ 8003 →Execute


Reset → Ex Mem→ 8000→ Next we get
8000 – CA
8001 – A7
8002 – 6B
8003– B9
8004– 35
8005– 61

Result

i) The addition of two 8 – bit hex no. 1A and 18 is 32


ii) The addition of two –bit decimal o. 23 and 32 is 55
iii) the addition of 16 bit no. A7CA and B96B is 6135
Here we neglected the carry in the addition of hexdecimal no. and decimal addition
should be carried out in such a way that the result is less than 100 as the output
1004 greater cannot be shown.
Precaution
a) Apparatus must be handled carefully
b) The location where the program starts is important as we have execute program
from same location.

Discussion
We can add 8-bit hexadecimal number ( by neglecting carry), two 8-bit decimal
number (<99) and two 16 bit hexadecimal number ( neglecting carry) successfully
with the help of various addition programs of microprocessor (8085). The address,
planning programming and the execution parts are the most important components
which contains the input data, micro-processor or programming parts and the result
parts. The proper Programming of related addition of two number (8-bit hexa –
decimal or 16 bit hexa decimal ) give the required results by 8085 microprocessor)

You might also like