about summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-08-19 23:45:04 -0700
committerKartik Agaram <vc@akkartik.com>2019-08-19 23:45:04 -0700
commit668700fd2c48d0380d2e2d1f32faa217ab658fb1 (patch)
tree76628be845b8d1575bff18f342c45c200a918804 /examples
parentf7fd97ce4e252156fd943b89230b5b55c35c6447 (diff)
downloadmu-668700fd2c48d0380d2e2d1f32faa217ab658fb1.tar.gz
5521
Diffstat (limited to 'examples')
-rw-r--r--examples/ex1.subx2
-rw-r--r--examples/ex10.subx2
-rw-r--r--examples/ex11.subx2
-rw-r--r--examples/ex12.subx2
-rw-r--r--examples/ex2.subx2
-rw-r--r--examples/ex3.subx2
-rw-r--r--examples/ex4.subx2
-rw-r--r--examples/ex5.subx2
-rw-r--r--examples/ex6.subx2
-rw-r--r--examples/ex7.subx2
-rw-r--r--examples/ex8.subx2
-rw-r--r--examples/ex9.subx2
12 files changed, 12 insertions, 12 deletions
diff --git a/examples/ex1.subx b/examples/ex1.subx
index 0aca40f8..f6e362c7 100644
--- a/examples/ex1.subx
+++ b/examples/ex1.subx
@@ -1,7 +1,7 @@
 # First program: same as https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
 # Just return 42.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex1.2.subx -o examples/ex1
 #   $ ./subx run examples/ex1
 # Expected result:
diff --git a/examples/ex10.subx b/examples/ex10.subx
index 51cc0a8c..29188962 100644
--- a/examples/ex10.subx
+++ b/examples/ex10.subx
@@ -1,6 +1,6 @@
 # String comparison: return 1 iff the two args passed in at the commandline are equal.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex10.subx -o examples/ex10
 #   $ ./subx run examples/ex10 abc abd
 # Expected result:
diff --git a/examples/ex11.subx b/examples/ex11.subx
index ba75c1d3..2c0f8627 100644
--- a/examples/ex11.subx
+++ b/examples/ex11.subx
@@ -5,7 +5,7 @@
 # kernel in a few places. This layer implements a function for comparing
 # a null-terminated 'kernel string' with a length-prefixed 'SubX string'.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex11.subx -o examples/ex11
 #   $ ./subx run examples/ex11  # runs a series of tests
 #   ......  # all tests pass
diff --git a/examples/ex12.subx b/examples/ex12.subx
index 358da1d3..4d1d53d0 100644
--- a/examples/ex12.subx
+++ b/examples/ex12.subx
@@ -1,7 +1,7 @@
 # Example showing mmap syscall.
 # Create a new segment using mmap, save the address, write to it.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex12.subx -o examples/ex12
 #   $ ./subx run examples/ex12
 # You shouldn't get a segmentation fault.
diff --git a/examples/ex2.subx b/examples/ex2.subx
index 025eb0fa..e9738d9f 100644
--- a/examples/ex2.subx
+++ b/examples/ex2.subx
@@ -1,6 +1,6 @@
 # Add 1 and 1, and return the result in the exit code.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex2.subx -o examples/ex2
 #   $ ./subx run examples/ex2
 # Expected result:
diff --git a/examples/ex3.subx b/examples/ex3.subx
index 1d52e87f..08283884 100644
--- a/examples/ex3.subx
+++ b/examples/ex3.subx
@@ -1,6 +1,6 @@
 # Add the first 10 numbers, and return the result in the exit code.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex3.subx -o examples/ex3
 #   $ ./subx run examples/ex3
 # Expected result:
diff --git a/examples/ex4.subx b/examples/ex4.subx
index 31c1c10c..aebb2013 100644
--- a/examples/ex4.subx
+++ b/examples/ex4.subx
@@ -1,6 +1,6 @@
 # Read a character from stdin, save it to a global, write it to stdout.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex4.subx -o examples/ex4
 #   $ ./subx run examples/ex4
 
diff --git a/examples/ex5.subx b/examples/ex5.subx
index 6f5b1d90..97c5111e 100644
--- a/examples/ex5.subx
+++ b/examples/ex5.subx
@@ -1,6 +1,6 @@
 # Read a character from stdin, save it to a local on the stack, write it to stdout.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex5.subx -o examples/ex5
 #   $ ./subx run examples/ex5
 
diff --git a/examples/ex6.subx b/examples/ex6.subx
index a90f11df..67df6574 100644
--- a/examples/ex6.subx
+++ b/examples/ex6.subx
@@ -1,6 +1,6 @@
 # Print out a (global variable) string to stdout.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex6.subx -o examples/ex6
 #   $ ./subx run examples/ex6
 #   Hello, world!
diff --git a/examples/ex7.subx b/examples/ex7.subx
index d3b33f23..1d716c08 100644
--- a/examples/ex7.subx
+++ b/examples/ex7.subx
@@ -4,7 +4,7 @@
 # it for reading, read a character from it, close it, delete it, and return
 # the character read.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex7.subx -o examples/ex7
 #   $ ./subx run examples/ex7
 # Expected result:
diff --git a/examples/ex8.subx b/examples/ex8.subx
index 9d7255e1..fdffb97f 100644
--- a/examples/ex8.subx
+++ b/examples/ex8.subx
@@ -1,6 +1,6 @@
 # Example reading commandline arguments: compute length of first arg.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex8.subx -o examples/ex8
 #   $ ./subx run examples/ex8 abc de fghi
 # Expected result:
diff --git a/examples/ex9.subx b/examples/ex9.subx
index e3318b05..a580c749 100644
--- a/examples/ex9.subx
+++ b/examples/ex9.subx
@@ -3,7 +3,7 @@
 # Show difference between ascii codes of first letter of first arg and first
 # letter of second arg.
 #
-# To run (from the subx directory):
+# To run:
 #   $ ./subx translate examples/ex9.subx -o examples/ex9
 #   $ ./subx run examples/ex9 z x
 # Expected result:
500 committer Thomas E. Dickey <dickey@invisible-island.net> 1998-11-10 19:47:00 -0500 snapshot of project "lynx", label v2-8-2dev_2' href='/ingrix/lynx-snapshots/commit/src/LYList.c?id=d3f9d5478df478427c2aa5db4507ddd0a38f0eb6'>d3f9d547 ^
d326f24d ^
e087f6d4

533c7482 ^
d326f24d ^
6e75abc0 ^
f61041c1 ^
d3f9d547 ^
f61041c1 ^


57bfc74f ^

e087f6d4
f7c3c4ca ^

aa7067e1 ^
f7c3c4ca ^

d326f24d ^
e087f6d4
55ebd12c ^

d3f9d547 ^
b52ca53f ^


55ebd12c ^
57bfc74f ^

d326f24d ^
57bfc74f ^
d3f9d547 ^
57bfc74f ^
945e8eb6 ^
945e8eb6 ^


d326f24d ^
57bfc74f ^
f6e997b7 ^
8f8c57cc ^
57bfc74f ^


2cd8e80b ^
57bfc74f ^


d326f24d ^





b63d287c ^
d326f24d ^


57bfc74f ^
f78e2771 ^
ceb4156d ^
55ebd12c ^
d326f24d ^
b63d287c ^
57bfc74f ^


8f8c57cc ^
c812b42f ^
8f8c57cc ^
57bfc74f ^
c812b42f ^
57bfc74f ^
b63d287c ^
03413d1c ^

b63d287c ^
03413d1c ^
b63d287c ^
d326f24d ^




b63d287c ^


d326f24d ^
57bfc74f ^
aa7067e1 ^

c812b42f ^


aa7067e1 ^
d326f24d ^
aa7067e1 ^


e087f6d4

945e8eb6 ^
b52ca53f ^
c68ecb8b ^
8f8c57cc ^

0cb11571 ^
8f8c57cc ^
945e8eb6 ^
8f8c57cc ^
e087f6d4
945e8eb6 ^
b6d1143c ^
d326f24d ^





e087f6d4



aa7067e1 ^
e087f6d4
945e8eb6 ^
b6d1143c ^
945e8eb6 ^
d326f24d ^

55ebd12c ^

d3f9d547 ^
945e8eb6 ^




b52ca53f ^
945e8eb6 ^


b6d1143c ^
945e8eb6 ^



d326f24d ^

d3f9d547 ^

e087f6d4
b63d287c ^
d326f24d ^







b63d287c ^



0cb11571 ^
b63d287c ^



d326f24d ^
55ebd12c ^
e087f6d4
01876e39 ^








































272f214b ^


01876e39 ^






















272f214b ^



01876e39 ^







55ebd12c ^
d326f24d ^








e087f6d4
945e8eb6 ^
945e8eb6 ^
e087f6d4
01876e39 ^


272f214b ^

01876e39 ^



57bfc74f ^
01876e39 ^
945e8eb6 ^
01876e39 ^

ff34560f ^
945e8eb6 ^
e087f6d4
01876e39 ^
e087f6d4
55ebd12c ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347