git @ Cat's Eye Technologies
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).
 1247 1247 | } 1248 1248 = ok 1249 1249 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 { 1255 1258 | ld x, 200 1256 1259 | } 1257 1260 | 1258 | routine sub inputs bar trashes foo, a, x, z, n { 1261 | routine sub 1262 | inputs bar 1263 | trashes foo, a, x, z, n { 1259 1264 | ld x, 0 1260 1265 | copy bar, foo 1261 1266 | goto foo 1262 1267 | } 1263 1268 | 1264 | routine main inputs bar outputs a trashes z, n { 1269 | routine main inputs bar 1270 | outputs a 1271 | trashes foo, x, z, n { 1265 1272 | call sub 1266 1273 | ld a, x 1267 1274 | } 1268 1275 ? UnmeaningfulReadError: x in main 1269 1276 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