diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2018-03-23 17:22:45 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2018-03-23 17:22:45 -0400 |
commit | 28f4cf4fc2e1194e3a67cca73fca5c688b9aa99c (patch) | |
tree | 554171a3c4e1c07787c9392bc78ff838a095b593 /examples | |
parent | 5e54af301b2b99e8479da3195ef30d0f8ec19227 (diff) |
Cleaned up some code; fixed relative paths
Diffstat (limited to 'examples')
-rw-r--r-- | examples/add8.qua | 86 | ||||
-rw-r--r-- | examples/add8test.qua | 2 | ||||
-rw-r--r-- | examples/and.qua | 2 | ||||
-rw-r--r-- | examples/andtest.qua | 8 | ||||
-rw-r--r-- | examples/full.qua | 6 | ||||
-rw-r--r-- | examples/fulltest.qua | 16 | ||||
-rw-r--r-- | examples/half.qua | 4 | ||||
-rw-r--r-- | examples/halftest.qua | 8 | ||||
-rw-r--r-- | examples/nottest.qua | 2 | ||||
-rw-r--r-- | examples/or.qua | 4 | ||||
-rw-r--r-- | examples/ortest.qua | 8 | ||||
-rw-r--r-- | examples/xor.qua | 4 | ||||
-rw-r--r-- | examples/xortest.qua | 8 |
13 files changed, 79 insertions, 79 deletions
diff --git a/examples/add8.qua b/examples/add8.qua index f52008b..dfbf80a 100644 --- a/examples/add8.qua +++ b/examples/add8.qua @@ -72,14 +72,14 @@ x y speedX speedY color 35 4 0 0 CY -35 17 0 0 !examples/half.qua # Outputs to 33/34, 43 +35 17 0 0 !half.qua # Outputs to 33/34, 43 # Redirect last digit of answer 34 44 0 0 GA 40 44 0 0 GA 40 -3 0 0 PU 39 -3 0 0 RE ## Delay rest of bits while first pair is adding -0 0 0 0 !examples/add8rect1.qua +0 0 0 0 !add8rect1.qua ## Second pair # Redirect carry in 33 45 0 0 GA @@ -124,14 +124,14 @@ x y speedX speedY color 62 1 0 0 PU 62 0 0 0 RE # Add -60 10 0 0 !examples/full.qua # Outputs to 63/64, 87 +60 10 0 0 !full.qua # Outputs to 63/64, 87 # Redirect sum 64 90 0 0 GA 77 90 0 0 GA 77 -4 0 0 PU 76 -4 0 0 RE ## Delay other bits while second pair is adding -0 8 0 0 !examples/add8rect2.qua +0 8 0 0 !add8rect2.qua ## Third pair # Redirect carry in 63 91 0 0 GA @@ -173,7 +173,7 @@ x y speedX speedY color 96 3 0 0 CY 95 8 0 0 CY # Add -95 10 0 0 !examples/full.qua # Outputs to 98/99, 87 +95 10 0 0 !full.qua # Outputs to 98/99, 87 # Redirect sum 99 90 0 0 GA 112 90 0 0 GA @@ -188,7 +188,7 @@ x y speedX speedY color 132 1 0 0 PU 132 0 0 0 RE # Delay while last bits are adding -0 24 0 0 !examples/add8rect3.qua +0 24 0 0 !add8rect3.qua # Redirect bits -3 94 0 0 GA -12 95 0 0 GA @@ -224,7 +224,7 @@ x y speedX speedY color 116 83 0 0 CY 116 82 0 0 CY # Add -130 10 0 0 !examples/full.qua # Outputs to 133/134, 87 +130 10 0 0 !full.qua # Outputs to 133/134, 87 # Redirect sum 134 90 0 0 GA 147 90 0 0 GA @@ -239,7 +239,7 @@ x y speedX speedY color 167 1 0 0 PU 167 0 0 0 RE # Delay while last bits are adding -0 44 0 0 !examples/add8rect4.qua +0 44 0 0 !add8rect4.qua # Redirect bits -4 96 0 0 GA -13 97 0 0 GA @@ -277,7 +277,7 @@ x y speedX speedY color 151 82 0 0 CY 151 81 0 0 CY # Add -165 10 0 0 !examples/full.qua # Outputs to 168/169, 87 +165 10 0 0 !full.qua # Outputs to 168/169, 87 # Redirect sum 169 90 0 0 GA 182 90 0 0 GA @@ -294,7 +294,7 @@ x y speedX speedY color 202 1 0 0 PU 202 0 0 0 RE # Delay while last bits are adding -0 66 0 0 !examples/add8rect5.qua +0 66 0 0 !add8rect5.qua # Redirect bits -5 98 0 0 GA -14 99 0 0 GA @@ -334,7 +334,7 @@ x y speedX speedY color 186 81 0 0 CY 186 80 0 0 CY # Add -200 10 0 0 !examples/full.qua # Outputs to 203/204, 87 +200 10 0 0 !full.qua # Outputs to 203/204, 87 # Redirect sum 204 90 0 0 GA 217 90 0 0 GA @@ -351,7 +351,7 @@ x y speedX speedY color 237 1 0 0 PU 237 0 0 0 RE # Delay while last bits are adding --5 100 0 0 !examples/add8rect6.qua +-5 100 0 0 !add8rect6.qua # Redirect bits -6 100 0 0 GA -15 101 0 0 GA @@ -393,7 +393,7 @@ x y speedX speedY color 221 80 0 0 CY 221 79 0 0 CY # Add -235 10 0 0 !examples/full.qua # Outputs to 238/239, 87 +235 10 0 0 !full.qua # Outputs to 238/239, 87 # Redirect sum 239 90 0 0 GA 252 90 0 0 GA @@ -409,7 +409,7 @@ x y speedX speedY color 272 1 0 0 PU 272 0 0 0 RE # Delay while last bits are adding -15 100 0 0 !examples/add8rect7.qua +15 100 0 0 !add8rect7.qua # Redirect bits -7 102 0 0 GA -16 103 0 0 GA @@ -453,7 +453,7 @@ x y speedX speedY color 256 79 0 0 CY 256 78 0 0 CY # Add -270 10 0 0 !examples/full.qua # Outputs to 273/274, 87 +270 10 0 0 !full.qua # Outputs to 273/274, 87 # Redirect sum & carry 274 90 0 0 GA @@ -472,13 +472,13 @@ x y speedX speedY color 287 -11 0 0 RE ## Delay outputs -253 -9 0 0 !examples/20row.qua -253 -8 0 0 !examples/20row.qua -253 -7 0 0 !examples/20row.qua -253 -6 0 0 !examples/20row.qua -253 -5 0 0 !examples/20row.qua -253 -4 0 0 !examples/20row.qua -253 -3 0 0 !examples/20row.qua +253 -9 0 0 !20row.qua +253 -8 0 0 !20row.qua +253 -7 0 0 !20row.qua +253 -6 0 0 !20row.qua +253 -5 0 0 !20row.qua +253 -4 0 0 !20row.qua +253 -3 0 0 !20row.qua 273 -3 0 0 OR 274 -3 0 0 OR 273 -4 0 0 OR @@ -562,32 +562,32 @@ x y speedX speedY color 290 -3 0 0 OR 291 -3 0 0 OR -218 -8 0 0 !examples/20row.qua -218 -7 0 0 !examples/20row.qua -218 -6 0 0 !examples/20row.qua -218 -5 0 0 !examples/20row.qua -218 -4 0 0 !examples/20row.qua -218 -3 0 0 !examples/20row.qua +218 -8 0 0 !20row.qua +218 -7 0 0 !20row.qua +218 -6 0 0 !20row.qua +218 -5 0 0 !20row.qua +218 -4 0 0 !20row.qua +218 -3 0 0 !20row.qua -183 -7 0 0 !examples/20row.qua -183 -6 0 0 !examples/20row.qua -183 -5 0 0 !examples/20row.qua -183 -4 0 0 !examples/20row.qua -183 -3 0 0 !examples/20row.qua +183 -7 0 0 !20row.qua +183 -6 0 0 !20row.qua +183 -5 0 0 !20row.qua +183 -4 0 0 !20row.qua +183 -3 0 0 !20row.qua -148 -6 0 0 !examples/20row.qua -148 -5 0 0 !examples/20row.qua -148 -4 0 0 !examples/20row.qua -148 -3 0 0 !examples/20row.qua +148 -6 0 0 !20row.qua +148 -5 0 0 !20row.qua +148 -4 0 0 !20row.qua +148 -3 0 0 !20row.qua -113 -5 0 0 !examples/20row.qua -113 -4 0 0 !examples/20row.qua -113 -3 0 0 !examples/20row.qua +113 -5 0 0 !20row.qua +113 -4 0 0 !20row.qua +113 -3 0 0 !20row.qua -78 -4 0 0 !examples/20row.qua -78 -3 0 0 !examples/20row.qua +78 -4 0 0 !20row.qua +78 -3 0 0 !20row.qua -43 -3 0 0 !examples/20row.qua +43 -3 0 0 !20row.qua # ADD-8 # Inputs: -17, -16 diff --git a/examples/add8test.qua b/examples/add8test.qua index c440c3e..4197d53 100644 --- a/examples/add8test.qua +++ b/examples/add8test.qua @@ -16,5 +16,5 @@ x y speedX speedY color 50 44 1 0 GE 50 45 1 0 GE 50 46 1 0 BL -70 47 0 0 !examples/add8.qua +70 47 0 0 !add8.qua # 11001101 (205) + 01011110 (94) = 100101011 (299)
\ No newline at end of file diff --git a/examples/and.qua b/examples/and.qua index 5bc9914..48c783e 100644 --- a/examples/and.qua +++ b/examples/and.qua @@ -4,7 +4,7 @@ x y speedX speedY color 2 1 0 0 GA 2 0 0 0 GA -1 0 0 0 GA --1 3 0 0 !examples/not.qua +-1 3 0 0 !not.qua # AND - Input: 0, 0 speed 0, 1 # 1, 0 speed 0, 1 # Output: 0, 3 diff --git a/examples/andtest.qua b/examples/andtest.qua index e8e784c..fc7f960 100644 --- a/examples/andtest.qua +++ b/examples/andtest.qua @@ -1,14 +1,14 @@ x y speedX speedY color 100 50 0 1 GE 101 50 0 1 GE -100 100 0 0 !examples/and.qua +100 100 0 0 !and.qua 120 50 0 1 GE 121 50 0 1 BL -120 100 0 0 !examples/and.qua +120 100 0 0 !and.qua 140 50 0 1 BL 141 50 0 1 GE -140 100 0 0 !examples/and.qua +140 100 0 0 !and.qua 160 50 0 1 BL 161 50 0 1 BL -160 100 0 0 !examples/and.qua +160 100 0 0 !and.qua diff --git a/examples/full.qua b/examples/full.qua index fb861f0..c196e1c 100644 --- a/examples/full.qua +++ b/examples/full.qua @@ -62,9 +62,9 @@ x y speedX speedY color 9 59 0 0 CY 9 58 0 0 CY # While the first 2 digits are adding -0 5 0 0 !examples/half.qua +0 5 0 0 !half.qua # Add the third digit with the sum of the first 2 --1 41 0 0 !examples/half.qua # Outputs to -2/-3, 67 +-1 41 0 0 !half.qua # Outputs to -2/-3, 67 # Bring sum of second addition to answer -2 68 0 0 GA 7 68 0 0 GA @@ -76,7 +76,7 @@ x y speedX speedY color 7 77 0 0 GA 4 77 0 0 GA # OR carries --3 72 0 0 !examples/or.qua +-3 72 0 0 !or.qua # FULL-ADDER # Inputs: 0, 0 diff --git a/examples/fulltest.qua b/examples/fulltest.qua index 2e5964b..e135e8b 100644 --- a/examples/fulltest.qua +++ b/examples/fulltest.qua @@ -2,33 +2,33 @@ x y speedX speedY color 20 1 0 1 GE 21 1 0 1 GE 22 1 0 1 GE -20 30 0 0 !examples/full.qua +20 30 0 0 !full.qua 55 1 0 1 GE 56 1 0 1 GE 57 1 0 1 BL -55 30 0 0 !examples/full.qua +55 30 0 0 !full.qua 90 1 0 1 GE 91 1 0 1 BL 92 1 0 1 GE -90 30 0 0 !examples/full.qua +90 30 0 0 !full.qua 125 1 0 1 GE 126 1 0 1 BL 127 1 0 1 BL -125 30 0 0 !examples/full.qua +125 30 0 0 !full.qua 160 1 0 1 BL 161 1 0 1 GE 162 1 0 1 GE -160 30 0 0 !examples/full.qua +160 30 0 0 !full.qua 195 1 0 1 BL 196 1 0 1 GE 197 1 0 1 BL -195 30 0 0 !examples/full.qua +195 30 0 0 !full.qua 230 1 0 1 BL 231 1 0 1 BL 232 1 0 1 GE -230 30 0 0 !examples/full.qua +230 30 0 0 !full.qua 265 1 0 1 BL 266 1 0 1 BL 267 1 0 1 BL -265 30 0 0 !examples/full.qua +265 30 0 0 !full.qua diff --git a/examples/half.qua b/examples/half.qua index eb23a6b..8c2083c 100644 --- a/examples/half.qua +++ b/examples/half.qua @@ -15,7 +15,7 @@ x y speedX speedY color 4 -2 0 0 GA -3 -1 0 0 GA -4 -2 0 0 GA --4 3 0 0 !examples/xor.qua # Outputs to 2, 15 +-4 3 0 0 !xor.qua # Outputs to 2, 15 # What happens to the top copy (AND) -1 -3 0 0 GA 2 -4 0 0 GA @@ -23,7 +23,7 @@ x y speedX speedY color -10 -4 0 0 GA -9 -2 0 0 CY -9 -1 0 0 CY --10 15 0 0 !examples/and.qua # Outputs to -10, 18 +-10 15 0 0 !and.qua # Outputs to -10, 18 -10 22 0 0 GA -5 22 0 0 PU -5 21 0 0 RE diff --git a/examples/halftest.qua b/examples/halftest.qua index aad797e..3f47e48 100644 --- a/examples/halftest.qua +++ b/examples/halftest.qua @@ -1,16 +1,16 @@ x y speedX speedY color 100 50 0 1 GE 101 50 0 1 GE -100 100 0 0 !examples/half.qua +100 100 0 0 !half.qua 130 50 0 1 GE 131 50 0 1 BL -130 100 0 0 !examples/half.qua +130 100 0 0 !half.qua 160 50 0 1 BL 161 50 0 1 GE -160 100 0 0 !examples/half.qua +160 100 0 0 !half.qua 190 50 0 1 BL 191 50 0 1 BL -190 100 0 0 !examples/half.qua +190 100 0 0 !half.qua diff --git a/examples/nottest.qua b/examples/nottest.qua index c7b8854..40b8669 100644 --- a/examples/nottest.qua +++ b/examples/nottest.qua @@ -16,7 +16,7 @@ x y speedX speedY color 120 30 0 0 PU 120 28 0 0 RE # ---- NOT ---- -120 120 0 0 !examples/not.qua +120 120 0 0 !not.qua #120 120 0 0 PU #118 120 0 0 GA #123 120 0 0 YE diff --git a/examples/or.qua b/examples/or.qua index 162fe04..830f1cd 100644 --- a/examples/or.qua +++ b/examples/or.qua @@ -1,10 +1,10 @@ x y speedX speedY color -0 2 0 0 !examples/not.qua +0 2 0 0 !not.qua 1 0 0 0 GA 6 0 0 0 GA 6 -1 0 0 GA 5 -1 0 0 GA -5 2 0 0 !examples/not.qua +5 2 0 0 !not.qua 1 4 0 0 GA 7 4 0 0 YE # OR diff --git a/examples/ortest.qua b/examples/ortest.qua index be08d4e..dd42cfa 100644 --- a/examples/ortest.qua +++ b/examples/ortest.qua @@ -1,15 +1,15 @@ x y speedX speedY color 100 50 0 1 GE 101 50 0 1 GE -100 100 0 0 !examples/or.qua +100 100 0 0 !or.qua 120 50 0 1 GE 121 50 0 1 BL -120 100 0 0 !examples/or.qua +120 100 0 0 !or.qua 140 50 0 1 BL 141 50 0 1 GE -140 100 0 0 !examples/or.qua +140 100 0 0 !or.qua 160 50 0 1 BL 161 50 0 1 BL -160 100 0 0 !examples/or.qua +160 100 0 0 !or.qua diff --git a/examples/xor.qua b/examples/xor.qua index 50eb731..d9c527d 100644 --- a/examples/xor.qua +++ b/examples/xor.qua @@ -21,9 +21,9 @@ x y speedX speedY color 2 -2 0 0 GA -2 -1 0 0 GA -3 -2 0 0 GA --3 5 0 0 !examples/or.qua +-3 5 0 0 !or.qua # The combining (AND) -3 12 0 0 !examples/and.qua +3 12 0 0 !and.qua # A XOR B = (A OR B) AND (A NAND B) # Inputs: 0, 0 # 1, 0 diff --git a/examples/xortest.qua b/examples/xortest.qua index 449145b..cfe1230 100644 --- a/examples/xortest.qua +++ b/examples/xortest.qua @@ -1,16 +1,16 @@ x y speedX speedY color 100 50 0 1 GE 101 50 0 1 GE -100 100 0 0 !examples/xor.qua +100 100 0 0 !xor.qua 120 50 0 1 GE 121 50 0 1 BL -120 100 0 0 !examples/xor.qua +120 100 0 0 !xor.qua 140 50 0 1 BL 141 50 0 1 GE -140 100 0 0 !examples/xor.qua +140 100 0 0 !xor.qua 160 50 0 1 BL 161 50 0 1 BL -160 100 0 0 !examples/xor.qua +160 100 0 0 !xor.qua |