Computer Organization With Assembly Language
Computer Organization With Assembly Language
with Assembly
Language
Computer Science CS203/CS 312
Computer Engineering CpE310
Book:
IBM PC Assembly Language and Programming by
Peter Abel
Topics:
Basic Features of PC Hardware
Instruction Addressing and
Execution
Examining Computer Memory
and Executing Instructions
Requirements for Coding in
Assembly Language
Grading System
60% for Class Works
(Assignment, Quizzes, Class
Participation,
Laboratory
40%
100%
works)
for Periodical Exams
INTRODUCTION TO
ASSEMBLY LANGUAGE
What is Assembly
language?
- is alow-level
programming languagefor
computers, microprocessors,
microcontrollers, and other
programmable devices.
- it implements a symbolic
representation of the machine
codesand other constants
needed to program a given
CPUarchitecture.
Assembly language
programmer can earn more
than programmers who can not
write assembly language (in
those applications where
assembly language is required).
It requires less memory
consumptions.
Resident programs and
interrupt service routines are
almost always develop in
assembly language.
Writing assembly
language is fun and a
requirement for you
to graduate.
DISADVANTAGE:
It takes too much effort
to write applications in
assembly language.
Advantages:
Shows how programs interface with
the operating system, the
processor , and the BIOS.
Shows how data is represented and
stored in memory and on external
devices.
Clarifies how the processor accesses
and executes instructions and how
instructions access and process data.
Clarifies how a program accesses
external devices.
Requirements of learning
assembly language
IBM based personal computer
Operating system
Assembler translator program
Brain
Not required in
assembly language
Prior knowledge of any
programming language.
Prior knowledge of electronics
or circuitry.
Basic Features of PC
Hardware
Chapter 1
IBM PC Assembly Language and
Programming
Number systems
Decimal (10)
Octal (8)
Hexadecimal (16)
Binary (2)
Decimal (10)
Number system with a base
of 10.
Ex.
25610
Octal
Number system with a base of
8.
Ex.
2568
Hexadecimal
Number system with a base of
16.
Ex.
25616
Binary
Number system with a base of
2.
Ex.
2562
Bit
The fundamental building block
of computer storage
Maybe off (0) or on (1)
It doesnt provide much
information.
bytes
A group of nine related bits in
which the 9th bit represents
parity bit is called byte.
0
Data bits
parity
Related bytes
Binary numbers
Each bit position represents
ascending powers of 2 from
right to left.
example:
41H = A = 0100 0001
Negative numbers
Sign bit is the leftmost bit
1 = negative
0 = positive
PC component
Microprocessor
The brain of PC
Performs all executing of
instructions and processing of
data
Vary in speed, memory size,
registers, data bus
I/O Devices
Intel processors
8088
16-bit registers
8-bit data bus
8086
16-bit data bus (faster than 8088)
80286
16MB internal memory
Enables OS perform multitasking
80386
32-bit registers and data bus
4 billion bytes of memory
Supports virtual mode
(swapping)
80486
32-bit registers and data bus
Introduced High-speed cache
Pentium
32-bit registers
64-bit data bus
Separate caches for data and for
memory
Superscalar version of 80486
(executes more than 1 instruction
per clock cycle)
Pentium IV
It uses QDR (Quad Data Rate)
technique.
L2 to L1 memory data cache
is 256-wide.
Multi-core
Contains 2 or more
independent cores.