Giter VIP home page Giter VIP logo

spimbot's Introduction

Karel J. Spimbot

The distance between insanity and genius is measured only by success. -Bruce Feirstein

Strategy

See writeup.txt for stategy details.

Code Style

Indentation

In order to align the main components of MIPS code, we will start the componets at a specific column of the file.

Use spaces for tabs.

Compents Column Example
Labels / Segments 0 .globl total_mass
Instructions 3 move
Registers / Jump Targets 10 $sp, $sp, 16
Comments 40 # Save $s2

Registers

Whenever possible, use the callee-saved $s0-$s7 registers at the beginning of the function.

Comments

Try to comment as much as possible so everyone knows what the code is doing. Comments can be the C equivalent of the instruction or several subsequent instructions, or just a general description of what the assembly is doing.

Example

.globl total_mass
total_mass:
  sub    $sp, $sp, 16                  # Allocate stack memory
  sw     $s0, 0($sp)                   # Save $s0
  sw     $s1, 4($sp)                   # Save $s1
  sw     $s2, 8($sp)                   # Save $s2
  sw     $ra, 12($sp)                  # Save $ra
  li     $s0, 0                        # int mass = 0
  li     $s1, 0                        # int i = 0

spimbot's People

Contributors

atul-nambudiri avatar mass avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.