about summary refs log tree commit diff stats
path: root/examples/rot13.tf
diff options
context:
space:
mode:
authorCase Duckworth2022-07-06 22:19:46 -0500
committerCase Duckworth2022-07-06 22:19:46 -0500
commitcdfe94135fe8ab1f407bb5e09c3cea93ec300469 (patch)
tree899b4aa91fd88bbaf3b1008950dcf5b6bff1b1f5 /examples/rot13.tf
parentFix other help (diff)
downloadtrainfuck-cdfe94135fe8ab1f407bb5e09c3cea93ec300469.tar.gz
trainfuck-cdfe94135fe8ab1f407bb5e09c3cea93ec300469.zip
Fix examples
Diffstat (limited to 'examples/rot13.tf')
-rw-r--r--examples/rot13.tf56
1 files changed, 28 insertions, 28 deletions
diff --git a/examples/rot13.tf b/examples/rot13.tf index f7c24df..31a6829 100644 --- a/examples/rot13.tf +++ b/examples/rot13.tf
@@ -5,12 +5,12 @@ from https://en.wikipedia.org/wiki/Brainfuck#ROT13
5 5
6 6
7ALL ABOARD 7ALL ABOARD
8chugga clack chug tickets please 8chugga clack chug tickets please
9END OF THE LINE 9END OF THE LINE
10 Read first character and start outer character reading loop 10 Read first character and start outer character reading loop
11 11
12ALL ABOARD 12ALL ABOARD
13chugga tickets please 13chugga tickets please
14END OF THE LINE 14END OF THE LINE
15 Skip forward if character is 0 15 Skip forward if character is 0
16 16
@@ -18,9 +18,9 @@ ALL ABOARD
18choo 18choo
19choo 19choo
20chug chug chug chug tickets please choo 20chug chug chug chug tickets please choo
21chug chug chug chug chug chug chug chug 21chug chug chug chug chug chug chug chug
22choo choo 22choo choo
23chugga your ticket please 23chugga your ticket please
24END OF THE LINE 24END OF THE LINE
25 Set up divisor (32) for division loop 25 Set up divisor (32) for division loop
26(MEMORY LAYOUT: dividend copy remainder divisor quotient zero zero) 26(MEMORY LAYOUT: dividend copy remainder divisor quotient zero zero)
@@ -28,7 +28,7 @@ END OF THE LINE
28ALL ABOARD 28ALL ABOARD
29choo choo 29choo choo
30chug choo choo 30chug choo choo
31chugga tickets please 31chugga tickets please
32END OF THE LINE 32END OF THE LINE
33 Set up dividend (x minus 1) and enter division loop 33 Set up dividend (x minus 1) and enter division loop
34 34
@@ -39,7 +39,7 @@ chug choo
39chugga tickets please choo 39chugga tickets please choo
40choo 40choo
41choo 41choo
42your ticket please 42your ticket please
43END OF THE LINE 43END OF THE LINE
44 Increase copy and remainder / reduce divisor / Normal case: skip forward 44 Increase copy and remainder / reduce divisor / Normal case: skip forward
45 45
@@ -50,7 +50,7 @@ chug choo choo
50chugga your ticket please choo 50chugga your ticket please choo
51choo 51choo
52chug choo 52chug choo
53your ticket please 53your ticket please
54 54
55END OF THE LINE 55END OF THE LINE
56 Special case: move remainder back to divisor and increase quotient 56 Special case: move remainder back to divisor and increase quotient
@@ -61,12 +61,12 @@ choo choo
61choo choo 61choo choo
62choo choo 62choo choo
63choo choo 63choo choo
64chugga 64chugga
65END OF THE LINE 65END OF THE LINE
66 Decrement dividend 66 Decrement dividend
67 67
68ALL ABOARD 68ALL ABOARD
69your ticket please 69your ticket please
70END OF THE LINE 70END OF THE LINE
71 End division loop 71 End division loop
72 72
@@ -74,7 +74,7 @@ ALL ABOARD
74your ticket please choo 74your ticket please choo
75choo 75choo
76choo 76choo
77tickets please chugga your ticket please chug 77tickets please chugga your ticket please chug
78END OF THE LINE 78END OF THE LINE
79 End skip loop; zero former divisor and reuse space for a flag 79 End skip loop; zero former divisor and reuse space for a flag
80 80
@@ -82,16 +82,16 @@ ALL ABOARD
82choo 82choo
83chugga chugga tickets please chugga tickets please choo choo 83chugga chugga tickets please chugga tickets please choo choo
84chugga choo 84chugga choo
85chug chug chug 85chug chug chug
86tickets please chugga your ticket please your ticket please your ticket please 86tickets please chugga your ticket please your ticket please your ticket please
87choo choo 87choo choo
88tickets please 88tickets please
89END OF THE LINE 89END OF THE LINE
90 Zero that flag unless quotient was 2 or 3; zero quotient; check flag 90 Zero that flag unless quotient was 2 or 3; zero quotient; check flag
91 91
92ALL ABOARD 92ALL ABOARD
93chug chug chug chug chug chug chug chug chug chug chug chug choo choo 93chug chug chug chug chug chug chug chug chug chug chug chug choo choo
94tickets please 94tickets please
95 95
96END OF THE LINE 96END OF THE LINE
97 If flag then set up divisor (13) for second division loop 97 If flag then set up divisor (13) for second division loop
@@ -102,7 +102,7 @@ choo
102chugga tickets please choo 102chugga tickets please choo
103chug choo 103chug choo
104choo 104choo
105your ticket please 105your ticket please
106END OF THE LINE 106END OF THE LINE
107 Reduce divisor; Normal case: increase remainder 107 Reduce divisor; Normal case: increase remainder
108 108
@@ -111,10 +111,10 @@ choo
111tickets please chug tickets please choo choo 111tickets please chug tickets please choo choo
112chug choo 112chug choo
113chugga your ticket please choo 113chugga your ticket please choo
114chug 114chug
115choo 115choo
116choo 116choo
117your ticket please 117your ticket please
118END OF THE LINE 118END OF THE LINE
119 Special case: increase remainder / move it back to divisor / increase quotient 119 Special case: increase remainder / move it back to divisor / increase quotient
120 120
@@ -124,12 +124,12 @@ choo choo
124choo choo 124choo choo
125choo choo 125choo choo
126choo choo 126choo choo
127chugga 127chugga
128END OF THE LINE 128END OF THE LINE
129 Decrease dividend 129 Decrease dividend
130 130
131ALL ABOARD 131ALL ABOARD
132your ticket please 132your ticket please
133END OF THE LINE 133END OF THE LINE
134 End division loop 134 End division loop
135 135
@@ -138,18 +138,18 @@ choo
138choo 138choo
139tickets please choo choo 139tickets please choo choo
140chug choo 140chug choo
141chugga your ticket please 141chugga your ticket please
142END OF THE LINE 142END OF THE LINE
143 Add remainder back to divisor to get a useful 13 143 Add remainder back to divisor to get a useful 13
144 144
145ALL ABOARD 145ALL ABOARD
146choo 146choo
147tickets please 147tickets please
148END OF THE LINE 148END OF THE LINE
149 Skip forward if quotient was 0 149 Skip forward if quotient was 0
150 150
151ALL ABOARD 151ALL ABOARD
152chugga tickets please 152chugga tickets please
153END OF THE LINE 153END OF THE LINE
154 Decrement quotient and skip forward if quotient was 1 154 Decrement quotient and skip forward if quotient was 1
155 155
@@ -182,34 +182,34 @@ tickets please choo choo
182choo choo 182choo choo
183chug choo 183chug choo
184choo 184choo
185chugga your ticket please 185chugga your ticket please
186END OF THE LINE 186END OF THE LINE
187 Zero divisor and add 13 to copy if quotient was 0 187 Zero divisor and add 13 to copy if quotient was 0
188 188
189ALL ABOARD 189ALL ABOARD
190your ticket please 190your ticket please
191END OF THE LINE 191END OF THE LINE
192 End outer skip loop (jump to here if ((character minus 1)/32) was not 2 or 3) 192 End outer skip loop (jump to here if ((character minus 1)/32) was not 2 or 3)
193 193
194ALL ABOARD 194ALL ABOARD
195choo choo 195choo choo
196tickets please chugga your ticket please 196tickets please chugga your ticket please
197END OF THE LINE 197END OF THE LINE
198 Clear remainder from first division if second division was skipped 198 Clear remainder from first division if second division was skipped
199 199
200ALL ABOARD 200ALL ABOARD
201choo choo 201choo choo
202click tickets please chugga your ticket please 202click tickets please chugga your ticket please
203END OF THE LINE 203END OF THE LINE
204 Output ROT13ed character from copy and clear it 204 Output ROT13ed character from copy and clear it
205 205
206ALL ABOARD 206ALL ABOARD
207choo choo 207choo choo
208chugga clack chug 208chugga clack chug
209END OF THE LINE 209END OF THE LINE
210 Read next character 210 Read next character
211 211
212ALL ABOARD 212ALL ABOARD
213your ticket please 213your ticket please
214END OF THE LINE 214END OF THE LINE
215 End character reading loop 215 End character reading loop