HP 3000 Manuals

STATEMENT_NUMBER [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation


HP Pascal/iX Reference Manual

STATEMENT_NUMBER 

STATEMENT_NUMBER is an HP Pascal Option.

When the STATEMENT_NUMBER compiler option is ON, the compiler generates a
special instruction to identify a code sequence with its corresponding
Pascal statement.

Syntax 

$STATEMENT_NUMBER {ON }$
                  {OFF}

Default       OFF

Location      Anywhere.

The special instruction that the compiler generates is a LoaD Immediate
Left (LDIL) instruction with destination register R0.  It is equivalent
to a No OPeration (NOP) instruction.  The immediate field contains the
statement number.  When the debugger displays the mnemonic for the
instruction, it shows the statement number instead of the LDIL
instruction.


NOTE The STATEMENT_NUMBER compiler option is ignored when optimization is in effect.
Example $STATEMENT_NUMBER ON$ $LIST_CODE ON$ PROGRAM a (output); BEGIN writeln('Hi, mom!'); END. The listing for the preceding program is: 0 1.000 0 $statement_number on$ 0 2.000 0 $list_code on$ 0 3.000 0 program x; 0 4.000 0 var 0 5.000 0 i,j,k : integer; 3 6.000 1 begin 3 7.000 1 i := 0; 4 8.000 1 j := i; 5 9.000 1 k := j + i; 6 10.000 1 end. PROGRAM 0 STW 2,_20(0,30) 34 LDW 12(0,27),31 4 LDO 48(30),30 38 LDW 16(0,27),19 8 STW 0,-4(0,30) 3C ADDO 31,19,20 C BL P_INIT_ARGS,2 40 STW 20,8(0,27) 10 NOP 00002711 14 BL U_INIT_TRAPS,2 44 BL P_TERMINATE,2 18 NOP 48 NOP 1C *** Stmt 3 4C NOP 20 STW 0,16(0,27) 50 BL U_EXIT,2 24 *** Stmt 4 54 NOP 28 LDW 16(0,27),1 58 LDW -68(O,30),2 2C STW 1,12 (0,27) 5C BV 0(2) 30 *** Stmt 5 60 LDO -48(30),30


MPE/iX 5.0 Documentation