TAL Reference Manual

Statements
TAL Reference Manual526371-001
12-17
Usage Considerations
Pseudocodes
You can use pseudocodes and instruction codes as CODE statement mnemonics. The
form numbers in the following descriptions correlate to form numbers shown in the
CODE statement instruction form diagrams:
DUMPCONS Directive and CODE Statements
When you use CODE statements to create a block of code, the compiler might insert
constants or branch labels into the object file in the middle of your block of code. If you
need to keep the block of code intact, put a DUMPCONS directive immediately before
the CODE statements. The compiler then inserts all pending constants and branch
labels into the object code before it compiles the CODE statements.
ACON A form 3 mnemonic that emits the value specified in constant. constant is
the absolute run-time code address associated with the label in the next
instruction location. An absolute code address is relative to the beginning of
the code space in which the encompassing procedure resides.
CON A form 3 mnemonic that emits the value specified in constant. constant is
an offset of a location from the program counter or a character string
constant.
The following indirect CODE branch is no longer allowed:
CODE (BANZ .test_x);
!Lots of code
test_x: CODE (CON @test_z);
!Error 11 results
DECS A form 3 mnemonic that decrements the compiler’s internal S-register
counter by the amount specified in constant. constant is a signed integer to
subtract from the compilers internal S-register counter. This mnemonic
emits no code. The CODE (DECS) statement and the DECS directive
behave the same except when you include them in a DEFINE declaration.
That is, the CODE(DECS) statement is part of the DEFINE, but the DECS
directive executes immediately and is not part of the DEFINE.
FULL A form 1 mnemonic that signals the compiler that the register stack is full
and sets the compiler’s internal RP counter to 7. This instruction emits no
code. RP is the register stack pointer, which points to the top of the register
stack.
RP A form 3 mnemonic that sets the compilers internal RP counter to the value
specified in constant. constant is a value in the range 0 through 7, where 7
signals the compiler that the register stack is empty. This mnemonic emits
no code. The CODE (RP) statement and the RP directive behave the same
except when you include them in a DEFINE declaration. That is, the
CODE(RP) statement is part of the DEFINE, but the RP directive executes
immediately and is not part of the DEFINE.