a0 - CS 251 Spring 2014 Assignment#0 Weight 1 bonus mark(Optional CS 251 Winter 2013 Assignment#0 CS 251 Fall 2012 Assignment 0 Due Wed May 14th by

a0 - CS 251 Spring 2014 Assignment#0 Weight 1 bonus...

This preview shows page 1 - 2 out of 7 pages.

Print these pages and write your solutions in the space provided. Staple your solutionsto the assignment cover sheet from the course webpage (with the cover sheet first) anddeposit your assignment in the drop-box outside MC4066.You will receive a 0 on theassignment if you do not include the cover page.Note that you only need to submitthe two pages with questions on them; i.e., there is no need to submit the first four pages ofthis document.This assignment isoptional. However, it is worth one bonus mark in your course grade.The purpose of CS 251 is NOT to teach MIPS assembler. Instead, we will be demonstratinghow a computer can execute MIPS assembler. Thus, some knowledge of the MIPS assemblylanguage is helpful.This document is meant as a brief introduction to the MIPS assembly language for thosestudents who haven’t taken CS 241 and haven’t had exposure to MIPS assembly elsewhere.It also serves as a review for those who have worked with MIPS before. Some parts of howthe MIPS instructions execute have been simplified (such as how the address is computedfor the jump instruction), so this document should not be considered a definitive sourcefor MIPS. Chapter 2 of the course text describes MIPS in more detail, and shows how toconvert C-code into MIPS assembly; you should probably read Chapter 2. Appendix B.10of the course text gives a detailed description of the entire MIPS R2000 assembly language;however, you will not need to know the MIPS language in the amount of detail given inAppendix B for CS 251, and the MIPS described in this document is sufficient to completethis assignment.1BasicsIn MIPS, there are 32 registers in which you can read and store data. These registers aretypically referred to as $0, $1, ..., $31, although names like $s0 to $s7 and $t0 to $t7 aresometimes used to refer to the registers. These names map to specific registers, but there isno need to learn these mappings; as long as you only use names like $s2 or only use nameslike $4, you will be fine (i.e., don’t use both $1 and $s1 in the same program!).In thisdocument, we will only use names like $1.Note that register $0 always contains the value 0.If you write a different value toregister $0, that write is ignored and register $0 continues to contain the value 0.1CS 251 - Spring 2014 - Assignment #0 Weight: 1% bonus mark (Optional) Due: Wed May 14th by Noon (12:00pm)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture