wm: 5552

Download patch

ref: 34b0870d5fce23038d4435b181cd3a6ba2b4d174
parent: 8a9c05b991899089f57ef6480d981b45e7489d57
author: mkf <mkf@d510>
date: Wed May 10 13:26:57 EDT 2023

fix some bugs, (thanks mh!)

--- a/5551e.c
+++ b/5551e.c
@@ -57,6 +57,7 @@
 				break;
 			case NOR:
 				r.regs[c] = !(a | b);
+				break;
 			case XOR:
 				r.regs[c] = a ^ b;
 				break;
@@ -67,10 +68,10 @@
 				r.regs[c] = add_bit(a, b, &r.flags[CARRY]);
 				break;
 			case SHR:
-				r.regs[c] = r.regs[a] >> b;
+				r.regs[c] = a >> b;
 				break;
 			case SHL:
-				r.regs[c] = r.regs[a] << b;
+				r.regs[c] = a << b;
 				break;
 			case PUT:
 				memory[b] = a;