TAL Programmer's Guide
INNERLIST Listing
Compiler Listing
096254 Tandem Computers Incorporated 15–7
Figure 15-4 shows a local map that corresponds to the following hash procedure:
INT PROC compute_hash (name, table_len);
INT .name;
INT(32) table_len;
BEGIN
INT int_table_len := $INT (table_len);
INT hash_val := 0;
USE name_index;
USE name_limit;
name_limit := name.<8:14>;
FOR name_index := 0 TO name_limit DO
hash_val := ((hash_val '<<' 3) LOR
hash_val.<0:2>) XOR name[name_index];
DROP name_index;
DROP name_limit;
RETURN $UDBL($INT (hash_val '*' 23971)) '\'
int_table_len;
END; !compute_hash
Figure 15-4. Local Map
Addressing Relative
Identifier Class Type Mode Address
HASH_VAL Variable INT Direct L+002
INT_TABLE_LEN Variable INT Direct L+001
NAME Variable INT Indirect L-005
TABLE_LEN Variable INT(32) Direct L-004
INNERLIST Listing If the INNERLIST and LIST directives are in effect, the compiler lists the instruction
mnemonics generated for each statement after that statement. If optimization is
performed, the compiler first lists the original code and then reports “Optimizer
replacing the last n instructions” and lists the optimized code.
Figure 15-5 shows a sample INNERLIST listing that corresponds to the previous hash
procedure.