Robert's website

JSASM help

JSASM - high-level ECAL assembler

This compiler/assembler allows ECAL programs to be written using JavaScript. For example, loops and conditional statements can be used at compile-time to form lookup tables and the like. The raw bytecode can be manipulated using the bytecode[] array, whilst pc is the procedure counter (current pointer).

As with JSECAL, the output code is 100% compatible with the vec command.

Example code

AddLabel("start",pc);//does not move pc
sa(or); // can also use "opcodes['sa'](labels['or']);"

Opcodes override labels, which override other Javascript functions in jsasm. For a list of opcodes, please see JSECAL help.

Note: source lines in JSASM cannot usually be determined by the assembler. To work around this, use sLine++ in your code to increment it.