Assembly Language Lesson3 Flashcards
High-Level
Language
Level 5
* Application-oriented languages
◦ C++, Java, Visual Basic . . .
* Programs compile into assembly language (Level 4)
Operation from High level to machine language
High-level language
program (in C)
| (compiler)
Assembly language program
| (Assembler)
Binary machine language
program
Assembly
Language (level 4)
Level 4
* Instruction mnemonics that have a one-to-one
correspondence to machine language
* Calls functions written at the operating system level
(Level 3)
Operating System level 3
Level 3
* Provides services to Level 4 programs
* Programs translated and run at the instruction set
architecture level (Level 2)
call writelnt
Instruction Set
Architecture (ISA) level 2
Level 2
* Also known as conventional machine language
* Executed by Level 1 (microarchitecture, Level 1)
Microarchitecture
Level 1
* Interprets conventional machine instructions
(Level 2)
* Executed by digital hardware (Level 0)
Digital Logic level 0
Level 0
* CPU, constructed from
oDigital logic gates
oSystem bus
oMemory
* Implemented using bipolar transistors
Functions of the Operating System
Multitasking/multiprogramming
Multithreading
Multiprocessing
Virtual Memory
Graphical user interface (GUI)
Basic Microcomputer
Design
A bus: a group of parallel wires that transfer data
o bus types:
address
data
control
Basic Microcomputer
Design #2
The Address bus holds the addresses of instructions and
data, when the currently executing instruction transfers
data between the CPU and memory.
* The Data bus transfers instructions and data between the
CPU and memory.
* The Control bus uses binary signals to synchronize actions
of all devices attached to the system bus.
Execution Cycle
An instruction is a binary pattern designed inside a microprocessor to perform a specific function.
* The entire group of instructions that a microprocessor supports is called Instruction Set.
* 8086 has more than 20,000 instructions.
Classification of Instruction Set
Data Transfer Instructions: mov, push, pop,…
Arithmetic Instructions: add, sub, inc …
Bit Manipulation Instructions: and, or, xor, ….
Program Execution Transfer Instructions: jmp, call, ret, ….
String Instructions: cmps, movs, rep, …
Processor Control Instructions: stc, clc, wait…
sequence of steps to execute a machine
instruction
An operand can be register, memory location or immediate (ex. mov 5,R0) operand
Fetch
Decode
Fetch operands (not always needed?)
Address calculation?
Execute
Update few status flags: zero, carry, overflow
Store output (not always needed?)
Memory
The memory unit supports two fundamental operations: read and write .
o The read operation reads a previously stored data
o The write operation stores a value in memory.
Both of these operations require an address in memory
Memory
write operation requires specification of the data to be written.
* The read and write signals come from the control bus.