Lecture - 1 - References Computer Science 230H Assembler...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science 230H Assembler Language (Using MIPS) Prepared by Michael Jack - Fall 2007 SPIM 2 References The information and figures for the following slides were prepared from the following source: – Patterson, D., and Hennessy J., Computer Organization and Design, 3rd edition, 2005 SPIM 3 Introduction Encoding instructions as binary numbers is natural and efficient for computers, but not for humans. Humans read and write symbols (words) much better than long sequences of digits. The good thing for humans is that computer instructions can be represented in many ways. Humans can write and read symbols, and computers can execute the equivalent binary numbers. This set of slides describes: – The process by which a human-readable program is translated into a form that a computer can execute. – Provides a few hints about writing assembly programs. – Explains how to run these programs on SPIM - a simulator that executes MIPS programs. SPIM 4 Assembly Language Assembly language is the symbolic representation of a computer’s binary encoding - machine language – Binary representation used for communication within a computer. Assembly language is more readable than machine language because it uses symbols instead of bits. The symbols name commonly occurring bit patterns, such as op-codes and register specifiers, so people can read and remember them. In addition, assembly language permits programmers to use labels to identify and name particular memory words that hold instructions or data. A tool called an assembler translates assembly language into binary instructions. Assembler provides a friendlier representation than a computer’s 0s and 1s that simplifies writing and reading programs.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
SPIM 5 Assembly Language An assembler reads a single assembly language source file and produces an object file containing machine instructions and bookkeeping information that helps combine several object files into a program. Most programs consist of several files - also called modules - that are written, compiled, and assembled independently. A program may also use pre-written routines supplied in a program library. A module typically contains references to subroutines and data defined in other modules and in libraries. The code in a module cannot be executed when it contains unresolved references to labels in other object files or libraries. A linker, combines a collection of object and library files into an executable file , which a computer can run. SPIM 6 Assembly Language Source file Source file Source file Assembler Assembler Assembler Object file Object file Object file Linker Executable file Program Library Assembler is a program that translates a symbolic version of an instruction into the binary version. Linker
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/14/2010 for the course COMPUTER S COIS-3030 taught by Professor Hircock during the Spring '10 term at Trent University.

Page1 / 8

Lecture - 1 - References Computer Science 230H Assembler...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online