SlideShare a Scribd company logo
Computer organizøtion
&
Assembly Language
By sir Najam
What is a Machine ?
RAW
MATERIAL
P R OC ES S
DIR ECTIV ES
FINAL
PRODUCT
In General: Device that processes a
series of raw materials into the desired
product following a well-defined
Typer of Machines
Device Raw Material Products
Food Processing
Factory
Natural Fruits,
Vegetables,
Meats, Dairy and
Spices
Manufactured
(Packaged)
Food Products
Airport
Planes,
Travelers,
Goods
Planes,
Travelers,
Goods
Administrativ
e Ofiice
Application Files Decisions
Computer Data Data
Computer Machine Model
MxCwIwK
D›ÆEGTłL”EE
= COMPUTER
Basic Computer
Need a Unit to Execute
Instructions
Need a Unit to
Contain Programs
Need a Unit to Contain
Input Data
Need a Unit to Contain
Intermediate Stage
Data Need a Unit to
Input Data
Need a Unit to Output
Data
C£iNTRAL
P R O c E s s l N G
UNIT (EQU)
EMORY
IO
Basic Computer Organization
A D D R B S B F U S
G A T A U U
CONYROL EU
DATA BUS: CARRIES THE DATA TO BE CRANSPERRED
CONTROL FUS' S +CIPIES THE NATURE OP THE
TRANSFER:
(MEMORY READY RITE OR
Memory
2 Operations:
Read: Copy
Data stored in
word of Address
(on Address
lines) to Data
Bus
Write: Store Data
on Data Bus into
word of Address
(on Address
lines)
COE 205
OATA
Basic Computer Organization
A D D R B S B F U S
G A T A U U
CONYROL EU
DATA BUS: CARRIES THE DATA TO BE CRANSPERRED
CONTROL FUS' S +CIPIES THE NATURE OP THE
TRANSFER:
(MEMORY READY RITE OR
Memory
COE 205
2 Operations:
Read: Copy
Data stored in
word of Address
(on Address
lines) to Data
Bus
Write: Store Data
on Data Bus into
word of Address
(on Address
lines)
OATA
Memory
COE 205
2 Operations:
Read: Copy
Data stored in
word of Address
(on Address
lines) to Data
Bus
Write: Store Data
on Data Bus into
word of Address
(on Address
lines)
OATA
Concept of
Address
It is an index in the memory
It represents a “geographic” location
of a word in the memory
Number of Address lines and Word
size determine Memory Capacity
(Size) M
o
s
t o
f t
h
e time:
M
e
m
o
ry size = 2nw
ords = 2
^ * m bits
COE
205
RAM
RAM: Random Access Memory
Although the name is about the way memory
is accessed. Historically, volatile memory has
been called RAM.
V
olatile (do not retain information on power
ofl) Used mainly as Central Memory for
CPUs
Two types of RAM
Static: Continuous Retention of Information
Dynamic (DRAM): needs refresh cycle to
maintain
information
COE 205
ROM
Non Volatile
Used to store data (programs) that do not
change often (fixed)
Many types
Mask ROM: Values set at fabrication stage.
Values cannot be changed
Fuse PROM: Values set at burning phase.
Values
cannot be changed
EPROM: Can be erased (UV)
EEPROM: Electrically erased
Flash EEPROM: Easily reprogrammable.
New: NVRAM (Non Volatile RAM): Fast access
time.
Disk Drives
Hard Drive: suite of
magnetic disks.
Mechanically read and
write data by moving a
set of magnetic head
over the disks
CD-ROM, DVD-ROM:
Suite of optical disks
read by measuring the
time of laser reflexion
between “1” and “0”
“0”
INBYRU
O3d
i
Program Execution
COE 205
A Program is a suite
of instructions
Program Execution
is
Sequential
Program is stored in
Memory
Program is executed
by
Executes Programs Stored in
Memory
COE 205
Executes Instructions ONE b ONE
Only “knows” instructions: Instruction
Set
DO NOT know any notion of Program
as a single entity.
Everything is a suite of instructions
CPU Structure
(1)
COE 205
Is Mainly a Data Processing Unit
Controlled
by a Control Unit.
Data Processing Unit: Datapath
Registers (Scratch pad working space
or temporary data storage)
ALU: Arithmetic and Logic
Unit Internal Buses
Control Unit: Generates
Commands to
“drive” Datapath
operations
ČìOMTROL %NIT
COE 205
Master
Clock
COE
205
Instructions Executed step by step
Need a “Rhythm” Generator to move forward in
the steps:
KL•OCK UREQUEI4C;V- ) J G L O K CYCLE PERIOD . DMX
Instruction
Set
Instruction Set is the Catalog of the CPU
Defines what are ALL the possible
operations that the CPU can execute
Only Instructions are recognized by CPU.
CPU does NOT “understand” High Level
Language (text).
CPU understands instructions coded in
numbers called machine code.
Instruction parameters
COE 205
Each Instruction specifies an action or a suite
of actions:
Action(s) “identifier” or Operation Code or
Opcode Action arguments or operands
Methods specifying how to access the
operands, called addressing modes
lxsvizucviox seecirieo as:
Number of
Operands
COE 205
Many types of Instruction Sets
Instruction Set with One Operand:
Implicit Register Called Accumulator.
Everything goes to and from the
accumulator:
Instruction Set with Two Operands:
Many registers can be used as
accumulators
Instruction Set with Three
Operands: Mainly Register Based.
F
etch — Decode -
Execute
Ex
ecut
e
F
etc
h
Decod
e
Address of
rams
Where the Address of next instruction is
Stored ?
N X X D F O R IN
INSTRUCTION OINTXR
GALLXDI “ P RO G R A M
COUNTER” @J
• Critical Component of CPU
• Conveniently useful for changing
program sequence (Branch
instructions)
Instruction Register
Where is the current instruction going to be stored
during its execution ?
ROA D F O R A REGISTER
>•*•
or.ion: "IxsvRu TION
RzGISTRR”
• Critical Component of CPU
• Internal Register
. Cannot be
used (accessed) by
instructions
• Holds the current instruction
until its execution is
completed
• Tightly Coupled to the
decoding portion of the
control unit
operand
fields)
Program
Memory
Binary code (machine code).
h
EMORY (&-LIT)
MOVAX,O
ADD AX,BX
High Level Languages
COE
205
Machine independent.
Cannot be run directly on the target
machine Need to be translated to machine
language
Compiler: program that translates a HLL
program to a machine language
program of a specific platform
The Machine language program produced
by the compiler is the
executable program.
Translating HLL programs to machine language programs is not a one-
to- one mapping
A HLL statement translated to one or more machine language
instructions
Usually, machine language programs produced by compilers are
not efficient
Assembly Language
COE
205
, Text version of machine language
Human friendly representation of machine language
Based on mnemonics (easy to memorize
abbreviations of actions) instead of dealing with
opcode numbers.
Complicated format simplified with some conventions
Text file translated into machine code by the Assembler
weekly assessment with a perfect examples
Assembler
Program that assemble the
programs written in assembly
language into machine
language MOV DX, 1
M
O
V
A
X
, B
X
M
O
V
A
x
,
cx M
O
V
A
X
,
D
x ADD
AX,
ADD AX, 2
ADD AX, BX
ADD AX, CX
ADD AX, i
SUB AX,
1
SUB AX, BX
ADD AX, 1234h
Because there is a ONE to ONE
mapping between instructions
written in assembly language and
machine language instructions,
the process is called: assembly
Disassembly (reverse process) is
also easy because of the ONE to
ONE relation between the
assembly language instructions
and the machine language
instructions
COE 205
BA 0001
8B C3
8B C1
BB C2
83 CO 01
83 C0 02
03 C3
03 C1
03 06
0000
83 E8 01
2B C3
05 1234
Linker
, Program used to link together separately
assembled/compiled programs into a single executable code
Allows the programmers to develop different parts of a large
program separately, test them separately and ‘freeze’ them
for future use.
Allows the programmer to develop store portions of programs
that have been intensively tested and used into a “program
library” for anyone to re-use them.
Produces modular programs and greatly enables the
management of large programming projects
Debugger/Monitor
hese dre tools that alltiw the assembly prtigrammers to:
Display dnd alter the contents of memory dnd registers
while running their code,
Perform disassembly of their machine code (show the
assembly language equivalent),
Permit them to run their programs, stop (or hdlt) them,
run
them step-by-step or inse< break points.
Break points: Positions in the program that if are encountered
during run time, the program will be halted so the programmer can
examine the memory and registers contents and determine what
went wrong.
A User's View of Computer Systems
What Is Assembly Language?
Some example assembly language
instructions:
inc
mov
and
add
result
class_size,45
mask1,128
marks,10
Some points to note:
Assembly language instructions are
cryptic
M
n
e
m
o
n
i
c
s are used for operations
1nc for increment, mo
v for mo
ve (i.e., copy)
Assembly language instructions are low
level
Cannot write instructions such as
mov marks, value
What Is Assembly Language?
(Cont'd)
more t2, t1 000A2 21
$t2,$t1,15
$t3,$t1,$t
2
312A000F
012A5821
add
u
MIPS examples
Assembly Language Machine
Language
e
x
O
O
O
O
O
O
O
O
What Is Assembly Language?
(Cont'd)
more t2, t1 000A2 21
$t2,$t1,15
$t3,$t1,$t
2
312A000F
012A5821
add
u
MIPS examples
Assembly Language Machine
Language
e
x
O
O
O
O
O
O
O
O
What Is Assembly Language?
(Cont'd)
more t2, t1 000A2 21
$t2,$t1,15
$t3,$t1,$t
2
312A000F
012A5821
add
u
MIPS examples
Assembly Language Machine
Language
e
x
O
O
O
O
O
O
O
O
What Is Assembly Language?
(Cont'd)
more t2, t1 000A2 21
$t2,$t1,15
$t3,$t1,$t
2
312A000F
012A5821
add
u
MIPS examples
Assembly Language Machine
Language
e
x
O
O
O
O
O
O
O
O
Why Program in Assembly
Language?
Two main reasons:
Efficiency
Space-efficiency
Time-efficiency
Accessibility
to system
hardware
Space-efficiency
Assembly code
tends to be
compact
Time-efficiency
Assembly
language
Typical Applications
Application that need one of the three advantages of the
assembly language
Time-efficiency
Time-con ’enience
Gtitid tt have but ntit required for funetitinal correctness
Graphics
TirnC-Cl’1 I1C3)
Necessary to satisfy functionality
Real-time applications
Aircraft navigational systems
Process control systems
Rtibot ctintrol software
Missile ctintrtil software

More Related Content

PPTX
Assembly chapter One.pptx
PPT
CISY 105 Chapter 1
PPT
Introduction To Computer and Java
PPT
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
PPT
Introduction
PPT
Lec 01 basic concepts
PPT
My cool new Slideshow!
Assembly chapter One.pptx
CISY 105 Chapter 1
Introduction To Computer and Java
chapter1 -Basic co.pptjsjjsjdjxjdjdjdjjsjsjd
Introduction
Lec 01 basic concepts
My cool new Slideshow!

Similar to weekly assessment with a perfect examples (20)

PDF
microprocesser-140306112352-phpapp01.pdf
PPTX
Assembly Language
PPTX
2ProgrammerViewOfComputerAndInstructionCycle.pptx
PPTX
lecture Slides - Week 1.programming fundamentals
PPT
EEE226a.ppt
PPT
Assembly language programming implemenation
PDF
Software Concepts Notes
PPTX
Chapter 1 Introduction to C .pptx
PPT
1 Intro To Micro P
PPT
chapter1-basic-structure-of-computers.ppt
PPT
chapter1-basic-structure-of-computers.ppt
PPT
chapter 1 -Basic Structure of Computers (1).ppt
PPT
chapter 1 -Basic Structure of Computers.ppt
PPT
UNIT I.ppt
PPT
chapter1-basicstructureofcomputers.ppt
PPT
chapter1-basic-structure-of-computers.ppt
PPTX
Chapter 1 basic structure of computers
PPT
Basic structure of computers
PPT
Basic structure of computers
PPT
Lecture01
microprocesser-140306112352-phpapp01.pdf
Assembly Language
2ProgrammerViewOfComputerAndInstructionCycle.pptx
lecture Slides - Week 1.programming fundamentals
EEE226a.ppt
Assembly language programming implemenation
Software Concepts Notes
Chapter 1 Introduction to C .pptx
1 Intro To Micro P
chapter1-basic-structure-of-computers.ppt
chapter1-basic-structure-of-computers.ppt
chapter 1 -Basic Structure of Computers (1).ppt
chapter 1 -Basic Structure of Computers.ppt
UNIT I.ppt
chapter1-basicstructureofcomputers.ppt
chapter1-basic-structure-of-computers.ppt
Chapter 1 basic structure of computers
Basic structure of computers
Basic structure of computers
Lecture01
Ad

More from AssadLeo1 (20)

PPT
Chagal chagal with khatch khatch model with detail
PPT
E commerce busin and some important issues
PPTX
What is SEO in pakistan with main components
PPT
business model and some other things that
PPTX
Software Evolution all in Mehmoona.pptx
PPTX
Behavioral Model with Maniha Butt and many More
PPTX
Software Quality Assurance Qurat ul ain.pptx
PPTX
UML Samra Bs it 4th all about aspire college
PPTX
Process Structure and some other important
PPT
Process importance with full detail about
PPTX
IPM Chapter 1 Complete detail and chapeter
PPTX
Hardware Firewall with all the detail of
PPTX
Law and Order in PK in a country is most important
PPTX
Types of Multipule things and other things
PPTX
Model_of_Heterogeneous_System and other things
PPTX
what a knowledge and other things in this slide
PPTX
full with knowledge and other things with
PPT
that is the most important part of this topic
PPT
Discrete and other examples with great intrest
PPTX
Decoding Insights and some extra examples
Chagal chagal with khatch khatch model with detail
E commerce busin and some important issues
What is SEO in pakistan with main components
business model and some other things that
Software Evolution all in Mehmoona.pptx
Behavioral Model with Maniha Butt and many More
Software Quality Assurance Qurat ul ain.pptx
UML Samra Bs it 4th all about aspire college
Process Structure and some other important
Process importance with full detail about
IPM Chapter 1 Complete detail and chapeter
Hardware Firewall with all the detail of
Law and Order in PK in a country is most important
Types of Multipule things and other things
Model_of_Heterogeneous_System and other things
what a knowledge and other things in this slide
full with knowledge and other things with
that is the most important part of this topic
Discrete and other examples with great intrest
Decoding Insights and some extra examples
Ad

Recently uploaded (20)

PDF
Music-and-Arts_jwkskwjsjsjsjsjsjsjdisiaiajsjjzjz
PPTX
philippine contemporary artscot ppt.pptx
PPTX
Green and Orange Illustration Understanding Climate Change Presentation.pptx
PPTX
Neoclassical and Mystery Plays Entertain
PPSX
opcua_121710.ppsxthsrtuhrbxdtnhtdtndtyty
PDF
Dating-Courtship-Marriage-and-Responsible-Parenthood.pdf
PPTX
Theatre Studies - Powerpoint Entertainmn
PPTX
Understanding Postmodernism Powerpoint.pptx
PPTX
Q1_TLE_8_Week_2asfsdgsgsdgdsgfasdgwrgrgqrweg
PPTX
CPAR_QR1_WEEK1_INTRODUCTION TO CPAR.pptx
PPTX
This is about the usage of color in universities design
PPTX
Lung Cancer - Bimbingan.pptxmnbmbnmnmn mn mn
PPTX
Structuralism and functionalism dhshjdjejdj
PDF
2025_Mohammad Mahbub KxXxáacscascsacabir.pdf
PPTX
Green and Blue Illustrative Earth Day Presentation.pptx
PPTX
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
PPTX
DRBC-ROY-ENGINEERING-COLLEGE .pptx
PPTX
G10 HOMEROOM PARENT-TEACHER ASSOCIATION MEETING SATURDAY.pptx
PPTX
National_Artists_for_Dance_with_Examples-1.pptx
PDF
Arts and Crats of Cagayan and Central Luzon.pdf
Music-and-Arts_jwkskwjsjsjsjsjsjsjdisiaiajsjjzjz
philippine contemporary artscot ppt.pptx
Green and Orange Illustration Understanding Climate Change Presentation.pptx
Neoclassical and Mystery Plays Entertain
opcua_121710.ppsxthsrtuhrbxdtnhtdtndtyty
Dating-Courtship-Marriage-and-Responsible-Parenthood.pdf
Theatre Studies - Powerpoint Entertainmn
Understanding Postmodernism Powerpoint.pptx
Q1_TLE_8_Week_2asfsdgsgsdgdsgfasdgwrgrgqrweg
CPAR_QR1_WEEK1_INTRODUCTION TO CPAR.pptx
This is about the usage of color in universities design
Lung Cancer - Bimbingan.pptxmnbmbnmnmn mn mn
Structuralism and functionalism dhshjdjejdj
2025_Mohammad Mahbub KxXxáacscascsacabir.pdf
Green and Blue Illustrative Earth Day Presentation.pptx
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
DRBC-ROY-ENGINEERING-COLLEGE .pptx
G10 HOMEROOM PARENT-TEACHER ASSOCIATION MEETING SATURDAY.pptx
National_Artists_for_Dance_with_Examples-1.pptx
Arts and Crats of Cagayan and Central Luzon.pdf

weekly assessment with a perfect examples

  • 2. What is a Machine ? RAW MATERIAL P R OC ES S DIR ECTIV ES FINAL PRODUCT In General: Device that processes a series of raw materials into the desired product following a well-defined
  • 3. Typer of Machines Device Raw Material Products Food Processing Factory Natural Fruits, Vegetables, Meats, Dairy and Spices Manufactured (Packaged) Food Products Airport Planes, Travelers, Goods Planes, Travelers, Goods Administrativ e Ofiice Application Files Decisions Computer Data Data
  • 5. Basic Computer Need a Unit to Execute Instructions Need a Unit to Contain Programs Need a Unit to Contain Input Data Need a Unit to Contain Intermediate Stage Data Need a Unit to Input Data Need a Unit to Output Data C£iNTRAL P R O c E s s l N G UNIT (EQU) EMORY IO
  • 6. Basic Computer Organization A D D R B S B F U S G A T A U U CONYROL EU DATA BUS: CARRIES THE DATA TO BE CRANSPERRED CONTROL FUS' S +CIPIES THE NATURE OP THE TRANSFER: (MEMORY READY RITE OR
  • 7. Memory 2 Operations: Read: Copy Data stored in word of Address (on Address lines) to Data Bus Write: Store Data on Data Bus into word of Address (on Address lines) COE 205 OATA
  • 8. Basic Computer Organization A D D R B S B F U S G A T A U U CONYROL EU DATA BUS: CARRIES THE DATA TO BE CRANSPERRED CONTROL FUS' S +CIPIES THE NATURE OP THE TRANSFER: (MEMORY READY RITE OR
  • 9. Memory COE 205 2 Operations: Read: Copy Data stored in word of Address (on Address lines) to Data Bus Write: Store Data on Data Bus into word of Address (on Address lines) OATA
  • 10. Memory COE 205 2 Operations: Read: Copy Data stored in word of Address (on Address lines) to Data Bus Write: Store Data on Data Bus into word of Address (on Address lines) OATA
  • 11. Concept of Address It is an index in the memory It represents a “geographic” location of a word in the memory Number of Address lines and Word size determine Memory Capacity (Size) M o s t o f t h e time: M e m o ry size = 2nw ords = 2 ^ * m bits COE 205
  • 12. RAM RAM: Random Access Memory Although the name is about the way memory is accessed. Historically, volatile memory has been called RAM. V olatile (do not retain information on power ofl) Used mainly as Central Memory for CPUs Two types of RAM Static: Continuous Retention of Information Dynamic (DRAM): needs refresh cycle to maintain information COE 205
  • 13. ROM Non Volatile Used to store data (programs) that do not change often (fixed) Many types Mask ROM: Values set at fabrication stage. Values cannot be changed Fuse PROM: Values set at burning phase. Values cannot be changed EPROM: Can be erased (UV) EEPROM: Electrically erased Flash EEPROM: Easily reprogrammable. New: NVRAM (Non Volatile RAM): Fast access time.
  • 14. Disk Drives Hard Drive: suite of magnetic disks. Mechanically read and write data by moving a set of magnetic head over the disks CD-ROM, DVD-ROM: Suite of optical disks read by measuring the time of laser reflexion between “1” and “0” “0”
  • 15. INBYRU O3d i Program Execution COE 205 A Program is a suite of instructions Program Execution is Sequential Program is stored in Memory Program is executed by
  • 16. Executes Programs Stored in Memory COE 205 Executes Instructions ONE b ONE Only “knows” instructions: Instruction Set DO NOT know any notion of Program as a single entity. Everything is a suite of instructions
  • 17. CPU Structure (1) COE 205 Is Mainly a Data Processing Unit Controlled by a Control Unit. Data Processing Unit: Datapath Registers (Scratch pad working space or temporary data storage) ALU: Arithmetic and Logic Unit Internal Buses Control Unit: Generates Commands to “drive” Datapath operations
  • 19. Master Clock COE 205 Instructions Executed step by step Need a “Rhythm” Generator to move forward in the steps: KL•OCK UREQUEI4C;V- ) J G L O K CYCLE PERIOD . DMX
  • 20. Instruction Set Instruction Set is the Catalog of the CPU Defines what are ALL the possible operations that the CPU can execute Only Instructions are recognized by CPU. CPU does NOT “understand” High Level Language (text). CPU understands instructions coded in numbers called machine code.
  • 21. Instruction parameters COE 205 Each Instruction specifies an action or a suite of actions: Action(s) “identifier” or Operation Code or Opcode Action arguments or operands Methods specifying how to access the operands, called addressing modes lxsvizucviox seecirieo as:
  • 22. Number of Operands COE 205 Many types of Instruction Sets Instruction Set with One Operand: Implicit Register Called Accumulator. Everything goes to and from the accumulator: Instruction Set with Two Operands: Many registers can be used as accumulators Instruction Set with Three Operands: Mainly Register Based.
  • 23. F etch — Decode - Execute Ex ecut e F etc h Decod e
  • 24. Address of rams Where the Address of next instruction is Stored ? N X X D F O R IN INSTRUCTION OINTXR GALLXDI “ P RO G R A M COUNTER” @J • Critical Component of CPU • Conveniently useful for changing program sequence (Branch instructions)
  • 25. Instruction Register Where is the current instruction going to be stored during its execution ? ROA D F O R A REGISTER >•*• or.ion: "IxsvRu TION RzGISTRR” • Critical Component of CPU • Internal Register . Cannot be used (accessed) by instructions • Holds the current instruction until its execution is completed • Tightly Coupled to the decoding portion of the control unit operand fields)
  • 26. Program Memory Binary code (machine code). h EMORY (&-LIT) MOVAX,O ADD AX,BX
  • 27. High Level Languages COE 205 Machine independent. Cannot be run directly on the target machine Need to be translated to machine language Compiler: program that translates a HLL program to a machine language program of a specific platform The Machine language program produced by the compiler is the executable program. Translating HLL programs to machine language programs is not a one- to- one mapping A HLL statement translated to one or more machine language instructions Usually, machine language programs produced by compilers are not efficient
  • 28. Assembly Language COE 205 , Text version of machine language Human friendly representation of machine language Based on mnemonics (easy to memorize abbreviations of actions) instead of dealing with opcode numbers. Complicated format simplified with some conventions Text file translated into machine code by the Assembler
  • 30. Assembler Program that assemble the programs written in assembly language into machine language MOV DX, 1 M O V A X , B X M O V A x , cx M O V A X , D x ADD AX, ADD AX, 2 ADD AX, BX ADD AX, CX ADD AX, i SUB AX, 1 SUB AX, BX ADD AX, 1234h Because there is a ONE to ONE mapping between instructions written in assembly language and machine language instructions, the process is called: assembly Disassembly (reverse process) is also easy because of the ONE to ONE relation between the assembly language instructions and the machine language instructions COE 205 BA 0001 8B C3 8B C1 BB C2 83 CO 01 83 C0 02 03 C3 03 C1 03 06 0000 83 E8 01 2B C3 05 1234
  • 31. Linker , Program used to link together separately assembled/compiled programs into a single executable code Allows the programmers to develop different parts of a large program separately, test them separately and ‘freeze’ them for future use. Allows the programmer to develop store portions of programs that have been intensively tested and used into a “program library” for anyone to re-use them. Produces modular programs and greatly enables the management of large programming projects
  • 32. Debugger/Monitor hese dre tools that alltiw the assembly prtigrammers to: Display dnd alter the contents of memory dnd registers while running their code, Perform disassembly of their machine code (show the assembly language equivalent), Permit them to run their programs, stop (or hdlt) them, run them step-by-step or inse< break points. Break points: Positions in the program that if are encountered during run time, the program will be halted so the programmer can examine the memory and registers contents and determine what went wrong.
  • 33. A User's View of Computer Systems
  • 34. What Is Assembly Language? Some example assembly language instructions: inc mov and add result class_size,45 mask1,128 marks,10 Some points to note: Assembly language instructions are cryptic M n e m o n i c s are used for operations 1nc for increment, mo v for mo ve (i.e., copy) Assembly language instructions are low level Cannot write instructions such as mov marks, value
  • 35. What Is Assembly Language? (Cont'd) more t2, t1 000A2 21 $t2,$t1,15 $t3,$t1,$t 2 312A000F 012A5821 add u MIPS examples Assembly Language Machine Language e x O O O O O O O O
  • 36. What Is Assembly Language? (Cont'd) more t2, t1 000A2 21 $t2,$t1,15 $t3,$t1,$t 2 312A000F 012A5821 add u MIPS examples Assembly Language Machine Language e x O O O O O O O O
  • 37. What Is Assembly Language? (Cont'd) more t2, t1 000A2 21 $t2,$t1,15 $t3,$t1,$t 2 312A000F 012A5821 add u MIPS examples Assembly Language Machine Language e x O O O O O O O O
  • 38. What Is Assembly Language? (Cont'd) more t2, t1 000A2 21 $t2,$t1,15 $t3,$t1,$t 2 312A000F 012A5821 add u MIPS examples Assembly Language Machine Language e x O O O O O O O O
  • 39. Why Program in Assembly Language? Two main reasons: Efficiency Space-efficiency Time-efficiency Accessibility to system hardware Space-efficiency Assembly code tends to be compact Time-efficiency Assembly language
  • 40. Typical Applications Application that need one of the three advantages of the assembly language Time-efficiency Time-con ’enience Gtitid tt have but ntit required for funetitinal correctness Graphics TirnC-Cl’1 I1C3) Necessary to satisfy functionality Real-time applications Aircraft navigational systems Process control systems Rtibot ctintrol software Missile ctintrtil software