Difference between revisions of "CallSub"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(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...")
 
m (Xifanie moved page Event Instruction 0C to CallSub)
 
(No difference)

Latest revision as of 14:28, 22 February 2021

{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.