The MIPS Processor Computer Organization The MIPS Processor Appendix A.

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

MIPS ISA-II: Procedure Calls & Program Assembly. (2) Module Outline Review ISA and understand instruction encodings Arithmetic and Logical Instructions.
MIPS ISA-II: Procedure Calls & Program Assembly. (2) Module Outline Review ISA and understand instruction encodings Arithmetic and Logical Instructions.
MIPS Assembly Language CPSC 321 Computer Architecture Andreas Klappenecker.
Syscall in MIPS Xinhui Hu Yuan Wang.
Wannabe Lecturer Alexandre Joly inst.eecs.berkeley.edu/~cs61c-te
CS 31003: Compilers ANIRUDDHA GUPTA 11CS10004 G2 CLASS DATE : 24/07/2013.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
Assembly Process. Machine Code Generation Assembling a program entails translating the assembly language into binary machine code This requires more than.
Chapter 6 In introduction to System Software and Virtual Machine ***Assembly Language.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
MIPS Assembler Programming
CS 61C L14Introduction to MIPS: Instruction Representation II (1) Garcia, Spring 2004 © UCB Roy Wang inst.eecs.berkeley.edu/~cs61c-tf inst.eecs.berkeley.edu/~cs61c.
The Assembly Language Level
Topic 1: Introduction to Computers and Programming
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Natawut NupairojAssembly Language1 Introduction to Assembly Programming.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Hello World 2 What does all that mean?.
MIPS coding. SPIM Some links can be found such as:
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
1 CS/COE0447 Computer Organization & Assembly Language Chapter 2 Part 4.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /29/2013 Lecture 13: Compile-Link-Load Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Lecture 10: MIPS Simulator Today’s topic –SPIM Simulator Readings –Appendix B 1.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
Computer organization Practical 1. Administrative Issues The course requirements are: –To be nice and open minded –To pass the exam (there is a boolean.
1 Chapter 1 Programming Languages Evolution of Programming Languages To run a Java program: Java instructions need to be translated into an intermediate.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
1 Overview of Programming Principles of Computers.
3-Apr-2006cse spim © 2006 DW Johnson and University of Washington1 SPIM simulator CSE 410, Spring 2006 Computer Systems
The Assembly Process Computer Organization and Assembly Language: Module 10.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1 An Overview of Computers and Programming Languages.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Loaders and Linkers T 李俊葦. 1. Loader Accepts the object programs , prepares these programs for execution by the computer , and indicates the execution.
Lecture 3 Translation.
Chapter 1 Introduction 2nd Semester H
Assembler, Compiler, MIPS simulator
Computer Architecture & Operations I
Chapter 5- Assembling , Linking, and Executing Programs
Computer Architecture & Operations I
The compilation process
MIPS Coding Continued.
MIPS coding.
and Executing Programs
Week 5 Computers are like Old Testament gods; lots of rules and no mercy. Joseph Campbell.
Computers: Hardware and Software
Assembler Directives Example program: .data # DATA segment city: .asciiz “Seattle” .align 2 num: .word 2210, 2341, 26, 0x022ec,
Lecture 7: Examples, MARS, Arithmetic
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
What time is it?. What time is it? Major Concepts: a data structure model: basic representation of data, such as integers, logic values, and characters.
Computer Architecture
MIPS Functions.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Introduction to Computer Programming
MIPS Coding Continued.
MIPS coding.
10/6: Lecture Topics C Brainteaser More on Procedure Call
Prerequisite Glossary
Program Assembly.
System Programming By Prof.Naveed Zishan.
Week 5 Computers are like Old Testament gods; lots of rules and no mercy. Joseph Campbell.
MIPS Functions.
Algoritmos y Programacion
Presentation transcript:

The MIPS Processor Computer Organization The MIPS Processor Appendix A

The MIPS Processor Computer Organization Assembly Language Symbolic representation of a computer's machine language. more readable than machine language each processor has its own assembly language no two assembly languages are the same.

The MIPS Processor Computer Organization Why Use Assembly Language Primary reason: for speed or size of a critical application compiler may not produce the best instructions have better control over which instructions are used Example: embedded systems or devices

The MIPS Processor Computer Organization Drawbacks of Assembly Language Are not widely used by everyday programmers programs are machine dependent programs are longer than those in a high-level language programs have no structure; hard to read

The MIPS Processor Computer Organization The Assembler Translates assembly language instructions into machine language instructions

The MIPS Processor Computer Organization Translation Symbols can be used before they are defined. A two step translation is required: resolve labels (find memory locations) translate assembly instructions

The MIPS Processor Computer Organization Sample Program # # Prints all primes in the numbers #.text main: li $t0, 1 WHILE: bgt $t0, 100, WHILE_END move $a0, $t0 jal TEST_PRIME beqz $v0, INC1 la $a0, Message move $a1, $t0, jal PRINTF INC1: addi $t0, $t0, 1 j WHILE WHILE_END: li $v0, 10 syscall ###################################.data Message:.asciiz "This number is prime: " NEWLINE:.asciiz "\n"

The MIPS Processor Computer Organization Object File object code - machine instructions, data, and bookkeeping info. can not be executed directly it may refer to routines in other object files Six distinct sections on Unix systems:

The MIPS Processor Computer Organization The Linker linker - combines a collection of object files into an executable file. programs can be split into smaller pieces (files) each file contains logically related routines and data

The MIPS Processor Computer Organization The Loader loader - used to load a program into memory sets the registers initializes the program counter For the MIPS processor: