Вы находитесь на странице: 1из 23

Ex.No.

1
STUDY OF MICROPROCESSOR - 8085
Aim:
To study about the operation of 8085 Microprocessor

Specification:
1. Processor, Clock Frequency: Intel 8085A at 6.144 MHz Clock
2. Memory:
Monitor EPROM : 0000-FFFF
System RAM : 2000-3FFF
Monitor Data Area : 4000-40FF
User RAM Area : 4100-5FFF
RAM Expansion : 6000-BFFF
3. Input/output:
Parallel : 48 TTL/IO lines using two numbers of 8255
Serial : one number of RS232C compatible serial interface
using 8251A usart
Timer : Three Channel 16-bit Programmable Timer using 8251A
Channel 0 is used as baud rate clock generator for 8251A,
Channel 1 is used for single stepping user programs,Channel 2
is used for hardware single stepping user programs.
4. Display : 6 digit, 0.3’’,7 segment red LED display with filter.4 digit for
address display and two digits for data displaying
5. Keyboard : 21 Keys soft keyboard including command keys and hexa
decimal keys.
6. System Power Consumption:
Micro – 85EB
+5V @1Amps
+12V @200 mA
-12V @100 mA
+5V @ 500mA
7. Power Supply Specifications:
Input : 230V AC at 50H

Output : +5Volts @ 3 Amps


+12Volts @ 250 mA
30Volts @ 250 mA
230Volts AC @ 50Hz
8. Physical Characteristics:
M –85EB PCB 230 * 170 mm(L*B)
Weight 1Kg
9. Bus Expansion:
A VXT bus has been incorporated in micro-85EB which facilitates to
patch up any extra hardware to micro 85EB.All address, data and control
signals are brought out to the bus.

Substitute Memory Command:

Function:
This command is used to examine the contents of selected memory location and
modify the RAM contents if desired.
RES :
This RES key allows the user to terminate any activity and return the Micro-
85EB to an initialized state. When pressed, message appears in the display for a few
seconds and then the monitor will come to the command prompt ‘-’ in the left most digit.
INT :
Maskable interrupt connected to CPU is RST 7.5 interrupt.
DEC:
Decrement the address key one and display key one and display its contents or
previous register content.
EXEC:
Executes a particular program after selecting the address through GD command.
NEXT:
Increment the address by one and display its contents or display the next register
contents.
SUB:
(i) Hex key enter ‘0’
(ii) This key is for substituting memory contents when the next key is pressed
immediately after this it takes the user to the start address for entering user
program.
(iii) Register key “E”.
Reg:
(i) Hex Key ‘1’
(ii) Examine the 8085 A register and modify the same.
(iii) Register key “D”.
W:
(i) Hex Key ‘2’
(ii) Retrieve data from memory on to audio tape.
(iii) Register key “C”.
TR:
(i) Hex Key ‘3’
(iv) Retrieve data from memory on to audio tape.
(v) Register key “B”.
BLOCK:
(i) Hex Key ‘4’
(ii) Block search for a byte
(iii) Register key “F”.
FILL:
(i) Hex Key ‘5’
(ii) Fill block of RAM memory with desired data.
(iii) Register key “A”.
SER:
(i) Hex Key ‘6’
(ii) Transmit /Receive data/ to from the serial Port.
(iii) Register key “L”.
F2:
(i) Hex Key ‘7’
(ii) Register key “H”.
GO:
(i) Hex Key ‘8’
(ii) Start running a particular program
(iii) Register key “I”.
SNG:
(i) Hex Key ‘9’
(ii) Register key “PL”.
F3:
(i) Hex Key ‘A’
(ii) Register key “PH”.
BC:
(i) Hex Key ‘B’
(ii) Check for a particular block for blank.
(iii) Register key “SL”.
MOV:
(i) Hex Key ‘C’
(ii) Move block of memory to another.
(iii) Register key “SH”.
CMP:
(i) Hex Key ‘D’
(ii) Compare memory block.
INS:
(i) Hex Key ‘E’
(ii) Insert bytes into memory(RAM)
DEL:
(i) Hex Key ‘F’
(ii) Delete bytes from memory(RAM)
Compare command:
The command compares the contents of the blocks of memory location and
display address whose contents are not identical.
Syntax:
CMP <Start ADDR><next><End ADDR><next><DEST ADDR><next >
Insert command:
This command inserts specified file bytes in the desired memory location.
Syntax:
INS<Program End ADDR ><NEXT><INSERTADDR><NEXT><DATA><NEXT>
Delete command:
This command deletes a block of bytes from a memory.
Syntax:
#DEL<Start ADDR><next><End ADDR><next><Program EndADDR><next>

Result:
Thus, the operation of 8085 Microprocessor is studied.
_______________________________________________________________________
_
EX.NO: 2

Date: / /2009

ADDITION AND SUBTRACTION OF TWO 8 BIT NUMBERS (8085)

1. 8 – BIT ADDITION

Aim: To Add two 8 bit numbers and store the result in memory
Apparatus Required:

Microprocessor 8085 kit, Power Supply

Algorithm:

1. Clear D register.
2. Load First 8 bit data to the Accumulator and move A to B register.
3. Load second 8 bit data to the Accumulator.
4. Add contents of A & B registers.
5. If carry flag is set, increment D register else go to next step.
6. Store the contents of A to the specified Memory.
7. Move the contents of D to A register
8. Store the contents of A to the specified Memory.
9. End the program.
PROGRAM:
HEX
ADDRESS LABEL MNEMONICS COMMENTS
CODE
4100 16,00 MVI D,00 Clear D register
4102 3A,01,42 LDA 4201 Load First 8 bit data to the Accumulator
4105 47 MOV B,A Move the data from A to B register.
4106 3A,02,42 LDA 4202 Load Second 8 bit data to the Accumulator
4109 30 ADD B Add contents of A & B registers.
410A D2,10,41 JNC LOOP1 If carry flag is set, go to next step else
go to LOOP1
410D 14 INR D increment D register
410E 32,03,42 LOOP1 STA 4203 Store the contents of A to the specified
Memory
4111 7A MOV A,D Move the data from D to A register
Store the contents of A to the specified
4112 32,04,42 STA 4204 Memory
4115 76 HLT End the program

Sample Output:

4201 : data1
4202 : data 2
4203 : Result
4204 : Carry
Flowchart:
8 – Bit Addition: START
ii) 8 –BIT SUBTRACTION

Aim: To Subtract two 8 bit numbers and store the result in memory

Apparatus Required:

Microprocessor 8085 kit, Power Supply

Algorithm:

1. Load the subtrahend (the data to be subtracted) from memory to


accumulator and move it to B reg
2. Load the minuend from memory to accumulator
3. Clear C register to account for sign of the result
4. Subtract the contents of B register (subtrahend) from the content of
accumulator (minuend).
5. Check for carry, If carry =1, go to step 6 or If carry = 0 , go to step 7
6. Increment C register, Complement the accumulator and Add 01.
7. Store the difference in memory
8. Move the content of C register (sign bit) to accumulator and store in
memory
9. End the program.
PROGRAM:
HEX
ADDRESS LABEL MNEMONICS COMMENTS
CODE
4100 3A,01,42 LDA 4201 Get the subtrahend in A register
4103 47 MOV B,A
4104 3A,00,42 LDA 4200 Get the minuend in A register
4107 0E,00 MVI C,00 Clear C register to account for sign
4109 90 SUB B Get the difference in A reg
410A D2,11,41 JNC LOOP1 If CY = 0, then go to LOOP1
410D 0C INR C If CY = 1, then increment C register
Get 2 ‘s complement of difference
410E 2F CMA
(result) in A register
410F C6,01 ADI 01
4111 32,02,42 LOOP1 STA 4202 Store the result in memory
4114 79 MOV A,C
4115 32,03,42 STA 4203 Store the sign bit in memory
4118 76 HLT

Sample Output:
4200 : (minuend)
4201 : (Subtrahend)
4202 : (Difference)
4203 : (Sign bit)

RESULT:
Thus the program for 8 bit addition and subtraction have been performed
successfully using the microprocessor 8085 kit.

_______________________________________________________________________
_
EX.NO: 3

Date: / /2009

MULTIPLICATION AND DIVISION OF TWO 8 BIT NUMBERS (8085)

i) 8 – BIT MULTIPLICATION:
Aim:
To multiply two 8 bit numbers and store the result in memory
Apparatus Required:

Microprocessor 8085 kit, Power Supply

Algorithm:

1. Clear D register.
2. Load First 8 bit data to the Accumulator and move A to B register.
3. Load second 8 bit data to the Accumulator and move A to C register.
4. Clear A register.
5. Add contents of A & B registers.
6. If carry flag is set, go to next step else go to step 8.
7. Increment D register.
8. Decrement C register.
9. If Zero flag is set, go to next step else go to step 5.
10. Store the contents of A to the Memory.
11. Move the contents of D to A register.
12. Store the contents of A to the Memory.
13. End the program.

PROGRAM:
ADDRES HEX
LABEL MNEMONICS COMMENTS
S CODE
4100 16,00 MVI D,00 Clear D register
4102 3A,00,42 LDA 4200 Load First 8 bit data to the A Reg
4105 47 MOV B,A
4106 3A,01,42 LDA 4201 Load second 8 bit data to the A Reg
4109 4F MOV C,A
410A 3E,00 MVI A,00 Clear A register
410C 80 LOOP2 ADD B Add contents of A & B registers.
If carry flag is set, go to next step else go to
410D D2,11,41 JNC LOOP1
LOOP1
4110 14 INR D Increment D register
4111 0D LOOP1 DCR C Decrement C register
If Zero flag is set, go to next step else go to
4112 C2,0C,41 JNZ LOOP2
LOOP 2
4115 32,05,42 STA 4205 Store the result (Lower order) in memory
4118 74 MOV A,D
4119 32,06,42 STA 4206 Store the result (Higher order) in memory
411C 76 HLT
Sample output:
4200 : data1 (Multiplier)
4201 : data2 (Multiplicand)
4205 : Lower order byte of Result
4206 : Higher order byte of Result

ii) 8 – BIT DIVISION:

Aim: To divide two 8 bit numbers and store the result in memory

Apparatus Required:

Microprocessor 8085 kit, Power Supply

Algorithm:

1. Clear D register.
2. Load First 8 bit data (dividend) to the Accumulator and move A to B register.
3. Load second 8 bit data (divisor) to the Accumulator.
4. Compare A with B register.
5. If carry flag is set, go to step 8 else go to next.
6. Subtract A & B registers and increment D register.
7. Jump to step 4.
8. Store the contents of A (Reminder) to the Memory location.
9. Move the contents of D to A register.
10. Store the contents of A (Quotient) to Memory location.
11. End the program.
PROGRAM:

HEX
ADDRESS LABEL MNEMONICS COMMENTS
CODE
4100 16,00 MVI D,00 Clear D register
Load First 8 bit data (dividend) to the
4102 3A,00,42 LDA 4200
Accumulator
4105 47 MOV B, A Move the contents of A to B register
Load Second 8 bit data (divisor) to
4106 3A,01,42 LDA 4201
the Accumulator
4109 B8 LOOP2 CMP B Compare A with B register.
410A DA,12,41 JC LOOP1 If carry flag is set, go to LOOP1 else
go to next.
410D 90 SUB B Subtract A & B registers
410E 14 INR D Increment D register
410F C3,09,41 JMP LOOP2 Jump LOOP2
Store the result (Reminder) in
4112 32,03,42 LOOP1 STA 4203 memory
4115 7A MOV A,D Move the contents of D to A register
Store the result (Quotient) in
4116 32,04,42 STA 4204 memory
4119 76 HLT
Sample Output:
4200: Dividend
4201 : Divisor
4203 : Remainder
4204 : Quotient
RESULT:

Thus the program for 8 bit arithmetic operations have been performed
successfully using the microprocessor 8085 kit.
EX.NO: 3

Date: / /2009

ADDITION/ SUBTRACTION OF TWO 16 BIT NUMBERS (8085)

i) 16-bit Addition:
Aim: To Add two 16 bit numbers and store the result in memory
Apparatus Required:

Microprocessor 8085 kit, Power Supply

Algorithm:

1. Clear B register.
2. Load 16 bit data into HL register pair.
3. Exchange data between HL and DE.
4. Load next 16 bit data into HL register pair.
5. Add the contents of HL & DE register pair...
6. If carry flag is set, go to step 7 else go to step 8.
7. Increment B register.
8. Store the contents of HL into the Memory.
9. Move the contents of B in to A register.
10. Store the contents of A in the Memory.
11. End the Program.

PROGRAM:

HEX
ADDRESS LABEL MNEMONICS COMMENTS
CODE

4100 06,00 MVI B,00 Clear B register


4102 2A,00,42 LHLD 4200 Load first 16 bit data into HL reg pair
4105 EB XCHG Exchange data between HL and DE
Load second 16 bit data into DE reg
4106 2A,02,42 LHLD 4202 pair
4109 19 DAD D Add the contents of HL & DE reg pair
If carry flag is set, go to next else go to
410A D2,0E,41 JNC LOOP1 LOOP1
410D 4 INR B Increment B register
Store the contents of HL into the
410E 22.05,42 LOOP1 SHLD 4205 Memory
Move the contents of B in to A
4111 78 MOV A, B register
Store the contents(carry) of A in the
4112 32,07,42 STA 4207 Memory
4113 76 HLT End the Program
Sample output:
4200 : Lower order byte of data 1
4201 : Higher order byte of data 1
4202 : Lower order byte of data 2
4203 : Higher order byte of data 2
4205 : Lower order byte of Result
4206 : Higher order byte of Result
4207 : Carry

Flowchart:
16-BIT ADDITION:
START
ii) 16-bit Subtraction:

Aim: To subtract two 16 bit numbers and store the result in memory

Apparatus Required:

Microprocessor 8085 kit, Power Supply

Algorithm:

1. Clear B register.
2. Load 16 bit data into HL register pair.
3. Exchange data between HL and DE register pair.
4. Load next 16 bit data into HL register pair.
5. Move the contents of E to A register.
6. Subtract the contents of A & L register.
7. Store the contents of A in to the Memory.
8. Move the contents of D to A register.
9. Subtract the contents of A & H register.
10. If zero flag is set, go to next step else go to step 12.
11. Increment B register.
12. Store the contents of A in the Memory.
13. Move the contents of B to A register.
14. Store the contents of A in the Memory.
15. End the Program.

.
PROGRAM: 16-bit Subtraction

HEX
ADDRESS LABEL MNEMONICS COMMENTS
CODE
4100 06,00 MVI B,00 Clear B register.
4102 2A,00,42 LHLD 4200 Load first 16 bit data into HL reg pair
4105 EB XCHG Exchange data between HL and DE
Load second 16 bit data into DE reg
4106 2A,02,42 LHLD 4202 pair
4109 7B MOV A,E Move the contents of E to A register
410A 95 SUB L Subtract the contents of A & L register
Store the contents of A in to the
410B 32,04,42 STA 4204 Memory
410E 7A MOV A,D Move the contents of D to A register
Subtract the contents of A & H register
410F 9C SBB H
with Barrow
If zero flag is set, go to next else go to
4110 D2,14,41 JNC LOOP1
LOOP1
4113 04 INR B Increment B register.
Store the contents of A in to the
4114 32,05,42 LOOP1 STA 4205 Memory
4117 78 MOV A,B Move the contents of B to A register
Store the contents of A into the
4118 32,06,42 STA 4206 Memory
411B 76 HLT End the program
.

Sample output:
4200 : Lower order byte of data 1
4201 : Higher order byte of data 1
4202 : Lower order byte of data 2
4203 : Higher order byte of data 2
4204 : Lower order byte of Result
4205 : Higher order byte of Result
4206 : Borrow

RESULT:

Thus the program for 16 bit arithmetic operations have been performed
successfully using the microprocessor 8085 kit.

Вам также может понравиться