Green Script - Scripting Kit V1 ------------------------------- ************************************************ TECHNICAL SPECIFICATION: Green Script File-Types ************************************************ WARNING: This is preliminary documentation. It may not be 100% accurate, and could contain errors. ************Section 1: CODE Files (Plain-Text Source)****************** The plain-text source code files for Green Script are known as CODE files, and follow the DOS 8-bit ASCII-plaintext file format, as shown below: text text text ... The symbol "text" refers to any combination of valid ASCII characters. The symbols "" and "" refer to the ASCII character codes relating to Carriage Return (ASCII Code 13) and Line Feed (ASCII Code 10). The symbol "" signifies the end-of-file marker, which is optional. Each line in Green Script may be preceeded by any number of spaces (ASCII Code 32) and/or "tabs" (ASCII Code 9), as these are removed from the line prior to processing by the compiler / assembler / interpreter. Any lines beginning with the two characters "//" (ASCII Code 47 repeated twice) are ignored, and are considered programmer-defined comments, as are "empty" lines (lines consisting of no commands). **************Section 2: COMPILED Files (Byte-Code)******************** The machine-readable format for Green Script programs are known as "compiled bytecode streams", or COMPILED files. Here is an outline of the different elements of COMPILED files (all values are given in hexadecimal, unless stated otherwise). Offset ID Description ----------------------------------------------------------------------- 0000h LABELS An array of 256 "long" numbers, specifying the read offsets for the labels in the program. (800h bytes) 0800h DSIZE A single "long" number, specifying the number of bytes contained within the main part of the file. (8 bytes) 0808h DATA The main data stream. (DSIZE bytes)