class

Zink::VM

Inherits Reference < Object

Constants

DEFAULT_MAX_STEPS = 25000

Constructors

new(story : Story, io : IODevice = BufferIO.new, debug : Bool = false)
Source

Instance methods

export_save
Source
export_save_for_persistence

Export a snapshot with PC rewound to the last sread instruction. On import + run_unbounded, the VM re-executes sread → read_line → blocks waiting for input, which is the correct between-turns state.

Source
halted
Source
import_save(snapshot : SaveSnapshot) : Nil
Source
last_read_pc

Address of the most recent sread instruction — used by export_save_for_persistence to rewind PC so that on restore the VM re-executes the sread and blocks waiting for input.

Source
run(max_steps = DEFAULT_MAX_STEPS) : Nil
Source
run_unbounded
Source
step
Source
worldview
Source