Skip to main content

End the script

SCRIPT_END · opcode 0xf1 · 1 byte

Script virtual machine · Opcode list · Control flow

Stops the script that is running. Pending subroutine calls are discarded.

Encoding​

OffsetTypeFieldMeaning
0u8opcode0xf1

The instruction has no operands.

Behavior​

The handler sets the run's stop flag and clears the return-stack depth used by Call a subroutine. The interpreter loop sees the flag and returns to the game; the next instruction is not executed.1

Edge cases and unknowns​

Sources​

Footnotes​

  1. Handler for 0xf1, with the stop flag and the return-stack depth. Comparative source: oeob_end in REF-SCUMM-003. ↩