Docsity

Assembly Language, Linker and Debugger - Computer Architecture - Lecture Slides, Slides of Computer Architecture and Organization

Partial preview of the text

Download Assembly Language, Linker and Debugger - Computer Architecture - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

1

The user’s view

 A user is a person employing the computer to do useful work  Examples of useful work include

  • spreadsheets
  • word processing
  • developing programs in higher level languages  The internal structure of the computer is totally hidden from the user  Important characteristics for the user are
  • execution speed
  • storage capacity
  • peripheral device functionality

2

Assembly Language

 Assembly language commands are a symbolic representation of machine language commands using “English like” keywords called “mnemonics”  Using assembly language commands its much easier to program as compared to machine language in the form of long strings of 1s and 0s  Commands in assembly language have a one-to-one correspondence with machine language commands

4

Useful tools for

Assembly Language Programmers

• The assembler

• The linker

• The debugger or monitor

• The development system

5

The Assembler

 Assembler is a program written for converting the assembly language program into its equivalent machine language program, and the process of conversion is called the assembly process  The assembly process can also be done without using a computer, but it is very tedious and error-prone  An “assembler” that runs on one processor and translates an assembly language program into the machine language of another processor is called a “cross assembler” Docsity.com

7

The Debugger

  • Working in assembly language is tedious and error-prone
  • “Run-time” errors often crash the system instead of smoothly returning the user to the operating system
  • A “debugger”, also called a “monitor”, is a computer program used to help in finding the logical errors in the program

8

The Debugger (continued…)

  • Useful functions which are

available with most of the debuggers include:

  • Display and alter the contents of memory, CPU registers and flags
  • Disassembly of machine code
  • Single-stepping and breakpoints

10

Differences between

HLLs and Assembly Language

(continued…)

  • In HLLs type checking is provided  Verifies proper use of variables at compile time  Allows compiler to determine memory requirements  Helps detect bad programming practices

11

Difference between

HLLs and Assembly Language

(continued…)

  • Most machines have no type checking  The machine sees only strings of bits  Instructions interpret the strings as a type: usually limited to signed or unsigned integers and FP numbers  A given 32-bit word might be an instruction, an integer, a FP number, or 4 ASCII characters

13

General operation of a

stored program computer

(continued)

This entire process of reading

memory, incrementing the PC,

and decoding the instruction is

known as the Fetch And

Execute principle of the stored

program computer.

14

Concept of the ISA

  • ISA stands for Instruction Set Architecture and it could be viewed as a model for the computer
  • It includes the instruction set, memory space and all the programmer-accessible registers
  • It serves as the interface between the program and the functional units of the computer Docsity.com

16

The computer architect’s view

(continued…)

  • uses performance measurement tools, such as benchmark programs, to see that goals are met or not
  • balances performance of building blocks such as CPU, memory, I/O devices, and interconnections
  • meets performance goals at lowest cost

17

Useful tools for

the computer architect

  • Software models, simulators and emulators
  • Performance benchmark programs
  • Specialized measurement programs
  • Data flow and bottleneck analysis
  • Subsystem balance analysis
  • Parts, manufacturing, and testing cost analysis

19

Useful tools for

the logic designer

  • CAD tools  Logic design and simulation packages  Printed circuit layout tools  IC (integrated circuit) design and layout tools
  • Logic analyzers and oscilloscopes
  • Hardware development systems

20

Concept of the

Implementation Domain

  • The implementation domain is the

collection of hardware devices with which the logic designer works