diff --git a/adder.tm b/adder.tm index 582a7a1..67b3b46 100644 --- a/adder.tm +++ b/adder.tm @@ -3,35 +3,80 @@ 11:0,1,12,0,0,0 12:0,1,13,0,0,0 13:0,1,14,0,0,0 -14:1,0,15,0,0,0 -# At card 15 we flip a bit at registry position -4 to indicate an 8 in the negative registry, then we jump to 140 -15:0,0,140,0,0,0 +# At card 14 we flip a bit at registry position -4 to indicate an 8 in the negative registry, then for completness we continue up the registry +14:1,1,15,0,0,0 +15:0,1,16,0,0,0 +16:0,1,17,0,0,0 +17:0,1,18,0,0,0 +18:0,0,107,0,0,0 -# At card 21 write a one and move to 22 +# At this point we are starting to move back up the negative registry +107:0,0,106,1,0,106 +106:0,0,105,1,0,105 +105:0,0,104,1,0,104 +104:0,0,103,1,0,103 +103:0,0,102,1,0,102 +102:0,0,101,1,0,101 +101:0,0,100,1,0,100 +100:0,0,21,1,0,21 + +# Move we are at the registry pos 1 where we write a 1 and move to reg pos 2 21:1,0,22,0,0,0 -# At card 22 write a one and jump to 210 where we start to move back to registry pos 0 -22:1,1,210,1,1,210 - -# At 30 - 38 we keep a decrementer -30:1,1,31,0,0,0 -31:1,1,32,0,0,0 -32:1,1,33,0,0,0 -33:1,1,34,0,0,0 -34:1,1,35,0,0,0 -35:1,1,36,0,0,0 -36:1,1,37,0,0,0 -37:1,1,38,0,0,0 -38:1,1,0,0,0,0 - -# 140 - 142 just moves us back to registry pos 0 -140:0,0,141,1,0,141 -141:0,0,142,1,0,142 - -# At 142 we jump to 21 -142:0,0,21,0,0,21 - -# Here we move back to registry pos 0 and then jump to 30 -210:0,1,211,1,1,211 -211:0,1,30,1,1,30 +# A reg pos 2 we also write a one to get the binary number 3, for completeness we continue up the registry to pos 8 and then go back +22:1,0,23,0,0,0 +23:0,0,24,0,0,0 +24:0,0,25,0,0,0 +25:0,0,26,0,0,0 +26:0,0,27,0,0,0 +27:0,0,28,0,0,0 +28:0,1,207,0,0,0 + +# Now we go back to reg pos 0 +207:0,1,206,1,1,206 +206:0,1,205,1,1,205 +205:0,1,204,1,1,204 +204:0,1,203,1,1,203 +203:0,1,202,1,1,202 +202:0,1,201,1,1,201 +201:0,1,200,1,1,200 + +# Here we are back to registry pos 0 where we jump to the decrementer, the idea is to decrement the negative registry +# and increment the positive registry until the negative registry is zero +200:0,1,30,0,1,30 + +# This is a decrementer for registry -1 through -8 +# decrement: if 1 write 0: end +# if 0 write 1 move to next +30:1,1,31,0,0,40 +31:1,1,32,0,0,301 +32:1,1,33,0,0,302 +33:1,1,34,0,0,303 +34:1,1,35,0,0,302 +35:1,1,36,0,0,304 +36:1,1,37,0,0,305 +37:1,1,38,0,0,306 +38:1,1,307,0,0,307 + +# Here we need to go back to reg pos 0 after the decrementer is done +300:0,0,41,0,0,41 +301:0,0,300,1,0,300 +302:0,0,301,1,0,301 +303:0,0,302,1,0,302 +304:0,0,303,1,0,303 +305:0,0,304,1,0,304 +306:0,0,305,1,0,305 +307:0,0,306,1,0,306 + +# Here we need to increment the positive registry +# increment: if 0 write 1: end +# if 1 write 0 move to next +41:1,0,0,0,0,42 +42:1,0,0,0,0,43 +43:1,0,0,0,0,44 +44:1,0,0,0,0,45 +45:1,0,0,0,0,46 +46:1,0,0,0,0,47 +47:1,1,0,0,0,48 +48:1,1,0,0,0,0 diff --git a/cards/142 b/cards/100 similarity index 85% rename from cards/142 rename to cards/100 index 5808501..de3981c 100644 --- a/cards/142 +++ b/cards/100 @@ -1,6 +1,6 @@ 0 0 21 -0 +1 0 21 diff --git a/cards/140 b/cards/101 similarity index 50% rename from cards/140 rename to cards/101 index 7dadb50..92df465 100644 --- a/cards/140 +++ b/cards/101 @@ -1,6 +1,6 @@ 0 0 -141 +100 1 0 -141 +100 diff --git a/cards/141 b/cards/102 similarity index 50% rename from cards/141 rename to cards/102 index e7bdc9b..9fb3cb3 100644 --- a/cards/141 +++ b/cards/102 @@ -1,6 +1,6 @@ 0 0 -142 +101 1 0 -142 +101 diff --git a/cards/103 b/cards/103 new file mode 100644 index 0000000..749e347 --- /dev/null +++ b/cards/103 @@ -0,0 +1,6 @@ +0 +0 +102 +1 +0 +102 diff --git a/cards/104 b/cards/104 new file mode 100644 index 0000000..6911c85 --- /dev/null +++ b/cards/104 @@ -0,0 +1,6 @@ +0 +0 +103 +1 +0 +103 diff --git a/cards/105 b/cards/105 new file mode 100644 index 0000000..83a86dc --- /dev/null +++ b/cards/105 @@ -0,0 +1,6 @@ +0 +0 +104 +1 +0 +104 diff --git a/cards/106 b/cards/106 new file mode 100644 index 0000000..c550ae4 --- /dev/null +++ b/cards/106 @@ -0,0 +1,6 @@ +0 +0 +105 +1 +0 +105 diff --git a/cards/107 b/cards/107 new file mode 100644 index 0000000..875d2c6 --- /dev/null +++ b/cards/107 @@ -0,0 +1,6 @@ +0 +0 +106 +1 +0 +106 diff --git a/cards/14 b/cards/14 index a6b8452..8158c89 100644 --- a/cards/14 +++ b/cards/14 @@ -1,5 +1,5 @@ 1 -0 +1 15 0 0 diff --git a/cards/15 b/cards/15 index c414dba..0855141 100644 --- a/cards/15 +++ b/cards/15 @@ -1,6 +1,6 @@ 0 -0 -140 +1 +16 0 0 0 diff --git a/cards/16 b/cards/16 new file mode 100644 index 0000000..ae376fd --- /dev/null +++ b/cards/16 @@ -0,0 +1,6 @@ +0 +1 +17 +0 +0 +0 diff --git a/cards/17 b/cards/17 new file mode 100644 index 0000000..ef4f28c --- /dev/null +++ b/cards/17 @@ -0,0 +1,6 @@ +0 +1 +18 +0 +0 +0 diff --git a/cards/18 b/cards/18 new file mode 100644 index 0000000..712a45b --- /dev/null +++ b/cards/18 @@ -0,0 +1,6 @@ +0 +0 +107 +0 +0 +0 diff --git a/cards/211 b/cards/200 similarity index 85% rename from cards/211 rename to cards/200 index fb0f8e6..fcad13d 100644 --- a/cards/211 +++ b/cards/200 @@ -1,6 +1,6 @@ 0 1 30 -1 +0 1 30 diff --git a/cards/210 b/cards/201 similarity index 50% rename from cards/210 rename to cards/201 index f6ecde2..1cef046 100644 --- a/cards/210 +++ b/cards/201 @@ -1,6 +1,6 @@ 0 1 -211 +200 1 1 -211 +200 diff --git a/cards/202 b/cards/202 new file mode 100644 index 0000000..460d5aa --- /dev/null +++ b/cards/202 @@ -0,0 +1,6 @@ +0 +1 +201 +1 +1 +201 diff --git a/cards/203 b/cards/203 new file mode 100644 index 0000000..93433d4 --- /dev/null +++ b/cards/203 @@ -0,0 +1,6 @@ +0 +1 +202 +1 +1 +202 diff --git a/cards/204 b/cards/204 new file mode 100644 index 0000000..2f766c2 --- /dev/null +++ b/cards/204 @@ -0,0 +1,6 @@ +0 +1 +203 +1 +1 +203 diff --git a/cards/205 b/cards/205 new file mode 100644 index 0000000..0ca3d6f --- /dev/null +++ b/cards/205 @@ -0,0 +1,6 @@ +0 +1 +204 +1 +1 +204 diff --git a/cards/206 b/cards/206 new file mode 100644 index 0000000..d72bd1a --- /dev/null +++ b/cards/206 @@ -0,0 +1,6 @@ +0 +1 +205 +1 +1 +205 diff --git a/cards/207 b/cards/207 new file mode 100644 index 0000000..3f15676 --- /dev/null +++ b/cards/207 @@ -0,0 +1,6 @@ +0 +1 +206 +1 +1 +206 diff --git a/cards/22 b/cards/22 index 79b3439..18f3664 100644 --- a/cards/22 +++ b/cards/22 @@ -1,6 +1,6 @@ 1 -1 -210 -1 -1 -210 +0 +23 +0 +0 +0 diff --git a/cards/23 b/cards/23 new file mode 100644 index 0000000..4313636 --- /dev/null +++ b/cards/23 @@ -0,0 +1,6 @@ +0 +0 +24 +0 +0 +0 diff --git a/cards/24 b/cards/24 new file mode 100644 index 0000000..3b58bab --- /dev/null +++ b/cards/24 @@ -0,0 +1,6 @@ +0 +0 +25 +0 +0 +0 diff --git a/cards/25 b/cards/25 new file mode 100644 index 0000000..f772cb8 --- /dev/null +++ b/cards/25 @@ -0,0 +1,6 @@ +0 +0 +26 +0 +0 +0 diff --git a/cards/26 b/cards/26 new file mode 100644 index 0000000..34ed213 --- /dev/null +++ b/cards/26 @@ -0,0 +1,6 @@ +0 +0 +27 +0 +0 +0 diff --git a/cards/27 b/cards/27 new file mode 100644 index 0000000..2f6a7ca --- /dev/null +++ b/cards/27 @@ -0,0 +1,6 @@ +0 +0 +28 +0 +0 +0 diff --git a/cards/28 b/cards/28 new file mode 100644 index 0000000..385d30f --- /dev/null +++ b/cards/28 @@ -0,0 +1,6 @@ +0 +1 +207 +0 +0 +0 diff --git a/cards/30 b/cards/30 index 03a0b79..c25c014 100644 --- a/cards/30 +++ b/cards/30 @@ -3,4 +3,4 @@ 31 0 0 -0 +40 diff --git a/cards/300 b/cards/300 new file mode 100644 index 0000000..0e13161 --- /dev/null +++ b/cards/300 @@ -0,0 +1,6 @@ +0 +0 +41 +0 +0 +41 diff --git a/cards/301 b/cards/301 new file mode 100644 index 0000000..2727737 --- /dev/null +++ b/cards/301 @@ -0,0 +1,6 @@ +0 +0 +300 +1 +0 +300 diff --git a/cards/302 b/cards/302 new file mode 100644 index 0000000..55b13d0 --- /dev/null +++ b/cards/302 @@ -0,0 +1,6 @@ +0 +0 +301 +1 +0 +301 diff --git a/cards/303 b/cards/303 new file mode 100644 index 0000000..60ccadc --- /dev/null +++ b/cards/303 @@ -0,0 +1,6 @@ +0 +0 +302 +1 +0 +302 diff --git a/cards/304 b/cards/304 new file mode 100644 index 0000000..9e6ce8f --- /dev/null +++ b/cards/304 @@ -0,0 +1,6 @@ +0 +0 +303 +1 +0 +303 diff --git a/cards/305 b/cards/305 new file mode 100644 index 0000000..e13c64e --- /dev/null +++ b/cards/305 @@ -0,0 +1,6 @@ +0 +0 +304 +1 +0 +304 diff --git a/cards/306 b/cards/306 new file mode 100644 index 0000000..17334c1 --- /dev/null +++ b/cards/306 @@ -0,0 +1,6 @@ +0 +0 +305 +1 +0 +305 diff --git a/cards/307 b/cards/307 new file mode 100644 index 0000000..0723e32 --- /dev/null +++ b/cards/307 @@ -0,0 +1,6 @@ +0 +0 +306 +1 +0 +306 diff --git a/cards/31 b/cards/31 index fe123ec..1290f54 100644 --- a/cards/31 +++ b/cards/31 @@ -3,4 +3,4 @@ 32 0 0 -0 +301 diff --git a/cards/32 b/cards/32 index b807e06..733c4ee 100644 --- a/cards/32 +++ b/cards/32 @@ -3,4 +3,4 @@ 33 0 0 -0 +302 diff --git a/cards/33 b/cards/33 index ce829de..c43eafc 100644 --- a/cards/33 +++ b/cards/33 @@ -3,4 +3,4 @@ 34 0 0 -0 +303 diff --git a/cards/34 b/cards/34 index b4719bc..0807112 100644 --- a/cards/34 +++ b/cards/34 @@ -3,4 +3,4 @@ 35 0 0 -0 +302 diff --git a/cards/35 b/cards/35 index 019f089..9f0a566 100644 --- a/cards/35 +++ b/cards/35 @@ -3,4 +3,4 @@ 36 0 0 -0 +304 diff --git a/cards/36 b/cards/36 index 0a2c2cf..d241474 100644 --- a/cards/36 +++ b/cards/36 @@ -3,4 +3,4 @@ 37 0 0 -0 +305 diff --git a/cards/37 b/cards/37 index 1051541..1fa522c 100644 --- a/cards/37 +++ b/cards/37 @@ -3,4 +3,4 @@ 38 0 0 -0 +306 diff --git a/cards/38 b/cards/38 index cfc348a..3885b8b 100644 --- a/cards/38 +++ b/cards/38 @@ -1,6 +1,6 @@ 1 1 +307 0 0 -0 -0 +307 diff --git a/cards/41 b/cards/41 new file mode 100644 index 0000000..b5b9992 --- /dev/null +++ b/cards/41 @@ -0,0 +1,6 @@ +1 +0 +0 +0 +0 +42 diff --git a/cards/42 b/cards/42 new file mode 100644 index 0000000..88b4cdb --- /dev/null +++ b/cards/42 @@ -0,0 +1,6 @@ +1 +0 +0 +0 +0 +43 diff --git a/cards/43 b/cards/43 new file mode 100644 index 0000000..852d342 --- /dev/null +++ b/cards/43 @@ -0,0 +1,6 @@ +1 +0 +0 +0 +0 +44 diff --git a/cards/44 b/cards/44 new file mode 100644 index 0000000..c4fa58f --- /dev/null +++ b/cards/44 @@ -0,0 +1,6 @@ +1 +0 +0 +0 +0 +45 diff --git a/cards/45 b/cards/45 new file mode 100644 index 0000000..4f33afb --- /dev/null +++ b/cards/45 @@ -0,0 +1,6 @@ +1 +0 +0 +0 +0 +46 diff --git a/cards/46 b/cards/46 new file mode 100644 index 0000000..2a539e8 --- /dev/null +++ b/cards/46 @@ -0,0 +1,6 @@ +1 +0 +0 +0 +0 +47 diff --git a/cards/47 b/cards/47 new file mode 100644 index 0000000..17503fc --- /dev/null +++ b/cards/47 @@ -0,0 +1,6 @@ +1 +1 +0 +0 +0 +48 diff --git a/cards/48 b/cards/48 new file mode 100644 index 0000000..cfc348a --- /dev/null +++ b/cards/48 @@ -0,0 +1,6 @@ +1 +1 +0 +0 +0 +0