Transfer instructions
authorAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 23 Jun 2016 05:10:49 +0000 (22:10 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 23 Jun 2016 05:10:49 +0000 (22:10 -0700)
src/CPU/build-transfer.js [new file with mode: 0644]

diff --git a/src/CPU/build-transfer.js b/src/CPU/build-transfer.js
new file mode 100644 (file)
index 0000000..d348b94
--- /dev/null
@@ -0,0 +1,15 @@
+/* builds TAX-family instructions */
+
+var fs = require("fs");
+
+var list = ["AX", "AY", "SX", "XA", "XS", "YA"];
+list.forEach(emit);
+
+function emit(name) {
+    var emission = [
+        "IMPLIED",
+        "set " + name[0] + " to " + name[1]
+    ];
+
+    fs.writeFileSync("instructions/T" + name, emission.join("\n"));
+}
This page took 0.022812 seconds and 4 git commands to generate.