ADC
authorAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 23 Jun 2016 01:03:16 +0000 (18:03 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Thu, 23 Jun 2016 01:03:16 +0000 (18:03 -0700)
src/CPU/instructions/ADC [new file with mode: 0644]

diff --git a/src/CPU/instructions/ADC b/src/CPU/instructions/ADC
new file mode 100644 (file)
index 0000000..2e8410d
--- /dev/null
@@ -0,0 +1,7 @@
+R
+set tmp to (join "0x" (A)) + (join "0x" (M)) + flagC
+set A to item (tmp mod 256) of hex
+set flagZ to <A = 0>
+set flagC to <tmp > 255>
+set flagN to <join "0x" (letter 1 of A) > 7 >
+set flagV to <tmp > 127 or tmp < -128>
This page took 0.024617 seconds and 4 git commands to generate.