Members
MemoryBase :function
Function to call when memory contents change. (e.g. onChange(indexNumber))
Type:
- function
MemoryBase :function
Function to call when the memory gets extended. (e.g. onAdd(indexNumber))
Type:
- function
mipsCode :Array
Array of lines that can be exectued
Type:
- Array
Properties:
Name | Type | Description |
---|---|---|
code |
- Source:
mipsCode :Object
Hashtable of labels pointing to lines of code
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
labels |
- Source:
mipsCode :number
Hashtable of symbols with constant values
Type:
- number
Properties:
Name | Type | Description |
---|---|---|
symbols |
- Source:
mipsEmulator
Mips emulator constructor
- Source:
mipsEmulator
Returns a specified registers value
- Source:
mipsEmulator
Returns a specified registers unsigned value
- Source:
mipsEmulator
Returns a specified register
- Source:
mipsEmulator
Checks if a register exists and can be directly addressed.
Directly addressable registers are those registers that start with '$'.
- Source:
mipsEmulator
checks if a register is writable
- Source:
mipsEmulator
Set a register value, and call onChange function for that register
- Source:
mipsEmulator
Set an Onchange function for a register
- Source:
mipsEmulator
Set which line to fetch next.
This resets the pipeline.
- Source:
mipsEmulator
Checks if a string is a valid mips line
- Source:
mipsEmulator
Resets mips labes, code, and stack
- Source:
mipsEmulator
Set the debug option for the mips_emulator
- Source:
mipsEmulator
Set code to be emulated
- Source:
mipsEmulator
Run an individual line
- Source:
mipsEmulator
Run an array of lines
- Source:
mipsEmulator
runs the current set of code in the mips emulator non-stop;
- Source:
mipsEmulator
execute the line PC is pointing to.
- Source:
mipsEmulator
Returns the current line number (the next to be run)
- Source:
mipsEmulator
Returns the next line number to be fetched
- Source:
mipsEmulator
Jump to a specified label
- Source:
mipsEmulator
Jump to a specified line number
- Source:
onChange :function
Function that is called when this register is changed.
Type:
- function
- Source:
regName :String
This registers name
Type:
- String
- Source:
val
registers value
Properties:
Type | Description |
---|---|
number |
- Source:
writable :Boolean
Wether or not this register is writable (false if this register is read only)
Type:
- Boolean
- Source:
Methods
deepEqual()
- Source:
equal()
Assert that the first two arguments are equal, with an optional message.
Prints out both actual and expected values.
- Source:
Example
equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
notDeepEqual()
- Source:
notEqual()
- Source:
notPropEqual()
- Source:
notStrictEqual()
- Source:
ok()
Asserts rough true-ish result.
- Source:
Example
ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
propEqual()
- Source:
reset() → {null}
Clear the data contained in the memory object
Returns:
- Type
- null
strictEqual()
- Source: