#!/usr/bin/env -S jennifer run# The step limit, and what loading a D64 disk image as a story prints.# Run disk.j first: it writes demo.d64. Needs lantern.z5.use io;
import"@skiffyard/zmachine/"as zmachine;
# a step limit far too small for the game's start: the call throwstry {
def m aszmachine.Machine initzmachine.open("lantern.z5");
$m = zmachine.run(zmachine.setLimit($m, 100));
} catch (e) {
io.printf("%s: %s\n", $e.kind, $e.message);
}
# a disk image is not a story filetry {
def d aszmachine.Machine initzmachine.open("demo.d64");
io.printf("%d\n", zmachine.info($d).version);
} catch (e) {
io.printf("%s: %s\n", $e.kind, $e.message);
}