Skip to content

Commit

Permalink
Merge branch 'issue/382' into develop (fixes #382)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed Oct 11, 2016
2 parents b7a08d9 + e53bd12 commit d6382f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion interactives/mips-assembler/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ function trim_self(&$string) { $string = trim($string); }
<div class="col s12 l6">

<h4>MIPS Input</h4>
<p>Please enter MIPS code below to see the assembler output. A subset of MIPS is implemented. Comments start with #.</p>
<p>Please enter MIPS code below to see the assembler output. <strong>Note:</strong> Only a subset of MIPS is implemented, and negative values will be read as zero. Comments start with #.</p>

<?php print '<form action="'.$_ENV['SCRIPT_URL'].'" method="post">'; ?>
<textarea name="input" id="mips_input" class="code"><?php
Expand Down
5 changes: 5 additions & 0 deletions interactives/mips-simulator/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,11 @@ function smartbindec($bin) {
hexdec($reg->read($instr->rtdec)) * pow(2,$instr->shamtdec)
);
break;
case 0x22: //subtract
$reg->write($instr->rddec,
smarthexdec($reg->read($instr->rsdec)) - smarthexdec($reg->read($instr->rtdec))
);
break;
case 0x2: // srl

break;
Expand Down

0 comments on commit d6382f9

Please sign in to comment.