3-Apr-2006cse410-05-spim © 2006 DW Johnson and University of Washington1 SPIM simulator CSE 410, Spring 2006 Computer Systems

Slides:



Advertisements
Similar presentations
SPIM Tutorial CSE 410 Computer Systems. Introduction SPIM: MIPS simulator –Reads/executes assembly source programs Does not execute binaries Download.
Advertisements

MIPS Assembly Language CPSC 321 Computer Architecture Andreas Klappenecker.
5Z032 Processor Design SPIM, a MIPS simulator Henk Corporaal
SPIM and MIPS programming
Syscall in MIPS Xinhui Hu Yuan Wang.
MIPS Assembly Language Programming
1 Computer Architecture MIPS Simulator and Assembly language.
Assembly Language Working with the CPU.
ECE 0142 Recitation #5.
JAVA Programming Environment © Juhani Välimäki 2003.
Computer Architecture I (1DT016) Cary Laxer, Ph.D. Visiting Lecturer.
MIPS Assembly Language I Computer Architecture CPSC 321 Andreas Klappenecker.
SPIM : A MIPS Simulator Archi & Net Lab 이용석
Appendix A: MIPS Assembly Language. Instruction Format R-type I-type J-type.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Lab #1 PCSpim SPIM is a software simulator that loads and executes assembly language programs for the MIPS RISC computers. Download and install PCSpim.
On Textbook CD: SPIM Jen-Chang Liu, Simulation of a virtual machine Virtual machine (simulator) Differences between SPIM and real MIPS? No delayed.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
Computer Organization - Syscalls David Monismith Jan. 28, 2015 Based on notes from Patterson and Hennessy Text and from Dr. Bill Siever.
1 MIPS Assembly Language Programming CDA 3101 Discussion Section 03.
PCSpim How to Program ?. Some Resource There are some useful online document! You can find the links on our TAs’ website. tw/~xdd/Arc06/
First Programming Assignment For MIPS R3000 Processor Department of Computer Science Southern Illinois University Edwardsville Fall, 2015 Dr. Hiroshi Fujinoki.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
2011 Computer Architecture Project #1 MIPS Programming: Merge Sort Ki Sup Hong Room 236, Engineering Building.
CWRU EECS 322 March 8, 2000 The SPIM simulator EECS 322: Computer Architecture.
MIPS coding. slt, slti slt $t3, $t1, $t2 – set $t3 to be 1 if $t1 < $t2 ; else clear $t3 to be 0. – “Set Less Than.” slti $t3, $t1, 100 – set $t3 to be.
OCC - CS/CIS CS116-Ch00-Orientation Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 1CS 116 Fall 2003 Not quite finished Creating.
Procedure Basics Computer Organization I 1 October 2009 © McQuain, Feng & Ribbens Procedure Support From previous study of high-level languages,
June 2005Computer Architecture, Instruction-Set ArchitectureSlide 1 Part II Instruction-Set Architecture.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patternson and Hennessy Text.
Lecture # 1 SPIM & MIPS Programming. SPIM SPIM is a MIPS32 simulator that reads and executes assembly language program written for SPIM. Platform -Unix,
Copyright 2006 by Timothy J. McGuire, Ph.D. 1 MIPS Assembly Language CS 333 Sam Houston State University Dr. Tim McGuire.
Strings in MIPS. Chapter 2 — Instructions: Language of the Computer — 2 Character Data Byte-encoded character sets – ASCII: 128 characters 95 graphic,
Lecture 10: MIPS Simulator Today’s topic –SPIM Simulator Readings –Appendix B 1.
More on MIPS programs n SPIM does not support everything supported by a general MIPS assembler. For example, –.end doesn’t work Use j $ra –.macro doesn’t.
Lecture 161 Lets examine a SPIM program in detail. io.asm This program is a simple routine which demonstrates input/output using assembly code. SPIM.
MIPS coding. slt, slti slt $t3, $t1, $t2 – set $t3 to be 1 if $t1 < $t2 ; else clear $t3 to be 0. – “Set Less Than.” slti $t3, $t1, 100 – set $t3 to be.
The MIPS Processor Computer Organization The MIPS Processor Appendix A.
Intro to SPIM Justin Fiore Nathan Parish. Installing SPIM on Windows Download pcspim.zip from the SPIM website:
Programming Assignment 4 Code generator Md. Zahurul Islam Center for Research on Bangla Language Processing (CRBLP) BRAC University.
Md. Zahurul Islam Center for Research on Bangla Language Processing (CRBLP) BRAC University.
Copyright 2006 by Timothy J. McGuire, Ph.D. 1 MIPS Assembly Language CS 333 Sam Houston State University Dr. Tim McGuire.
MIPS simulators There are 3 widely used MIPS simulators PC-SPIM, MARS, QTSPIM. PC-SPIM (the one we should use) the oldest one with poor graphics Very simple.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
CS 312 Computer Architecture & Organization
Lab (6) Introduction to Assembly Language 1. Introduction Objectives : Learn EMU8086 installation EMU8086 environment Learn how to: Assemble instructions.
System Calls & Arithmetic
MIPS Assembly Language Programming
MIPS Assembly Language Programming
MIPS simulators There are 3 widely used MIPS simulators PC-SPIM, MARS, QTSPIM. PC-SPIM (the one we should use) the oldest one with poor graphics Very simple.
Computer Science 210 Computer Organization
Chapter 5- Assembling , Linking, and Executing Programs
Introduction to Lab #1 José Nelson Amaral.
CS 286 Computer Organization and Architecture
MIPS Procedures.
MIPS coding.
and Executing Programs
Week 5 Computers are like Old Testament gods; lots of rules and no mercy. Joseph Campbell.
MIPS Functions.
MIPS coding.
MIPS Procedures.
MIPS Functions.
COMS 361 Computer Organization
CS 286 Computer Organization and Architecture
Review.
MIPS coding.
CS 286 Computer Architecture & Organization
Week 5 Computers are like Old Testament gods; lots of rules and no mercy. Joseph Campbell.
MIPS Functions.
Introduction to SPIM Simulator
Presentation transcript:

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington1 SPIM simulator CSE 410, Spring 2006 Computer Systems

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington2 Reading and References See the Resources section on the SPIM web page for documentation on SPIM » In particular, Appendix A and Getting Started with PCSpim are useful reading from that site

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington3 SPIM simulator SPIM lets you write MIPS assembly language code and run it on a PC PCSpim is installed on the machines in the Math Sciences Computing Center You can download versions for Windows and all varieties of *nix (including MacOS X) from the web site »

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington4 Spim display Register panel »register names and numbers Text segment panel »note jump and link to “main” at [0x ] »your code defines the label “main” Data and Stack segment panel Message panel

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington5

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington6 Context editor You can use any text editor you like to write the source code »see links on class software page Context editor provided in MSCC »it has a highlighter for MIPS assembly language »it doesn’t try to be a word processor jEdit editor is another good programming editor, also provides a MIPS highlighter

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington7

3-Apr-2006cse spim © 2006 DW Johnson and University of Washington8 hello.s.data str:.asciiz "Hello World\n".text main: li $v0,4 # print_string code la $a0,str # addr(str) syscall # print it jr $ra # return