Skip to content
Snippets Groups Projects
Commit b11c71b5 authored by MINZHE-XU's avatar MINZHE-XU
Browse files

finish

parent 86eb8bfc
No related branches found
No related tags found
No related merge requests found
Showing
with 3 additions and 3 deletions
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -275,7 +275,7 @@ public class Machine
}
int ra = parseReg(toks[1]);
int offs = parseOffset(toks[2]);
if (regs[ra] == 0){
if (regs[ra] <= 0){
pc = pc + offs;
}else{
pc = pc + 1;
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -81,7 +81,7 @@ public class Machine
}
private void do_load(int dest, int src, int offs) {
if (regs[src] + offs > MAX_ADDR){
if (regs[src] + offs >= MAX_ADDR){
/* no op */
}else if(regs[src] + offs < 0){
/* no op */
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -86,7 +86,7 @@ public class Machine
}else if(regs[src] + offs < 0){
/* no op */
}else{
regs[dest] = memory[regs[src] + offs];
regs[dest] = memory[regs[src] = offs];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment