git @ Cat's Eye Technologies SixtyPical / cb2bda6
Fix my own confusion, and with it, the unit test. Chris Pressey 6 years ago
1 changed file(s) with 40 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
12471247 | }
12481248 = ok
12491249
1250 Jumping through the vector does indeed output the things the vector says it does.
1251
1252 | vector foo trashes a, x, z, n
1253 |
1254 | routine bar trashes a, x, z, n {
1250 Jumping through the vector does indeed trash, or output, the things the
1251 vector says it does.
1252
1253 | vector foo
1254 | trashes a, x, z, n
1255 |
1256 | routine bar
1257 | trashes a, x, z, n {
12551258 | ld x, 200
12561259 | }
12571260 |
1258 | routine sub inputs bar trashes foo, a, x, z, n {
1261 | routine sub
1262 | inputs bar
1263 | trashes foo, a, x, z, n {
12591264 | ld x, 0
12601265 | copy bar, foo
12611266 | goto foo
12621267 | }
12631268 |
1264 | routine main inputs bar outputs a trashes z, n {
1269 | routine main inputs bar
1270 | outputs a
1271 | trashes foo, x, z, n {
12651272 | call sub
12661273 | ld a, x
12671274 | }
12681275 ? UnmeaningfulReadError: x in main
12691276
1270 Ack, I have become a bit confused...
1277 | vector foo
1278 | outputs x
1279 | trashes a, z, n
1280 |
1281 | routine bar
1282 | outputs x
1283 | trashes a, z, n {
1284 | ld x, 200
1285 | }
1286 |
1287 | routine sub
1288 | inputs bar
1289 | outputs x
1290 | trashes foo, a, z, n {
1291 | ld x, 0
1292 | copy bar, foo
1293 | goto foo
1294 | }
1295 |
1296 | routine main inputs bar
1297 | outputs a
1298 | trashes foo, x, z, n {
1299 | call sub
1300 | ld a, x
1301 | }
1302 = ok