283 OPT option Purpose This statement determines what output is produced on the screen when assembly language routines are processed by the BASIC interpreter. An understanding of the operation of assemblers is required to understand the following. During assembly two common errors can occur: Branch out of range and Unknown label . The latter will occur during pass one for all forward references. It is therefore often desirable to turn off assembler error messages during pass one. The statement OPT is followed by a number in the range 0 to 7, with the following results: 0 Assembler errors suppressed, no listing. 1 Assembler errors suppressed, listing. 2 Assembler errors reported, no listing.
3 Assembler errors reported, listing. Options 4, 5, 6 and 7 behave exactly as options 0, 1, 2 and 3 except that the code can be placed at a different location from that at which it is intended to execute. With options 4 to 7 the variable P% controls the program counter during assembly, and the variable O% gives the memory location where the code is placed. The OPT statement can only occur inside the square brackets which enclose Assembly Language commands. OPT is set to 3 every time the BASIC interpreter finds a [ . Do not confuse it with *OPT which is described in chapter 43.
Examples 200 OPT 1 350 OPT (pass*2+list) Description An assembler pseudo-operation controlling the output during assembly. OPT is followed by an expression as detailed above.