Permalink
Browse files

Added silent failing for assaigning literals.

  • Loading branch information...
RuneTekk committed Apr 6, 2012
1 parent 2a1ad86 commit 392cf51f1225a5eb4f562f97e060e9289c6c4525
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/org/sini/Cpu.java
View
@@ -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);

0 comments on commit 392cf51

Please sign in to comment.