Use the gear ^ to see the code documentation

WeMips Usage Guide

Installation Guide

  1. Copy all the files to a directory on your computer.
  2. Drag and drop the index.html file onto Google Chrome.

Features

  • Nothing here yet

Supported Operations

Mips Arithmetic Instructions

  • ADD
  • ADDI
  • ADDU
  • ADDIU Expiramental
  • SUB Expiramental
  • SUBU
  • LUI

Mips Logical Instructions

  • AND
  • ANDI
  • NOR
  • OR
  • ORI
  • SLL
  • SRL
  • BEQ
  • BNE
  • J
  • JAL
  • JR Expiramental

Mips Memory Access Instructions

  • LW Expiramental
  • SW Expiramental
  • LH Expiramental
  • LHU Expiramental
  • SH Expiramental
  • LB
  • LBU
  • SB

Mips Comparison Instructions

  • SLT Expiramental
  • SLTI Expiramental
  • SLTU Expiramental
  • SLTIU Expiramental

Mars like system calls

Description

$v0 code

Arguments

Return Value

Print Integer

1

$a0 = integer to print

Print String

4

$a0 = stack address of null-terminated string to print to console

Read Integer

5

$v0 = contains integer read

Read String

8

$a0 = address of input buffer

$a1 = maximum number of characters to read (this will be one less than the allowed string since it needs space for the null terminator)

$v0 = contains the length of the input string

Confirm Dialog

50

$a0 = address of null-terminated string that is the message to user

$a0 contains value of user-chosen option

0: OK

1: Cancel

Input Dialog Int

51

$a0 = address of null-terminated string that is the message to user

$a0 contains int read

$a1 contains status value

0: OK status

-1: input data cannot be correctly parsed

-2: Cancel was chosen

-3: OK was chosen but no data had been input into field

Input Dialog String

54

$a0 = address of null-terminated string that is the message to user

$a1 = address of input buffer

$a2 = maximum number of characters to read

$a1 contains status value

0: OK status. Buffer contains the input string.

-2: Cancel was chosen. No change to buffer.

-3: OK was chosen but no data had been input into field. No change to buffer.

-4: length of the input string exceeded the specified maximum. Buffer contains the maximum allowable input string plus a terminating null.

Alert

55

$a0 = address of null-terminated string that is the message to user

Alert Int

56

$a0 = address of null-terminated string that is an information-type message to user

$a1 = int value to display in string form after the first string

Alert String

59

$a0 = address of null-terminated string that is an information-type message to user

$a1 = address of null-terminated string to display after the first string

Generate Save String Code

60

$a0 = stack address of null-terminated string to generate code for

Binary -> Decimal

61

$a0 = stack address of binary string

Decimal -> Binary

62

$a0 = decimal number to convert

$a1 = number of chars to output

$a2 = size of each block to output