SlideShare a Scribd company logo
Assembly Language for x86 Processors
7th Edition
Chapter 2: x86 Processor
Architecture
(c) Pearson Education, 2015. All rights reserved. You may modify and copy this slide show for your personal use, or for
use in the classroom, as long as this copyright statement, the author's name, and the title are not changed.
Slides prepared by the author and added
some materials by the Instructor
Revision date: 2/15/2015
Kip Irvine
21st
Sept
Week 2
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 3
Chapter Overview
General Concepts
IA-32 Processor Architecture
IA-32 Memory Management
64-bit Processor (New)
Components of an IA-32
Microcomputer
Input-Output System
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 4
General Concepts
Basic microcomputer design
Instruction execution cycle
Reading from memory
How programs run
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 5
We can divide the parts that make up a computer into
three broad categories or subsystem: the central
processing unit (CPU), the main memory and the
input/output subsystem.
Figure Computer hardware (subsystems)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 6
Computer hardware (subsystems)
Control
ALU
Memory
Input-
Output-
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 7
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 8
The arithmetic logic unit (ALU)
The central processing unit (CPU) performs operations on
data. In most architectures it has three parts: an arithmetic
logic unit (ALU), a control unit and a set of registers, fast
storage locations (Figure below).
Central processing unit (CPU)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 9
Registers
Registers are fast stand-alone storage locations that hold
data temporarily. Multiple registers are needed to
facilitate the operation of the CPU. Some of these
registers are shown in Figure on the previous slide.
Data registers
Instruction register
Program counter
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 10
Basic Microcomputer Design
clock synchronizes CPU operations
control unit (CU) coordinates sequence of
execution steps
ALU performs arithmetic and bitwise
processing
Central Processor Unit
(CPU)
Memory Storage
Unit
registers
ALU clock
I/O
Device
#1
I/O
Device
#2
data bus
control bus
address bus
CU
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 11
Microcomputer Design
The CPU is attached to the rest of the computer via pins attached to
Most pins connect to the data bus, the control bus, and the address
bus.
The memory storage unit is where instructions and data are held
while a computer program is running.
The storage unit receives requests for data from the CPU, transfers
data from CPU into memory. All processing of data takes place
within the CPU, so programs residing in memory must be copied into
the CPU before they can execute. Individual program instructions
can be copied into the CPU one at a time, or groups of instructions
can be copied together.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 12
What is a bus?
A bus is a group of parallel wires that transfer data from one part of
the computer to another.
Depicting the Three different
kinds of buses.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 13
What is a bus?
A bus is a group of parallel wires that transfer data from one part of
the computer to another.
A computer system usually contains four bus types: data, I/O, control,
address.
The data bus transfers instructions and data between the CPU and
memory.
The I/O bus transfers data between CPU and the system input/output
devices.
The control bus uses binary signals to synchronize actions of all
devices attached to the system bus.
The address bus holds the addresses of instructions and data when
the currently executing instruction transfers data between the CPU
and memory.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 14
Clock
synchronizes all CPU and BUS operations
machine (clock) cycle measures time of a
single operation
clock is used to trigger events
one cycle
1
0
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 15
Clock
The duration of a clock cycle is calculated as the reciprocal of the
A clock that oscillates 1 billion times per second (1GHz), for
example produces a clock cycle with a duration of one billionth of
a second (1 nanosecond).
A machine instruction requires at least one clock cycle to execute,
and a few require in excess of 50 clocks (the multiply instruction
on the 8088 processor, for example).
Instructions requiring memory access often have empty clock
cycle called wait states because of the differences in the speeds of
CPU, the system bus, and memory circuits.
one cycle
1
0
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 16
What's Next
General Concepts
IA-32 Processor Architecture
IA-32 Memory Management
64-bit Processor
Components of an IA-32
Microcomputer
Input-Output System
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 17
Fetch
Decode
Fetch
operands
Execute
Store output
Instruction Execution Cycle
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 18
Reading from Memory
Multiple machine cycles are required when reading from
memory, because it responds much more slowly than the
CPU. The steps are:
address placed on address bus
Read Line (RD) set low
CPU waits one cycle for memory to respond
Read Line (RD) goes to 1, indicating that the data is on
the data bus
Cycle 1 Cycle 2 Cycle 3 Cycle 4
Data
Address
CLK
ADDR
RD
DATA
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 19
Cache Memory
High-speed expensive static RAM both
inside and outside the CPU.
Level-1 cache: inside the CPU or outside
Level-2 cache: outside the CPU
Level-3 cache: outside the CPU
Cache hit: when data to be read is already
in cache memory
Cache miss: when data to be read is not in
cache memory.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 20
How a Program Runs
Operating
system
User
Current
directory
System
path
Directory
entry
sends program
name to
gets starting
cluster from
searches for
program in
loads and
starts
Program
returns to
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 21
Multitasking
OS can run multiple programs at the same time.
Multiple threads of execution within the same
program.
Scheduler utility assigns a given amount of CPU
time to each running program.
Rapid switching of tasks
gives illusion that all programs are running at
once
the processor must support task switching.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 22
2.2 IA-32 Processor Architecture
Modes of operation
Basic execution environment
Floating-point unit
Intel Microprocessor history
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 23
Modes of Operation
Protected mode
native mode (Windows, Linux)
Real-address mode
native MS-DOS
System management mode
power management, system security,
diagnostics
Virtual-8086 mode
hybrid of Protected
each program has its own 8086 computer
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 24
Modes of Operation
Protected mode
Protected mode is the native state of the processor, in which all
instructions and features are available. Programs are given
separate memory areas named segments, and the processor
prevents programs from referencing memory outside their
assigned segments.
Real-address mode
Real address mode implements the programming environment
of an early Intel processor with a few extra features, such as the
ability to switch into other modes. This mode is useful if a
program requires direct access to system memory and
hardware devices.
System management mode
System management mode (SMM) provides an operating
system with a mechanism for implementing functions such as
power management and system security. These functions are
usually implemented by computer manufacturers who
customize the processor for a particular system setup.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 25
Basic Execution Environment
Addressable memory
General-purpose registers
Index and base registers
Specialized register uses
Status flags
Floating-point, MMX, XMM
registers
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 26
Addressable Memory
Protected mode
4 GB (Extended Physical
Addressing allows a total of 64
GBytes of physical memory to be
addressed.)
32-bit address
Real-address and Virtual-8086 modes
1 MB space
20-bit address
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 27
Let us Learn about Registers.
Very Important to write Assembly
Language Program.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 28
Intel 32 bit and 64 bit General purpose Registers
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 29
General-Purpose Registers
CS
SS
DS
ES
EIP
EFLAGS
16-bit Segment Registers
EAX
EBX
ECX
EDX
32-bit General-Purpose Registers
FS
GS
EBP
ESP
ESI
EDI
Named storage locations inside the
CPU, optimized for speed. (8 General
purpose registers)
Six segment registers
Process status register
Instruction pointer
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 30
Accessing Parts of Registers
Use 8-bit name, 16-bit name, or 32-bit
name
Applies to EAX, EBX, ECX, and EDX
AH AL
16 bits
8
AX
EAX
8
32 bits
8 bits + 8 bits Lower 16 bit is
referenced as AX
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 31
Index and Base Registers
Some registers have only a 16-bit name
for their lower half:
More details on Intel architecture
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 32
General-Purpose Registers
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 33
Some Specialized Register Uses (1 of 2)
General-Purpose
EAX accumulator (multiplication and division)
ECX loop counter ( not used for arithmetic)
ESP stack pointer (used for a system memory
structure)
ESI, EDI index registers (Extended source
Index and Extended destination index)
EBP extended frame pointer (stack)
Segment
CS code segment
DS data segment
SS stack segment
ES, FS, GS - additional segments
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 34
Assembly program Example
1. What you need to set up in order to run x86 Assembly language?
2. How to write assembly language and assemble the program?
3. Show you some simple assembly language program and run them.
4. You need to practice at home or other times in order to become
familiar with the Assembly language program.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 35
: 2015/9/22
:
Assembly Language program Instructions for Assembling.
In order to run the Assembly programs that we will be learning in
this course , please follow these instructions.
Please use the web link http://www.kipirvine.com
2. After entering the authors website, please choose "Getting started with MASM"
link.
3. That page will explain clearly how to download the MASM for which visual
studio version and run your first program. Try it yourself as to how to
assemble the first assembly program and run them to see if your program
works correctly.
4. The author clearly instructs you how to assemble the example program as well
as write new programs and run them.
Good Luck and please try some assembly program before next class.
USING MASM Assembler and the link
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 36
First Assembly program
Moving Integer Number into EAX
TITLE MASM Template (1stassembly.asm)
; Description: This is the first assembly program that adds
; two numbers.
; Author Name:
; Author Number: 091111
; Revision date: Sept 20th, 2016
INCLUDE Irvine32.inc ; include library for assembler
.code
main PROC
mov eax, 5 ; move 5 to the EAX register
add eax, 6 ; add 6 to the EAX register
call WriteInt ; display value in EAX
exit
main ENDP
END main
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 37
Second Assembly program
Moving Hexadecimal Number into EAX
TITLE MASM Template (2ndassembly.asm)
; Description: This is the 2nd assembly program that adds
; two hexadecimal numbers.
; Author Name:
; Author Number: 091111
; Revision date: Sept 20th, 2016
INCLUDE Irvine32.inc ; include library for assembler
.code
main PROC
mov eax, 10000h ; Move a hex value into EAX
add eax, 40000h ; add a hex value into EAX
sub eax, 20000h ; subtract hex value from EAX
call DumpRegs ; Display what is in Register
exit
main ENDP
END main
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 38
Creating a Project From Scratch .
Visual Studio makes it possible (in 12 easy steps) to create an
Assembly Language project from scratch.
In the first step, you will create a Win32 Console application designed
for C++, and just modify the custom build rules.
Step 1: Select New from the File menu, then select Project. In the
New Project window, select Win32 under Visual C++ in the left
panel, and select Win32 Console Application in the middle panel.
Give your project a suitable name (near the bottom of the window):
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 39
Try to write similar simple assembly programs by yourself!
Hint: How about moving -128 to EAX register.
Add + 54 and see if you get the result.
Similar ideas can be thought of by you.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 40
Some Specialized Register Uses (2 of 2)
EIP instruction pointer (register
contains the address of the next
instruction to be executed)
EFLAGS
status and control flags
each flag is a single binary bit (Reflect
the outcome of some CPU operation.)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 41
In the high level language program, you do
not know if the overflow occurs or not.
In the assembly language program, you
need to worry about the overflow of the
program.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 42
Status Flags
Carry
unsigned arithmetic out of range
Overflow
signed arithmetic out of range
Sign
result is negative
Zero
result is zero
Auxiliary Carry
carry from bit 3 to bit 4
Parity
sum of 1 bits is an even number
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 43
MMX Technology
What is MMX Register?
MMX technology was added onto the Pentium
processor by Intel to improve the performance of advanced
multimedia and communications applications. The eight 64-
bit MMX registers support special instructions called SIMD
(single instruction, Multiple-Data). As the name implies,
MMX instructions operate in parallel on the data values
contained in MMX registers.
What XMM Registers?
The x86 architecture also contains eight 128-bit registers called
XMM registers. They are used by streaming SIMD extensions
to the instruction set.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 44
Floating-Point, MMX, XMM Registers
Eight 80-bit floating-point data registers
ST(0), ST(1), . . . , ST(7)
arranged in a stack
used for all floating-point arithmetic
Eight 64-bit MMX registers
Eight 128-bit XMM registers for single-
instruction multiple-data (SIMD)
operations
ST(0)
ST(1)
ST(2)
ST(3)
80-bit Data Registers
ST(4)
ST(5)
ST(6)
ST(7)
Opcode Register
MMX technology was added onto the Pentium processor by Intel to
improve the performance of advanced multimedia and
communications applications. The eight 64-bit MMX registers support
special instructions called SIMD (single-Instruction and Multiple-Data)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 45
HISTORY of INTEL Architecture
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 46
Intel Microprocessor History
Intel 8086, 80286
IA-32 processor family
P6 processor family
CISC and RISC
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 47
Early Intel Microprocessors
Intel 8080 (First processor)[8-bit]
64K addressable RAM
8-bit registers
CP/M operating system
S-100 BUS architecture
8-inch floppy disks!
Intel 8086/8088 (1978) [16-bit registers][1980 IBM
had the identical 8088 processor]
IBM-PC Used 8088
1 MB addressable RAM
16-bit registers
16-bit data bus (8-bit for 8088)
separate floating-point unit (8087)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 48
The IBM-AT
Intel 80286 [some where between
1978 to 1985]
16 MB addressable RAM
Protected memory
24-bit address bus
several times faster than 8086
introduced IDE bus architecture
80287 floating point unit
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 49
Intel IA-32 Family
Intel386 [1985 ]
4 GB addressable RAM, 32-bit registers,
paging (virtual memory)-32 address bus
Intel- (IA-32) family
Intel486 [1989]
instruction pipelining, permitted multiple
instructions to be processed at the same
time.
Pentium [1993]
superscalar, 32-bit address bus, 64-bit
internal data path, MMX technology to the
IA-32 family added.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 50
64-bit Processors
Intel64 [64-bit processing]
64-bit linear address space
Intel: Pentium Extreme, Xeon, Celeron D,
Pendium D, 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
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 51
Intel Technologies
HyperThreading technology
two tasks execute on a single processor
at the same time
Dual Core processing
multiple processor cores in the same IC
package
each processor has its own resources
and communication path with the bus
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 52
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
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 53
CISC and RISC
CISC complex instruction set
large instruction set
high-level operations
requires microcode interpreter
examples: Intel 80x86 family
RISC reduced instruction set
simple, atomic instructions
small instruction set
directly executed by hardware
examples:
ARM (Advanced RISC Machines)
DEC Alpha (now Compaq)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 54
What's Next
General Concepts
IA-32 Processor Architecture
IA-32 Memory Management
Components of an IA-32 Microcomputer
Input-Output System
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 55
2.3 IA-32 Memory Management
Real-address mode
Calculating linear addresses
Protected mode
Multi-segment model
Paging
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 56
Real-Address mode
1 MB RAM maximum addressable
Application programs can access
any area of memory
Single tasking
Supported by MS-DOS operating
system
Windows 95, 98 can be booted into
this mode.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 57
Protected Mode (1 of 2)
4 GB addressable RAM
(00000000 to FFFFFFFFh)
Each program assigned a memory
partition which is protected from other
programs
Designed for multitasking
Supported by Linux & MS-Windows
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 58
Protected mode (2 of 2)
Segment descriptor tables
Program structure
code, data, and stack areas
CS, DS, SS segment descriptors
global descriptor table (GDT)
MASM Programs use the Microsoft
flat memory model
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 59
Segmented Memory
Segmented memory addressing: absolute (linear)
address is a combination of a 16-bit segment value
added to a 16-bit offset
00000
10000
20000
30000
40000
50000
60000
70000
80000
90000
A0000
B0000
C0000
D0000
E0000
F0000
8000:0000
8000:FFFF
seg ofs
8000:0250
0250
one segment
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 60
Calculating Linear Addresses
Given a segment address, multiply it by 16
(add a hexadecimal zero), and add it to the
offset
Example: convert 08F1:0100 to a linear
address
Adjusted Segment value: 0 8 F 1 0
Add the offset: 0 1 0 0
Linear address: 0 9 0 1 0
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 61
Your turn . . .
What linear address corresponds to the segment/offset
address 028F:0030?
028F0 + 0030 = 02920
Always use hexadecimal notation for addresses.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 62
Your turn . . .
What segment addresses correspond to the linear
address 28F30h?
Many different segment-offset addresses can produce the
linear address 28F30h. For example:
28F0:0030, 28F3:0000, 28B0:0430, . . .
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 63
Flat Segment Model
Single global descriptor table (GDT).
All segments mapped to entire 32-bit address
space
00000000
FFFFFFFF
(4GB)
physical
RAM
00000000
Segment descriptor, in the
Global Descriptor Table
00040 - - - -
base address limit access
00040000
not
used
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 64
Multi-Segment Model
Each program has a local descriptor table (LDT)
holds descriptor for each segment used by
the program
3000
RAM
00003000
Local Descriptor Table
0002
00008000 000A
00026000 0010
base limit access
8000
26000
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 65
Paging
Supported directly by the CPU
Divides each segment into 4096-byte blocks
called pages
Sum of all programs can be larger than physical
memory
Part of running program is in memory, part is on
disk
Virtual memory manager (VMM) OS utility that
manages the loading and unloading of pages
Page fault issued by CPU when a page must
be loaded from disk
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 66
What's Next
General Concepts
IA-32 Processor Architecture
IA-32 Memory Management
64-bit processor
Components of an IA-32
Microcomputer
Input-Output System
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 67
64-Bit Processors
64-Bit Operation Modes
Compatibility mode can run existing 16-bit
and 32-bit applications (Windows supports
only 32-bit apps in this mode)
64-bit mode Windows 64 uses this
Basic Execution Environment
addresses can be 64 bits (48 bits, in practice)
16 64-bit general purpose registers
64-bit instruction pointer named RIP
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 68
64-Bit General Purpose Registers
32-bit general purpose registers:
EAX, EBX, ECX, EDX, EDI, ESI,
EBP, ESP, R8D, R9D, R10D, R11D,
R12D, R13D, R14D, R15D
64-bit general purpose registers:
RAX, RBX, RCX, RDX, RDI, RSI,
RBP, RSP, R8, R9, R10, R11, R12,
R13, R14, R15
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 69
What's Next
General Concepts
IA-32 Processor Architecture
IA-32 Memory Management
64-Bit Processors
Components of an IA-32
Microcomputer
Input-Output System
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 70
Components of an IA-32
Microcomputer
Motherboard
Video output
Memory
Input-output ports
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 71
Motherboard
CPU socket
External cache memory slots
Main memory slots
BIOS chips
Sound synthesizer chip (optional)
Video controller chip (optional)
IDE, parallel, serial, USB, video,
keyboard, joystick, network, and mouse
connectors
PCI bus connectors (expansion cards)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 72
Intel D850MD Motherboard
dynamic RAM
Pentium 4 socket
Speaker
IDE drive connectors
mouse, keyboard,
parallel, serial, and USB
connectors
AGP slot
Battery
Video
Power connector
memory controller hub
Diskette connector
PCI slots
I/O Controller
Firmware hub
Audio chip
Source: Intel® Desktop Board D850MD/D850MV Technical Product
Specification
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 73
Intel 965 Express Chipset
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 74
Video Output
Video controller
on motherboard, or on expansion card
AGP (accelerated graphics port technology)*
Video memory (VRAM)
Video CRT Display
uses raster scanning
horizontal retrace
vertical retrace
Direct digital LCD monitors
no raster scanning required
* This link may change over time.
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 75
Sample Video Controller (ATI Corp.)
128-bit 3D graphics
performance powered by
3D graphics performance
Intelligent TV-Tuner with
Digital VCR
TV-ON-DEMAND
Interactive Program Guide
Still image and MPEG-2
motion video capture
Video editing
Hardware DVD video
playback
Video output to TV or VCR
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 76
Memory
ROM
read-only memory
EPROM
erasable programmable read-only memory
Dynamic RAM (DRAM)
inexpensive; must be refreshed constantly
Static RAM (SRAM)
expensive; used for cache memory; no refresh required
Video RAM (VRAM)
dual ported; optimized for constant video refresh
CMOS RAM
complimentary metal-oxide semiconductor
system setup information
See: Intel platform memory (Intel technology brief: link address
may change)
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 77
Input-Output Ports
USB (universal serial bus)
intelligent high-speed connection to
devices
up to 12 megabits/second
USB hub connects multiple devices
enumeration: computer queries devices
supports hot connections
Parallel
short cable, high speed
common for printers
bidirectional, parallel data transfer
Intel 8255 controller chip
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 78
Input-Output Ports (cont)
Serial
RS-232 serial port
one bit at a time
uses long cables and modems
16550 UART (universal
asynchronous receiver transmitter)
programmable in assembly
language
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 79
Device Interfaces
ATA host adapters
intelligent drive electronics (hard drive, CDROM)
SATA (Serial ATA)
inexpensive, fast, bidirectional
FireWire
high speed (800 MB/sec), many devices at once
Bluetooth
small amounts of data, short distances, low power
usage
Wi-Fi (wireless Ethernet)
IEEE 802.11 standard, faster than Bluetooth
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 80
What's Next
General Concepts
IA-32 Processor Architecture
IA-32 Memory Management
Components of an IA-32
Microcomputer
Input-Output System
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 81
Levels of Input-Output
Level 3: High-level language function
examples: C++, Java
portable, convenient, not always the fastest
Level 2: Operating system
Application Programming Interface (API)
extended capabilities, lots of details to master
Level 1: BIOS
drivers that communicate directly with devices
OS security may prevent application-level code
from working at this level
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 82
Displaying a String of Characters
When a HLL
program
displays a
string of
characters, the
following steps
take place:
Application Program
OS Function
BIOS Function
Hardware Level 0
Level 1
Level 2
Level 3
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 83
Programming levels
Assembly language programs can perform
input-output at each of the following levels:
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 84
Summary
Central Processing Unit (CPU)
Arithmetic Logic Unit (ALU)
Instruction execution cycle
Multitasking
Floating Point Unit (FPU)
Complex Instruction Set
Real mode and Protected mode
Motherboard components
Memory types
Input/Output and access levels
Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 85
42 69 6E 61 72 79
What does this say?

More Related Content

What's hot

System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
Swap-space Management
Swap-space ManagementSwap-space Management
Swap-space Management
Agnas Jasmine
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
Mazin Alwaaly
 
Assembly language programming
Assembly language programmingAssembly language programming
Assembly language programminghimhk
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
priyadeosarkar91
 
Computer registers
Computer registersComputer registers
Computer registers
Jatin Grover
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
adarshynl
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly languageAhmed M. Abed
 
RAID
RAIDRAID
Chapter 2 Time boxing & agile models
Chapter 2   Time boxing & agile modelsChapter 2   Time boxing & agile models
Chapter 2 Time boxing & agile models
Golda Margret Sheeba J
 
Os Threads
Os ThreadsOs Threads
Os Threads
Salman Memon
 
Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...
Drusilla918
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
Sundaresan Sundar
 
Vliw or epic
Vliw or epicVliw or epic
Vliw or epic
Amit Kumar Rathi
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
Starlee Lathong
 
Linux process management
Linux process managementLinux process management
Linux process managementRaghu nath
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
Zuhaib Zaroon
 
RISC and CISC Processors
RISC and CISC ProcessorsRISC and CISC Processors
RISC and CISC Processors
Adeel Rasheed
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
Sandesh Jonchhe
 

What's hot (20)

System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Swap-space Management
Swap-space ManagementSwap-space Management
Swap-space Management
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
Assembly language programming
Assembly language programmingAssembly language programming
Assembly language programming
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Computer registers
Computer registersComputer registers
Computer registers
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
 
RAID
RAIDRAID
RAID
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Chapter 2 Time boxing & agile models
Chapter 2   Time boxing & agile modelsChapter 2   Time boxing & agile models
Chapter 2 Time boxing & agile models
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...Software engineering a practitioners approach 8th edition pressman solutions ...
Software engineering a practitioners approach 8th edition pressman solutions ...
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
Vliw or epic
Vliw or epicVliw or epic
Vliw or epic
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
 
Linux process management
Linux process managementLinux process management
Linux process management
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
RISC and CISC Processors
RISC and CISC ProcessorsRISC and CISC Processors
RISC and CISC Processors
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 

Similar to Assembly Language for x86 Processors 7th Edition Chapter 2 : x86 Processor Architecture

The Basics of Cell Computing Technology
The Basics of Cell Computing TechnologyThe Basics of Cell Computing Technology
The Basics of Cell Computing Technology
Slide_N
 
Computer Hardware & Software Lab Manual 3
Computer Hardware & Software Lab Manual 3Computer Hardware & Software Lab Manual 3
Computer Hardware & Software Lab Manual 3
senayteklay
 
chapt_02.ppt
chapt_02.pptchapt_02.ppt
chapt_02.ppt
Ranaqamar6
 
5.6 Basic computer structure microprocessors
5.6 Basic computer structure   microprocessors5.6 Basic computer structure   microprocessors
5.6 Basic computer structure microprocessorslpapadop
 
Module-2 Instruction Set Cpus.pdf
Module-2 Instruction Set Cpus.pdfModule-2 Instruction Set Cpus.pdf
Module-2 Instruction Set Cpus.pdf
Sitamarhi Institute of Technology
 
computer processors intel and amd
computer processors intel and amdcomputer processors intel and amd
computer processors intel and amdRohit Gada
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
Raja Basharat
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
SaifulAhmad27
 
CO&AL-lecture-04 about the procedures in c language (1).pptx
CO&AL-lecture-04 about the procedures in c language (1).pptxCO&AL-lecture-04 about the procedures in c language (1).pptx
CO&AL-lecture-04 about the procedures in c language (1).pptx
gagarwazir7
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
Jaffer Haadi
 
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIMAn Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
journalBEEI
 
directCell - Cell/B.E. tightly coupled via PCI Express
directCell - Cell/B.E. tightly coupled via PCI ExpressdirectCell - Cell/B.E. tightly coupled via PCI Express
directCell - Cell/B.E. tightly coupled via PCI ExpressHeiko Joerg Schick
 
Processor types
Processor typesProcessor types
Processor types
Amr Aboelgood
 
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral IntegrationA 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
Talal Khaliq
 
1 Intro To Micro P
1 Intro To Micro P1 Intro To Micro P
1 Intro To Micro P
ikinfad
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
Hossam Hassan
 
VTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer NotesVTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer Notes
24x7house
 
Best Practices and Performance Studies for High-Performance Computing Clusters
Best Practices and Performance Studies for High-Performance Computing ClustersBest Practices and Performance Studies for High-Performance Computing Clusters
Best Practices and Performance Studies for High-Performance Computing Clusters
Intel® Software
 

Similar to Assembly Language for x86 Processors 7th Edition Chapter 2 : x86 Processor Architecture (20)

The Basics of Cell Computing Technology
The Basics of Cell Computing TechnologyThe Basics of Cell Computing Technology
The Basics of Cell Computing Technology
 
Computer Hardware & Software Lab Manual 3
Computer Hardware & Software Lab Manual 3Computer Hardware & Software Lab Manual 3
Computer Hardware & Software Lab Manual 3
 
chapt_02.ppt
chapt_02.pptchapt_02.ppt
chapt_02.ppt
 
5.6 Basic computer structure microprocessors
5.6 Basic computer structure   microprocessors5.6 Basic computer structure   microprocessors
5.6 Basic computer structure microprocessors
 
Module-2 Instruction Set Cpus.pdf
Module-2 Instruction Set Cpus.pdfModule-2 Instruction Set Cpus.pdf
Module-2 Instruction Set Cpus.pdf
 
The Cell Processor
The Cell ProcessorThe Cell Processor
The Cell Processor
 
computer processors intel and amd
computer processors intel and amdcomputer processors intel and amd
computer processors intel and amd
 
Cao 2012
Cao 2012Cao 2012
Cao 2012
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
 
CO&AL-lecture-04 about the procedures in c language (1).pptx
CO&AL-lecture-04 about the procedures in c language (1).pptxCO&AL-lecture-04 about the procedures in c language (1).pptx
CO&AL-lecture-04 about the procedures in c language (1).pptx
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIMAn Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
 
20120140502007 2-3
20120140502007 2-320120140502007 2-3
20120140502007 2-3
 
directCell - Cell/B.E. tightly coupled via PCI Express
directCell - Cell/B.E. tightly coupled via PCI ExpressdirectCell - Cell/B.E. tightly coupled via PCI Express
directCell - Cell/B.E. tightly coupled via PCI Express
 
Processor types
Processor typesProcessor types
Processor types
 
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral IntegrationA 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
 
1 Intro To Micro P
1 Intro To Micro P1 Intro To Micro P
1 Intro To Micro P
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
 
VTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer NotesVTU University Micro Controllers-06ES42 lecturer Notes
VTU University Micro Controllers-06ES42 lecturer Notes
 
Best Practices and Performance Studies for High-Performance Computing Clusters
Best Practices and Performance Studies for High-Performance Computing ClustersBest Practices and Performance Studies for High-Performance Computing Clusters
Best Practices and Performance Studies for High-Performance Computing Clusters
 

Recently uploaded

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 

Recently uploaded (20)

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 

Assembly Language for x86 Processors 7th Edition Chapter 2 : x86 Processor Architecture

  • 1. Assembly Language for x86 Processors 7th Edition Chapter 2: x86 Processor Architecture (c) Pearson Education, 2015. All rights reserved. You may modify and copy this slide show for your personal use, or for use in the classroom, as long as this copyright statement, the author's name, and the title are not changed. Slides prepared by the author and added some materials by the Instructor Revision date: 2/15/2015 Kip Irvine 21st Sept Week 2
  • 2. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 3 Chapter Overview General Concepts IA-32 Processor Architecture IA-32 Memory Management 64-bit Processor (New) Components of an IA-32 Microcomputer Input-Output System
  • 3. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 4 General Concepts Basic microcomputer design Instruction execution cycle Reading from memory How programs run
  • 4. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 5 We can divide the parts that make up a computer into three broad categories or subsystem: the central processing unit (CPU), the main memory and the input/output subsystem. Figure Computer hardware (subsystems)
  • 5. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 6 Computer hardware (subsystems) Control ALU Memory Input- Output-
  • 6. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 7
  • 7. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 8 The arithmetic logic unit (ALU) The central processing unit (CPU) performs operations on data. In most architectures it has three parts: an arithmetic logic unit (ALU), a control unit and a set of registers, fast storage locations (Figure below). Central processing unit (CPU)
  • 8. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 9 Registers Registers are fast stand-alone storage locations that hold data temporarily. Multiple registers are needed to facilitate the operation of the CPU. Some of these registers are shown in Figure on the previous slide. Data registers Instruction register Program counter
  • 9. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 10 Basic Microcomputer Design clock synchronizes CPU operations control unit (CU) coordinates sequence of execution steps ALU performs arithmetic and bitwise processing Central Processor Unit (CPU) Memory Storage Unit registers ALU clock I/O Device #1 I/O Device #2 data bus control bus address bus CU
  • 10. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 11 Microcomputer Design The CPU is attached to the rest of the computer via pins attached to Most pins connect to the data bus, the control bus, and the address bus. The memory storage unit is where instructions and data are held while a computer program is running. The storage unit receives requests for data from the CPU, transfers data from CPU into memory. All processing of data takes place within the CPU, so programs residing in memory must be copied into the CPU before they can execute. Individual program instructions can be copied into the CPU one at a time, or groups of instructions can be copied together.
  • 11. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 12 What is a bus? A bus is a group of parallel wires that transfer data from one part of the computer to another. Depicting the Three different kinds of buses.
  • 12. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 13 What is a bus? A bus is a group of parallel wires that transfer data from one part of the computer to another. A computer system usually contains four bus types: data, I/O, control, address. The data bus transfers instructions and data between the CPU and memory. The I/O bus transfers data between CPU and the system input/output devices. The control bus uses binary signals to synchronize actions of all devices attached to the system bus. The address bus holds the addresses of instructions and data when the currently executing instruction transfers data between the CPU and memory.
  • 13. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 14 Clock synchronizes all CPU and BUS operations machine (clock) cycle measures time of a single operation clock is used to trigger events one cycle 1 0
  • 14. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 15 Clock The duration of a clock cycle is calculated as the reciprocal of the A clock that oscillates 1 billion times per second (1GHz), for example produces a clock cycle with a duration of one billionth of a second (1 nanosecond). A machine instruction requires at least one clock cycle to execute, and a few require in excess of 50 clocks (the multiply instruction on the 8088 processor, for example). Instructions requiring memory access often have empty clock cycle called wait states because of the differences in the speeds of CPU, the system bus, and memory circuits. one cycle 1 0
  • 15. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 16 What's Next General Concepts IA-32 Processor Architecture IA-32 Memory Management 64-bit Processor Components of an IA-32 Microcomputer Input-Output System
  • 16. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 17 Fetch Decode Fetch operands Execute Store output Instruction Execution Cycle
  • 17. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 18 Reading from Memory Multiple machine cycles are required when reading from memory, because it responds much more slowly than the CPU. The steps are: address placed on address bus Read Line (RD) set low CPU waits one cycle for memory to respond Read Line (RD) goes to 1, indicating that the data is on the data bus Cycle 1 Cycle 2 Cycle 3 Cycle 4 Data Address CLK ADDR RD DATA
  • 18. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 19 Cache Memory High-speed expensive static RAM both inside and outside the CPU. Level-1 cache: inside the CPU or outside Level-2 cache: outside the CPU Level-3 cache: outside the CPU Cache hit: when data to be read is already in cache memory Cache miss: when data to be read is not in cache memory.
  • 19. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 20 How a Program Runs Operating system User Current directory System path Directory entry sends program name to gets starting cluster from searches for program in loads and starts Program returns to
  • 20. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 21 Multitasking OS can run multiple programs at the same time. Multiple threads of execution within the same program. Scheduler utility assigns a given amount of CPU time to each running program. Rapid switching of tasks gives illusion that all programs are running at once the processor must support task switching.
  • 21. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 22 2.2 IA-32 Processor Architecture Modes of operation Basic execution environment Floating-point unit Intel Microprocessor history
  • 22. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 23 Modes of Operation Protected mode native mode (Windows, Linux) Real-address mode native MS-DOS System management mode power management, system security, diagnostics Virtual-8086 mode hybrid of Protected each program has its own 8086 computer
  • 23. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 24 Modes of Operation Protected mode Protected mode is the native state of the processor, in which all instructions and features are available. Programs are given separate memory areas named segments, and the processor prevents programs from referencing memory outside their assigned segments. Real-address mode Real address mode implements the programming environment of an early Intel processor with a few extra features, such as the ability to switch into other modes. This mode is useful if a program requires direct access to system memory and hardware devices. System management mode System management mode (SMM) provides an operating system with a mechanism for implementing functions such as power management and system security. These functions are usually implemented by computer manufacturers who customize the processor for a particular system setup.
  • 24. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 25 Basic Execution Environment Addressable memory General-purpose registers Index and base registers Specialized register uses Status flags Floating-point, MMX, XMM registers
  • 25. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 26 Addressable Memory Protected mode 4 GB (Extended Physical Addressing allows a total of 64 GBytes of physical memory to be addressed.) 32-bit address Real-address and Virtual-8086 modes 1 MB space 20-bit address
  • 26. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 27 Let us Learn about Registers. Very Important to write Assembly Language Program.
  • 27. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 28 Intel 32 bit and 64 bit General purpose Registers
  • 28. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 29 General-Purpose Registers CS SS DS ES EIP EFLAGS 16-bit Segment Registers EAX EBX ECX EDX 32-bit General-Purpose Registers FS GS EBP ESP ESI EDI Named storage locations inside the CPU, optimized for speed. (8 General purpose registers) Six segment registers Process status register Instruction pointer
  • 29. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 30 Accessing Parts of Registers Use 8-bit name, 16-bit name, or 32-bit name Applies to EAX, EBX, ECX, and EDX AH AL 16 bits 8 AX EAX 8 32 bits 8 bits + 8 bits Lower 16 bit is referenced as AX
  • 30. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 31 Index and Base Registers Some registers have only a 16-bit name for their lower half: More details on Intel architecture
  • 31. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 32 General-Purpose Registers
  • 32. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 33 Some Specialized Register Uses (1 of 2) General-Purpose EAX accumulator (multiplication and division) ECX loop counter ( not used for arithmetic) ESP stack pointer (used for a system memory structure) ESI, EDI index registers (Extended source Index and Extended destination index) EBP extended frame pointer (stack) Segment CS code segment DS data segment SS stack segment ES, FS, GS - additional segments
  • 33. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 34 Assembly program Example 1. What you need to set up in order to run x86 Assembly language? 2. How to write assembly language and assemble the program? 3. Show you some simple assembly language program and run them. 4. You need to practice at home or other times in order to become familiar with the Assembly language program.
  • 34. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 35 : 2015/9/22 : Assembly Language program Instructions for Assembling. In order to run the Assembly programs that we will be learning in this course , please follow these instructions. Please use the web link http://www.kipirvine.com 2. After entering the authors website, please choose "Getting started with MASM" link. 3. That page will explain clearly how to download the MASM for which visual studio version and run your first program. Try it yourself as to how to assemble the first assembly program and run them to see if your program works correctly. 4. The author clearly instructs you how to assemble the example program as well as write new programs and run them. Good Luck and please try some assembly program before next class. USING MASM Assembler and the link
  • 35. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 36 First Assembly program Moving Integer Number into EAX TITLE MASM Template (1stassembly.asm) ; Description: This is the first assembly program that adds ; two numbers. ; Author Name: ; Author Number: 091111 ; Revision date: Sept 20th, 2016 INCLUDE Irvine32.inc ; include library for assembler .code main PROC mov eax, 5 ; move 5 to the EAX register add eax, 6 ; add 6 to the EAX register call WriteInt ; display value in EAX exit main ENDP END main
  • 36. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 37 Second Assembly program Moving Hexadecimal Number into EAX TITLE MASM Template (2ndassembly.asm) ; Description: This is the 2nd assembly program that adds ; two hexadecimal numbers. ; Author Name: ; Author Number: 091111 ; Revision date: Sept 20th, 2016 INCLUDE Irvine32.inc ; include library for assembler .code main PROC mov eax, 10000h ; Move a hex value into EAX add eax, 40000h ; add a hex value into EAX sub eax, 20000h ; subtract hex value from EAX call DumpRegs ; Display what is in Register exit main ENDP END main
  • 37. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 38 Creating a Project From Scratch . Visual Studio makes it possible (in 12 easy steps) to create an Assembly Language project from scratch. In the first step, you will create a Win32 Console application designed for C++, and just modify the custom build rules. Step 1: Select New from the File menu, then select Project. In the New Project window, select Win32 under Visual C++ in the left panel, and select Win32 Console Application in the middle panel. Give your project a suitable name (near the bottom of the window):
  • 38. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 39 Try to write similar simple assembly programs by yourself! Hint: How about moving -128 to EAX register. Add + 54 and see if you get the result. Similar ideas can be thought of by you.
  • 39. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 40 Some Specialized Register Uses (2 of 2) EIP instruction pointer (register contains the address of the next instruction to be executed) EFLAGS status and control flags each flag is a single binary bit (Reflect the outcome of some CPU operation.)
  • 40. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 41 In the high level language program, you do not know if the overflow occurs or not. In the assembly language program, you need to worry about the overflow of the program.
  • 41. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 42 Status Flags Carry unsigned arithmetic out of range Overflow signed arithmetic out of range Sign result is negative Zero result is zero Auxiliary Carry carry from bit 3 to bit 4 Parity sum of 1 bits is an even number
  • 42. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 43 MMX Technology What is MMX Register? MMX technology was added onto the Pentium processor by Intel to improve the performance of advanced multimedia and communications applications. The eight 64- bit MMX registers support special instructions called SIMD (single instruction, Multiple-Data). As the name implies, MMX instructions operate in parallel on the data values contained in MMX registers. What XMM Registers? The x86 architecture also contains eight 128-bit registers called XMM registers. They are used by streaming SIMD extensions to the instruction set.
  • 43. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 44 Floating-Point, MMX, XMM Registers Eight 80-bit floating-point data registers ST(0), ST(1), . . . , ST(7) arranged in a stack used for all floating-point arithmetic Eight 64-bit MMX registers Eight 128-bit XMM registers for single- instruction multiple-data (SIMD) operations ST(0) ST(1) ST(2) ST(3) 80-bit Data Registers ST(4) ST(5) ST(6) ST(7) Opcode Register MMX technology was added onto the Pentium processor by Intel to improve the performance of advanced multimedia and communications applications. The eight 64-bit MMX registers support special instructions called SIMD (single-Instruction and Multiple-Data)
  • 44. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 45 HISTORY of INTEL Architecture
  • 45. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 46 Intel Microprocessor History Intel 8086, 80286 IA-32 processor family P6 processor family CISC and RISC
  • 46. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 47 Early Intel Microprocessors Intel 8080 (First processor)[8-bit] 64K addressable RAM 8-bit registers CP/M operating system S-100 BUS architecture 8-inch floppy disks! Intel 8086/8088 (1978) [16-bit registers][1980 IBM had the identical 8088 processor] IBM-PC Used 8088 1 MB addressable RAM 16-bit registers 16-bit data bus (8-bit for 8088) separate floating-point unit (8087)
  • 47. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 48 The IBM-AT Intel 80286 [some where between 1978 to 1985] 16 MB addressable RAM Protected memory 24-bit address bus several times faster than 8086 introduced IDE bus architecture 80287 floating point unit
  • 48. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 49 Intel IA-32 Family Intel386 [1985 ] 4 GB addressable RAM, 32-bit registers, paging (virtual memory)-32 address bus Intel- (IA-32) family Intel486 [1989] instruction pipelining, permitted multiple instructions to be processed at the same time. Pentium [1993] superscalar, 32-bit address bus, 64-bit internal data path, MMX technology to the IA-32 family added.
  • 49. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 50 64-bit Processors Intel64 [64-bit processing] 64-bit linear address space Intel: Pentium Extreme, Xeon, Celeron D, Pendium D, 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
  • 50. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 51 Intel Technologies HyperThreading technology two tasks execute on a single processor at the same time Dual Core processing multiple processor cores in the same IC package each processor has its own resources and communication path with the bus
  • 51. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 52 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
  • 52. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 53 CISC and RISC CISC complex instruction set large instruction set high-level operations requires microcode interpreter examples: Intel 80x86 family RISC reduced instruction set simple, atomic instructions small instruction set directly executed by hardware examples: ARM (Advanced RISC Machines) DEC Alpha (now Compaq)
  • 53. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 54 What's Next General Concepts IA-32 Processor Architecture IA-32 Memory Management Components of an IA-32 Microcomputer Input-Output System
  • 54. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 55 2.3 IA-32 Memory Management Real-address mode Calculating linear addresses Protected mode Multi-segment model Paging
  • 55. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 56 Real-Address mode 1 MB RAM maximum addressable Application programs can access any area of memory Single tasking Supported by MS-DOS operating system Windows 95, 98 can be booted into this mode.
  • 56. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 57 Protected Mode (1 of 2) 4 GB addressable RAM (00000000 to FFFFFFFFh) Each program assigned a memory partition which is protected from other programs Designed for multitasking Supported by Linux & MS-Windows
  • 57. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 58 Protected mode (2 of 2) Segment descriptor tables Program structure code, data, and stack areas CS, DS, SS segment descriptors global descriptor table (GDT) MASM Programs use the Microsoft flat memory model
  • 58. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 59 Segmented Memory Segmented memory addressing: absolute (linear) address is a combination of a 16-bit segment value added to a 16-bit offset 00000 10000 20000 30000 40000 50000 60000 70000 80000 90000 A0000 B0000 C0000 D0000 E0000 F0000 8000:0000 8000:FFFF seg ofs 8000:0250 0250 one segment
  • 59. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 60 Calculating Linear Addresses Given a segment address, multiply it by 16 (add a hexadecimal zero), and add it to the offset Example: convert 08F1:0100 to a linear address Adjusted Segment value: 0 8 F 1 0 Add the offset: 0 1 0 0 Linear address: 0 9 0 1 0
  • 60. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 61 Your turn . . . What linear address corresponds to the segment/offset address 028F:0030? 028F0 + 0030 = 02920 Always use hexadecimal notation for addresses.
  • 61. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 62 Your turn . . . What segment addresses correspond to the linear address 28F30h? Many different segment-offset addresses can produce the linear address 28F30h. For example: 28F0:0030, 28F3:0000, 28B0:0430, . . .
  • 62. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 63 Flat Segment Model Single global descriptor table (GDT). All segments mapped to entire 32-bit address space 00000000 FFFFFFFF (4GB) physical RAM 00000000 Segment descriptor, in the Global Descriptor Table 00040 - - - - base address limit access 00040000 not used
  • 63. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 64 Multi-Segment Model Each program has a local descriptor table (LDT) holds descriptor for each segment used by the program 3000 RAM 00003000 Local Descriptor Table 0002 00008000 000A 00026000 0010 base limit access 8000 26000
  • 64. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 65 Paging Supported directly by the CPU Divides each segment into 4096-byte blocks called pages Sum of all programs can be larger than physical memory Part of running program is in memory, part is on disk Virtual memory manager (VMM) OS utility that manages the loading and unloading of pages Page fault issued by CPU when a page must be loaded from disk
  • 65. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 66 What's Next General Concepts IA-32 Processor Architecture IA-32 Memory Management 64-bit processor Components of an IA-32 Microcomputer Input-Output System
  • 66. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 67 64-Bit Processors 64-Bit Operation Modes Compatibility mode can run existing 16-bit and 32-bit applications (Windows supports only 32-bit apps in this mode) 64-bit mode Windows 64 uses this Basic Execution Environment addresses can be 64 bits (48 bits, in practice) 16 64-bit general purpose registers 64-bit instruction pointer named RIP
  • 67. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 68 64-Bit General Purpose Registers 32-bit general purpose registers: EAX, EBX, ECX, EDX, EDI, ESI, EBP, ESP, R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D 64-bit general purpose registers: RAX, RBX, RCX, RDX, RDI, RSI, RBP, RSP, R8, R9, R10, R11, R12, R13, R14, R15
  • 68. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 69 What's Next General Concepts IA-32 Processor Architecture IA-32 Memory Management 64-Bit Processors Components of an IA-32 Microcomputer Input-Output System
  • 69. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 70 Components of an IA-32 Microcomputer Motherboard Video output Memory Input-output ports
  • 70. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 71 Motherboard CPU socket External cache memory slots Main memory slots BIOS chips Sound synthesizer chip (optional) Video controller chip (optional) IDE, parallel, serial, USB, video, keyboard, joystick, network, and mouse connectors PCI bus connectors (expansion cards)
  • 71. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 72 Intel D850MD Motherboard dynamic RAM Pentium 4 socket Speaker IDE drive connectors mouse, keyboard, parallel, serial, and USB connectors AGP slot Battery Video Power connector memory controller hub Diskette connector PCI slots I/O Controller Firmware hub Audio chip Source: Intel® Desktop Board D850MD/D850MV Technical Product Specification
  • 72. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 73 Intel 965 Express Chipset
  • 73. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 74 Video Output Video controller on motherboard, or on expansion card AGP (accelerated graphics port technology)* Video memory (VRAM) Video CRT Display uses raster scanning horizontal retrace vertical retrace Direct digital LCD monitors no raster scanning required * This link may change over time.
  • 74. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 75 Sample Video Controller (ATI Corp.) 128-bit 3D graphics performance powered by 3D graphics performance Intelligent TV-Tuner with Digital VCR TV-ON-DEMAND Interactive Program Guide Still image and MPEG-2 motion video capture Video editing Hardware DVD video playback Video output to TV or VCR
  • 75. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 76 Memory ROM read-only memory EPROM erasable programmable read-only memory Dynamic RAM (DRAM) inexpensive; must be refreshed constantly Static RAM (SRAM) expensive; used for cache memory; no refresh required Video RAM (VRAM) dual ported; optimized for constant video refresh CMOS RAM complimentary metal-oxide semiconductor system setup information See: Intel platform memory (Intel technology brief: link address may change)
  • 76. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 77 Input-Output Ports USB (universal serial bus) intelligent high-speed connection to devices up to 12 megabits/second USB hub connects multiple devices enumeration: computer queries devices supports hot connections Parallel short cable, high speed common for printers bidirectional, parallel data transfer Intel 8255 controller chip
  • 77. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 78 Input-Output Ports (cont) Serial RS-232 serial port one bit at a time uses long cables and modems 16550 UART (universal asynchronous receiver transmitter) programmable in assembly language
  • 78. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 79 Device Interfaces ATA host adapters intelligent drive electronics (hard drive, CDROM) SATA (Serial ATA) inexpensive, fast, bidirectional FireWire high speed (800 MB/sec), many devices at once Bluetooth small amounts of data, short distances, low power usage Wi-Fi (wireless Ethernet) IEEE 802.11 standard, faster than Bluetooth
  • 79. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 80 What's Next General Concepts IA-32 Processor Architecture IA-32 Memory Management Components of an IA-32 Microcomputer Input-Output System
  • 80. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 81 Levels of Input-Output Level 3: High-level language function examples: C++, Java portable, convenient, not always the fastest Level 2: Operating system Application Programming Interface (API) extended capabilities, lots of details to master Level 1: BIOS drivers that communicate directly with devices OS security may prevent application-level code from working at this level
  • 81. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 82 Displaying a String of Characters When a HLL program displays a string of characters, the following steps take place: Application Program OS Function BIOS Function Hardware Level 0 Level 1 Level 2 Level 3
  • 82. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 83 Programming levels Assembly language programs can perform input-output at each of the following levels:
  • 83. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 84 Summary Central Processing Unit (CPU) Arithmetic Logic Unit (ALU) Instruction execution cycle Multitasking Floating Point Unit (FPU) Complex Instruction Set Real mode and Protected mode Motherboard components Memory types Input/Output and access levels
  • 84. Irvine, Kip R. Assembly Language for x86 Processors 7/e, 2016. 85 42 69 6E 61 72 79 What does this say?