How Final Fantasy VII's monster scripting system works
youtube.com
youtube.com
Rather that being run from machine code, creatures are controlled by an embedded bytecode scripting language that acts like a simplified stack-based assembler language, executing on a basic runtime environment.
This video includes a short tutorial on writing a basic script, and extrapolates to some hypotheses on how the scripts were actually authored in a higher-level language.
Could you share a link?