348x Filetype PDF File size 0.49 MB Source: sulavpaudel.com.np
MICROPROCESSOR LAB MANUAL July 20, 2017
Hetauda City College
Affiliated to Tribhuwan University
LAB MANUAL
ON
8085 MICROPROCESSOR
BSC-CSIT: II SEM
Prepared By:
Sulav Paudel (MSc)
Lecturer
1
S. PAUDEL. MSc | LECTURER, DEPARTMENT OF INFORMATION TECHNOLOGY (BSC CSIT)
MICROPROCESSOR LAB MANUAL July 20, 2017
PERFORM ALL PROGRAMS AND PREPARE THE LAB REPORT INCLUDING OBJECTIVE,
ALGORITHMS, PROGRAMS, OBSERVATION AND RESULT OR COMCLUSION
LAB 1
1.1 STORE 8-BIT DATA IN MEMORY LOCATION
AIM: To perform the 8085 assembly program to store 8-bit data 2AH in a memory location
8050H.
ALGORITHM 1:
Start the program by loading the first data into an accumulator.
Store accumulator contents at given memory address.
Terminate program.
PROGRAM 1:
MVI A, 2AH
STA 8050H
HLT
ALGORITHM 2:
Start the program by loading the first data into an accumulator.
Load HL pair register with given memory address.
Store accumulator contents in memory location pointed by HL register pair.
Terminate program.
PROGRAM 2:
LXI H, 8050H
MVI M, 2AH
HLT
1.2 EXCHANGE THE CONTENTS OF MEMORY LOCATIONS
AIM: To perform the 8085 assembly program exchange the contents of memory locations
5000H and 4000H.
ALGORITHM 1:
Start the program by loading the first data of memory location 4000H into
accumulator.
Move the data to a register (B register).
Load the second data of memory location 5000H into accumulator.
Store the data of accumulator at address 4000H
Move the data back into accumulator that is saved in a register (B register).
2 Store the data of accumulator at address 5000H
Terminate program.
S. PAUDEL. MSc | LECTURER, DEPARTMENT OF INFORMATION TECHNOLOGY (BSC CSIT)
MICROPROCESSOR LAB MANUAL July 20, 2017
PROGRAM 1:
LDA 4000H
MOV B, A
LDA 5000H
STA 4000H
MOV A, B
STA 5000H
HLT
ALGORITHM 2:
Start the program by initializing register pair (HL) as a pointer to memory location
4000H.
Initializing register pair (DE) as a pointer to a memory location 5000H.
Move the data of memory location 4000H into a register (B register).
Move the data of memory location 5000H into an accumulator.
Move the data of accumulator into memory location pointed by register pair (HL).
Move the data from register (B) into accumulator.
Store the data of accumulator into memory location pointed by register pair (DE).
Terminate program.
PROGRAM 2:
LXI H, 4000H
LXI D, 5000H
MOV B, M
LDAX D
MOV M, A
MOV A, B
STAX D
HLT
3
S. PAUDEL. MSc | LECTURER, DEPARTMENT OF INFORMATION TECHNOLOGY (BSC CSIT)
MICROPROCESSOR LAB MANUAL July 20, 2017
PERFORM ALL PROGRAMS AND PREPARE THE LAB REPORT INCLUDING OBJECTIVE,
ALGORITHMS, PROGRAMS, OBSERVATION AND RESULT OR COMCLUSION
LAB 2: Use 8085 KIT (MPS 85-3)
RAM USAGE
The system monitor utilizes RAM locations 8F90H to 8FFFH for Storing the System Stack
and variables. User programs should not disturb this area; otherwise the results are
unpredictable.
2.1 EXAMINE/MODIFY MEMORY COMMAND
FUNCTION: This command is used to examine the contents of selected memory
locations. The contents can be optionally modified if the memory location is in
RAM area.
FORMAT: EXAM MEM NEXT [[] NEXT/PREV]* [EXEC]
Example 1: Examining a series of memory locations starting from 0000H (the start of the
keyboard monitor).
Key Pressed Display Comments
Address Field Data Field
RESET -UPS 85 System Reset
EXAM MEM . Examine Memory command
0 0000 First memory location to be
examined 0000H
NEXT 0000 F3 Contents of this location.
NEXT 0001 3E Next location and its
contents.
NEXT 0002 0F Next location and its
contents.
PREV 0001 3E Previous location and its
contents.
EXEC - Command
termination/prompt.
RESET -UPS 85 System Reset
EXAM MEM . Examine Memory command
8 0008.
D 008D. Memory location to be
examined & modified.
0 08D0. Memory location to be
examined & modified.
0 8D00.
NEXT 8D00 XX. Contents of this location
A 8D00 0A. New data to be entered
4 F 8D00 AF.
EXEC - Command termination
prompt
S. PAUDEL. MSc | LECTURER, DEPARTMENT OF INFORMATION TECHNOLOGY (BSC CSIT)
no reviews yet
Please Login to review.