Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added silent failing for assaigning literals.

  • Loading branch information...
commit 392cf51f1225a5eb4f562f97e060e9289c6c4525 1 parent 2a1ad86
@RuneTekk authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/org/sini/Cpu.java
View
4 src/org/sini/Cpu.java
@@ -92,7 +92,7 @@ public void execute() {
b = temp;
}
if(!(a instanceof Cell))
- throw new RuntimeException("Invalid instruction");
+ continue;
Cell aValue = (Cell) a;
int bValue = b instanceof Cell ? ((Cell) b).v : (Integer) b;
switch(op & 0xF) {
@@ -356,7 +356,7 @@ public void mount(int[] memory) {
* @param args The command line arguments.
*/
public static void main(String[] args) {
- int[] instructions = new int[] { 0x8401 };
+ int[] instructions = new int[] { 0x6da1, 0x65e1 , 0x1001 };
Cpu cpu = new Cpu();
cpu.execute(instructions);
Please sign in to comment.
Something went wrong with that request. Please try again.