8085 - Microprocessor Lab File
8085 - Microprocessor Lab File
UCS617
Microprocessor-Based System Design
Submitted By –
Jahanvi Varshney (102383040)
Yuvraj Mangla (102383073)
Yuvraj Singh (102383074)
Yugansh Garg (102383072)
Jeevetesh Bhanot (102383041)
Tanish Garg (102203710)
Submitted To –
Dr. Manju Khurana
TABLE OF CONTENT
i) Write a program to store 8-bit data into one register and then 8
copy that to all registers.
iii) Write a program to add 8-bit numbers using direct and indirect 12
addressing mode.
iv) Write a program to add 16-bit numbers using direct and indirect 14
addressing mode.
v) Write a program to 8-bit numbers using carry. (using JNC 18
instruction).
vi) Write a program to find 1’s complement and 2’s complement of 20
8-bit number.
3. Write a program for the sum of series of numbers. 24
6. Write a program to add ten 8-bit numbers. Assume the numbers are 33
stored in 8500-8509. Store the result in 850A and 850B memory
address.
7. Write a program to find the negative numbers in a block of data. 35
11. Write an assembly language program to verify how many bytes are 44
present in a given set, which resembles 10101101 in 8085.
12. Write an assembly language program to find the numbers of even parity 46
in ten consecutive memory locations in 8085.
13. Write an assembly language program to convert a BCD number into its 48
equivalent binary in 8085.
14. Write an assembly language program for exchange the contents of 50
memory location.
2
UCS617 Microprocessors Based System Design
EXPERIMENT-1
AIM: Introduction of 8085-microprocessor kit and steps for execution on the kit.
3
UCS617 Microprocessors Based System Design
3. Control Unit: The control unit synchronizes the operations of the microprocessor and
controls data flow between various components.
4. Instruction Register and Decoder: The instruction register holds the instruction being
executed, while the decoder interprets it and generates control signals.
5. Address and Data Buses:
• Address Bus: A 16-bit bus used to specify memory addresses, enabling access to
up to 64KB of memory.
• Data Bus: An 8-bit bidirectional bus used to transfer data between the processor
and memory or I/O devices.
6. Clock Generator: Provides timing signals to synchronize the processor’s operations. The
8085 operates at a clock frequency of 3 MHz.
4
UCS617 Microprocessors Based System Design
Working Principle
The 8085 microprocessor operates in a fetch-decode-execute cycle:
1. Fetch: The microprocessor fetches the instruction stored at the memory location
specified by the program counter.
2. Decode: The fetched instruction is decoded by the instruction decoder to determine the
operation to be performed.
3. Execute: The microprocessor executes the decoded instruction, interacting with
memory or I/O devices if necessary. The program counter is updated to point to the
next instruction.
5
UCS617 Microprocessors Based System Design
Special Functions
1. RST (Reset)
• Purpose: Resets a specific register value to 0.
• Usage: Clears the register to its default state, often to prepare it for new operations
or to clear any residual data.
2. Prev (Previous)
• Purpose: Moves to the previous memory or address location.
• Usage: Useful for stepping backward through memory or instruction sequences
during debugging or review.
3. Next
• Purpose: Moves to the next memory or address location.
• Usage: Often used to iterate forward through instructions or memory locations.
4. Go
• Purpose: Acts like a "jump" statement in programming. After clicking Go, you
specify a starting address, and the execution begins from that address.
• Usage: Used to set the execution pointer to a specific location for testing or
debugging.
5. EXM Reg (Examine Register)
• Purpose: Views the current contents of a specified register.
• Usage: Allows the user to inspect register values, typically for debugging or
analysis.
6. EXM Mem (Examine Memory)
• Purpose: Views the contents of a specified memory location.
• Usage: Helps in inspecting the stored values or instructions at a particular memory
address.
6
UCS617 Microprocessors Based System Design
VIKAS SIMULATOR
7
UCS617 Microprocessors Based System Design
EXPERIMENT-2.1
AIM - Write a program to store 8-bit data into one register and then copy that to all registers.
OUTPUT:
8
UCS617 Microprocessors Based System Design
9
UCS617 Microprocessors Based System Design
10
UCS617 Microprocessors Based System Design
EXPERIMENT-2.2
AIM - Write a program for addition of two 8-bit numbers.
OUTPUT:
11
UCS617 Microprocessors Based System Design
EXPERIMENT-2.3
AIM - Write a program to add 8-bit numbers using direct and indirect addressing mode.
Direct Mode:
OUTPUT:
12
UCS617 Microprocessors Based System Design
Indirect Mode:
13
UCS617 Microprocessors Based System Design
EXPERIMENT - 2.4
AIM: Write a program to add 16-bit numbers using direct and indirect addressing mode.
Direct Mode:
14
UCS617 Microprocessors Based System Design
OUTPUT:
15
UCS617 Microprocessors Based System Design
Indirect Mode:
16
UCS617 Microprocessors Based System Design
OUTPUT:
17
UCS617 Microprocessors Based System Design
EXPERIMENT - 2.5
AIM: Write a program to add 8-bit numbers using carry. (using JNC instruction).
18
UCS617 Microprocessors Based System Design
OUTPUT:
19
UCS617 Microprocessors Based System Design
EXPERIMENT - 2.6
AIM: Write a program to find 1’s complement and 2’s complement of an 8-bit number.
1’s COMPLEMENT:
20
UCS617 Microprocessors Based System Design
OUTPUT:
21
UCS617 Microprocessors Based System Design
2’s COMPLEMENT:
22
UCS617 Microprocessors Based System Design
OUTPUT:
23
UCS617 Microprocessors Based System Design
EXPERIMENT - 3
24
UCS617 Microprocessors Based System Design
OUTPUT:
25
UCS617 Microprocessors Based System Design
EXPERIMENT – 4
AIM: Write a program for data transfer from memory block B1 to memory block B2.
26
UCS617 Microprocessors Based System Design
OUTPUT:
27
UCS617 Microprocessors Based System Design
28
UCS617 Microprocessors Based System Design
29
UCS617 Microprocessors Based System Design
30
UCS617 Microprocessors Based System Design
EXPERIMENT – 5
AIM: Write a program for multiply two 8-bit numbers.
OUTPUT
31
UCS617 Microprocessors Based System Design
32
UCS617 Microprocessors Based System Design
EXPERIMENT-6
Aim: Write a program to add ten 8-bit numbers. Assume the numbers are stored in
8500-8509. Store the result in 850A and 850B memory address.
33
UCS617 Microprocessors Based System Design
OUTPUT
34
UCS617 Microprocessors Based System Design
EXPERIMENT-7
Aim: Write a program to find the negative numbers in a block of data.
DCR C 8011 0D
JNZ Back 8012,8013,8014 C2,09,80
MOV A, B 8015 78
STA 8600H 8016,8017,8018 32,00,86
RST 5 8019 EF
35
UCS617 Microprocessors Based System Design
OUTPUT
36
UCS617 Microprocessors Based System Design
EXPERIMENT-8
Aim: Write a program to count the number of one's in a number.
INR D 800B 14
MOV A, D 8010 7A
RST 5 8014 EF
37
UCS617 Microprocessors Based System Design
OUTPUT
38
UCS617 Microprocessors Based System Design
EXPERIMENT-9
Aim: Write a program to arrange numbers in Ascending order.
39
UCS617 Microprocessors Based System Design
OUTPUT
41
UCS617 Microprocessors Based System Design
EXPERIMENT-10
Aim: Calculate the sum of series of even numbers.
42
UCS617 Microprocessors Based System Design
OUTPUT
43
UCS617 Microprocessors Based System Design
EXPERIMENT-11
Aim: Write an assembly language program to verify how many bytes are present in a
given set, which resembles 10101101 in 8085.
45
UCS617 Microprocessors Based System Design
EXPERIMENT-12
Aim: Write an assembly language program to find the numbers of even parity in ten
consecutive memory locations in 8085.
46
UCS617 Microprocessors Based System Design
47
UCS617 Microprocessors Based System Design
EXPERIMENT-13
Aim: Write an assembly language program to convert a BCD number into its
equivalent binary in 8085.
48
UCS617 Microprocessors Based System Design
OUTPUT
49
UCS617 Microprocessors Based System Design
EXPERIMENT – 14
TABLE:
50
UCS617 Microprocessors Based System Design
OUTPUT:
51
UCS617 Microprocessors Based System Design
EXPERIMENT – 15
TABLE:
52
UCS617 Microprocessors Based System Design
OUTPUT:
53