Академический Документы
Профессиональный Документы
Культура Документы
HAMDARD UNIVERSITY
DEPARTMENT OF ELECTRICAL ENGINEERING
EXPERIMENT NO.1
OBJECTIVES: Introduction to INTEL 8085, 8085 Simulator (Sim8085).
Name of Student & Roll No.
:___________________________________
Group
:___________________________________
Date of Experiment
:___________________________________
Report Submitted on
:___________________________________
Marks Obtained
:___________________________________
Remarks if any
:___________________________________
Signature
:___________________________________
INTRODUCTION TO 8085:
A 40-pin IC
Six groups of signals
o Address Bus
o Data Bus
o Control and Status pins
o Power Supply & frequency signals
o Externally initiated Signals
o Serial I/O ports
U7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
X1
X2
RST-OT
SOD
SID
TRAP
RST 7.5
RST 6.5
RST 5.5
INTR
INTA
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
VSS
VCC
HOLD
HLDA
CLKO
RST-IN
READY
IO/M
S1
RD
WR
ALE
S0
A15
A14
A13
A12
A11
A10
A9
A8
8085
U8
1
2
40
20
5
4
6
9
8
7
10
39
35
36
11
38
3
37
X1
X2
VCC
VSS
SID
SOD
TRAP
RST 5.5
RST 6.5
RST 7.5
INTR
HOLD
READY
RST-IN
INTA
HLDA
RST-OT
CLKO
8085
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
A8
A9
A10
A11
A12
A13
A14
A15
ALE
WR
RD
IO/M
S0
S1
12
13
14
15
16
17
18
19
21
22
23
24
25
26
27
28
30
31
32
34
29
33
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
8085 OPERATIONS:
Microprocessor initiated operation:
Memory Read
Memory Write
I/O Read
I/O Write
Internal operation:
Reset
Interrupt
Ready
Hold
Architecture of 8085:
Data Bus
Used to transfer instructions and data
8085 has a 8-bit data bus
The 8085 Programming Model:
The 8085 programming model includes six registers, one accumulator, and one flag register, as
shown in Figure. In addition, it has two 16-bit registers: the stack pointer and the program
counter. They are described briefly as follows.
Immediate addressing
Data is present in the instruction. Load the immediate data to the destination provided.
Example: MVI R,data
Register addressing
Data is provided through the registers.
Example: MOV Rd, Rs
Direct addressing
Used to accept data from outside devices to store in the accumulator or send the data stored in the
accumulator to the outside device. Accept the data from the port 00H and store them into the
accumulator or Send the data from the accumulator to the port 01H.
Example: IN 00H or OUT 01H
Indirect Addressing
This means that the Effective Address is calculated by the processor. And the contents of the address
(and the one following) is used to form a second address. The second address is where the data is
stored. Note that this requires several memory accesses; two accesses to retrieve the 16-bit address and
a further access (or accesses) to retrieve the data which is to be loaded into the register.
Arithmetic Operations
These instructions perform arithmetic operations such as addition, subtraction, increment, and
decrement.
Logical Operations
These instructions perform various logical operations with the contents of the accumulator.
AND, OR Exclusive-OR
Rotate
Compare
Complement
Branching Operations
This group of instructions alters the sequence of program execution either conditionally or
unconditionally.
Jump
Call, Return, and Restart
Instruction Format
An instruction is a command to the microprocessor to perform a given task on a specified data.
Each instruction has two parts: one is task to be performed, called the operation code (opcode),
and the second is the data to be operated on, called the operand. The operand (or data) can be
specified in various ways. It may include 8-bit (or 16-bit ) data, an internal register, a memory
location, or 8-bit (or 16-bit) address. In some instructions, the operand is implicit.
Instruction word size
The 8085 instruction set is classified into the following three groups according to word size:
One-word or 1-byte instructions
Two-word or 2-byte instructions
Three-word or 3-byte instructions
INTRODUCTION TO Sim8085:
This simulator helps to understand of the instruction execution and memory management of
8-bit Intel 8085 microprocessor. For this purpose, a program, which is run on Intel 80386 based
CPUs and under Win32 operating system, is written using a high level visual programming
language. With this program, namely Sim8085, one can write a 8085 microprocessor assembly
language code in text format and then simulate it line by line just as it runs on the original CPU.
While the assembly codes are executed (simulated), the register, memory (code, stack or data)
and port contents can be viewed instantly. There can be also made some modifications to these
values at run-time, if needed. With the Sim8085, all the work is done in very user-friendly
environment.
The figure illustrates the window of Sim8085. Further details are discussed in details below.
This simulator is divided into two parts:
i) Editor part.
ii) Debugger part.
i) Editor part:
The Sim8085 has a very user-friendly text editor. There can be opened up to ten different files
at a time. Default file extension for opening and saving files is 85. There is an adjustable
undo-buffer. There are some information-based tags: Cursor position, editor buffer
modification, editor cursor mode, file read-only info, and context sensitive help are shown
instantly at the Status Bar. The editor and file commands in the Sim8085 are: New,
Open, ReOpen, Save, Save As, Save All, Close, Print, Undo, ReDo, Cut,
Copy, Paste, Select All, Find, Replace.
The editor part has a built-in compiler that checks the written assembly code for syntax errors.
After all the lines are checked, the erroneous line is shown with respective error message and
line number, if there is any mistake; otherwise, the user is informed with a message including
the compiled code size. Screen snapshots are shown below.
The list and object files can be generated automatically every time the source code is compiled
or manual by the user, depending on the settings. Screen snapshots of these text-based files are
shown below.
There are some pre-assigned words, which are called as Pseudo-Directives. These directives
make the writing of programs and/or algorithms easy. The meaning and usage syntax of each
pseudo-directive is shown below:
FillByte count,byte:
Fills the memory starting from the current memory address with the given byte at a given
count.
Org address:
Tells to the compiler to place the machine codes starting from the given address.
KickOff address:
Tells to the compiler that where the entry point (starting address) of the written assembly code
is.
Db string of bytes/characters:
This directive makes the entry of any string, character or byte is easy. The all characters in a
string are individually follows each other in the memory. An example of usage is, Db
13,10,This is a sample text,13,00001010b,24h.
In fact, code, stack and data panes show the memory content according to their duties;
however, the memory location they point can be different. Code pane interprets the bytes in
virtual memory as 8085-p machine codes; whereas data pane interprets the bytes in virtual
memory as pure characters, but also showing the hexadecimal equivalents. Both the code and
stack panes show their content with the respective offset address in a tabular form. Stack pane
shows the memory location as two bytes (word), indicated by the stack pointer register, SP,
with a range of 5 words. Register pane shows the all 8085-p register contents and also the
memory byte location indexed by HL register pair. Likewise, flag pane shows the flag register
and the individual bits of it. To make the following easy, the changed registers and flag bits are
drawn with a separate color while tracing. The current line or location in each pane is shown by
a highlighted bar. The user can be cycle through the panes with keyboard or even a mouse
click. Contents of the ports can be viewed and even changed bit by bit within the Ports Form.
Port numbers are pre-assigned and can be changed from the Options Menu. Values are shown
in decimal, hexadecimal and octal, too. Snapshot is show below.
4) What is an Opcode?
5) What is an Operand?
6) What is assembler?
8) What are the steps involve in communication of 8085 with I/O devices?
9) What is PSW?
10) List the two pins that are used to control the serial I/O operations in 8085?