Computer Architecture Hennessy

Submitted by: Submitted by

Views: 221

Words: 2210

Pages: 9

Category: Science and Technology

Date Submitted: 02/26/2013 02:54 PM

Report This Essay

CSC 314 – Assembly Language notes

Introduction

What is assembly language?

* Machine specific programming language

* Not portable

* One to one correspondence between statements and native machine code

* Matches the instruction set of the architecture

AVR Assembly Language

* Refers to the Atnel AVR processor family

What is an assembler?

* Similar to a compiler

* System level program

* Translate assembly listings to machine code for the processor

* Generate two files

* object file

* machine instructions

* initial data

* loading information

* listing file

* record of the translation

* line numbers

* addresses

* generated code and data

* symbol table

You will use a cross-assembler

* Translates code from one computer system to another architecture

* AVR assembler is a cross-assembler

Why learn assembly language?

* less memory (if written well)

* faster ( ^ )

* learn how the processor works

* understand architecture

* understand internal representation of data

* for the CSCs: gain some insight into hardware

* might be necessary to activate certain parts of the chip

Machine language

* A language of numbers that represents the processor’s instruction set

* Instruction set

* The set of basic operations a processor can do

* Each instruction is encoded as a sequence of numbers

* one or more bytes

* Every number can potentially be an instruction

Assembly vs. machine code

* machine language

* written as a list of numbers

* assembly language

* using “pneumonics” to represent the numbers

Computers

Nearly all systems since the 50s use a fetch-execute cycle.

Fetch next instruction

Fetch next instruction

Update PC

Update PC

Execute instruction

Execute instruction

Decode instruction

Decode instruction...