Professional Documents
Culture Documents
Assembly Chapter One
Assembly Chapter One
What to expect:
Microprocessor Architecture, interrupt, interfacing
…
Assembly language Concept
Fundamentals
Data Transfer in Memory and Registers
How conditional and Loop Works
Assembly for MP programming
Assembly for OS programming (inline Assembly)
C compiler
Procedure, Macro, Array, String (???)
COURSE LOGISTICS
Course Material:
https://elearning.ju.edu.et/course/view.php
?id=262
Blog:
https://csassembly.weebly.com/
Telegram Group
https://t.me/joinchat/UaLxVm2SWZ7N1I
70
N D
A
O R G E R
S
S
S G U A S
S
O
E
E
C
C N
O LA G R O P
R
O
P R Y N
O L I IC
C R MB M T M O
M
I E A ION
M S R CT
AS OGO D U
PR T R
IN
WHAT IS A MICROPROCESSOR?
Maximize Productivity
Interface provided must be easy
Area
Cost
Backward compatibility
Windows running on Intel P3 Processor should run on Intel P4 too.
Address Address
(PC) (reg)
Control Unit
Fetches instructions from memory, Interprets them, Controls ALU
ALU
Does all computations
Register File
Stores variables
Data Instr
Out Register File Instr In
r1
r2
r3
r4 ALU
Control Control Unit
Data Data (Calculator)
Inst
In Flags Address
PC
Data
Address
EVOLUTION OF MP
Intel Microprocessor History
•Intel 80286
–16 MB addressable RAM
–Protected memory
–several times faster than 8086
–introduced IDE bus architecture
–80287 floating point unit
INTEL IA-32 FAMILY
•Intel386
–4 GB addressable RAM, 32-bit registers,
paging (virtual memory)
•Intel486
–instruction pipelining
•Pentium
–superscalar, 32-bit address bus, 64-bit
internal data path
64-BIT PROCESSORS
•Intel64
–64-bit linear address
–Intel: Pentium Extreme, Xeon, Celeron D,
PendiumD, Core 2, and Core i7
•IA-32e Mode
–Compatibility mode for legacy 16-and 32-bit
applications
–64-bit Mode uses 64-bit addresses and operands
INTEL PROCESSOR FAMILIES
Currently Used:
Pentium & Celeron –dual core
Core 2 Duo -2 processor cores
Core 2 Quad -4 processor cores
Core i7 –4 processor cores
A HIERARCHY OF LANGUAGES
ASSEMBLY AND MACHINE LANGUAGE
Machine language
Native to a processor: executed directly by hardware
Instructions consist of binary code: 1s and 0s
Assembly language
Slightly higher-level language
Readability of instructions is better than machine language
One-to-one correspondence with machine language
instructions
Assemblers translate assembly to machine code
Compilers translate high-level programs to machine
code
Either directly, or
Indirectly via an assembler
COMPILER AND ASSEMBLER
rg/
DEMO b ol
t. o
od
// g
s:
tp
ht
INSTRUCTIONS AND MACHINE LANGUAGE
High-Level Language: D = A * B + 10
Source Object
File Assembler File
Locally: Online:(NASM)
MASM
Tutorial Point As
NASM
TASM
sembler
EMULATOR: JDOODLE
Emu8086 My-Compiler
Online
NUMBER SYSTEMS
Nine 9 1001 9
Ten 10 1010 A
Eleven 11 1011 B
Twelve 12 1100 C
Thirteen 13 1101 D
Fourteen 14 1110 E