CallSub
Revision as of 07:50, 22 February 2021 by Xifanie (talk | contribs) (Created page with "__FORCETOC__ = {0C} {{IE_0C}} = {{IE_0C_ex}} Scans the entire event from the beginning to find a {0A} {{IE_0A}} with a matching ID, then executes the...")
Contents
{0C} CallSub
CallSub(xID)
Scans the entire event from the beginning to find a {0A} DefineSub with a matching ID, then executes the code from there.
Stores the event position of the event instruction that follows itself (CallSub) as a return address, which will be used once the event will encounter {0A} DefineSub.
Up to 8 layers of subroutines may be executed at any given time (i.e. using CallSub inside DefineSub).
See also: {0A} DefineSub ― {0B} EndSub
ID : Byte (hex)
ID with a matching {0A} DefineSub instruction to seek.