RW
authorAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 23 Jun 2016 17:26:09 +0000 (10:26 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 23 Jun 2016 17:26:09 +0000 (10:26 -0700)
src/CPU/build-cpu.js

index 06c13a4..566a9ae 100644 (file)
@@ -62,9 +62,17 @@ var sources = table.map(function(x, i) {
                 console.error("Unknown flag " + flag + " for instruction " + x.name);
         });
 
+        var ins = insruction_cache[x.name];
+
         if(mode == "R") {
             instruction.push("mapper read address");
             instruction.push("set OP to M");
+        } else if(mode == "RW") {
+            instruction.push("mapper read address");
+            instruction.push("set OP to M");
+            ins = ins.map(function(q) {
+                return q.replace(/set OP to/, "mapper write address");
+            });
         } else if(mode == "IMPLIED") {
 
         } else {
This page took 0.022144 seconds and 4 git commands to generate.