ECE 310 Lecture 2 - Introduction To Microprocessors
ECE 310 Lecture 2 - Introduction To Microprocessors
ECE 310 Lecture 2 - Introduction To Microprocessors
Microprocessors and
Microcontrollers
Introduction to Microprocessors (1)
Mohammed Sharaf Sayed
[email protected]
Lecture Outline
4
Arithmetic and Logic Unit (ALU)
7
Memory
12
Control Unit (Stack)
16
Instruction Format
19
Addressing Modes
20
Addressing Modes
21
Addressing Modes
24
Addressing Modes
25
Instruction Set
26
Instruction Set
27
Instruction Set
28
Instruction Set
29
Instruction Set
30
Instruction Set
31
Programming System
32
Programming System
• Example:
0100.....0111.....(Code for MOV B, A)......;....Move
Accumulator content to B register
• For each instruction:
Instruction will be loaded
Instruction will be decoded
Control signals will be generated.
• It is very difficult to write programs in machine
language. A single bit error in any instruction will
produce undesirable results.
33
Programming System
35
Programming System
• Assembler Directives
Every assembler will have Pseudo Instructions or
directives to help the programmer to communicate
the program requirements to the assembler.
Examples:
ORG 2000H indicates to Intel 8085 assembler that the
following instructions are to be loaded, starting from
memory location 2000 Hex.
END indicates to Intel 8085 assembler that the program
has ended and thus no further translation of assembly
instructions to machine instructions is required.
37
Programming System
• Compilers
With the increase of computer programs
complexity, assembly language programs became
very lengthy and unmanageable.
This leads to the development of high-level
languages like BASIC, FORTRAN, C etc.
Compilers translate high-level languages programs
into machine level language which can then be
directly executed by computers.
38
Programming System
• Operating Systems
An operating system (OS) is system software that
manages computer hardware, software resources,
and provides common services for computer
programs.
It allocates computer resources to the user
programs.
39
Lecture Summary