Script: add debug mode, and some assertions & label lookups in-mem
commitf8811a38601e7d6d6364bea1a235b294717e79f3
authorrofl0r <retnyg@gmx.net>
Sun, 9 Dec 2012 20:24:41 +0000 (9 21:24 +0100)
committerrofl0r <retnyg@gmx.net>
Sun, 9 Dec 2012 20:24:41 +0000 (9 21:24 +0100)
tree2f9c243c32c8091f1219206a069ffedc05c9d37a
parent45a924a4f0a0585ee97d8ea5e15a226b62bf0603
Script: add debug mode, and some assertions & label lookups in-mem

since we already have the code read into memory, use that rather
than to process the file again.

debugmode is triggered by setting the environment variable
AGSDEBUG. it will cause emission of instruction numbers before
the assembly. it is not possible to recompile that output without
stripping the instruction numbers away.

+ some assertions to ensure we dont do invalid stuff with jmps.
Script.c