HP 3000 Manuals

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


HP Pascal/iX Reference Manual

KEEPASMB 

KEEPASMB is an HP Pascal Option.

The KEEPASMB compiler option causes the compiler to leave behind an
assembler source file containing the code for the entire compilation
unit.  This file can usually be run through the assembler to produce the
same object file that the compiler produces directly.

On MPE/iX, the KEEPASMB option produces a file with the formal designator
PASASSM, which is a temporary file by default.  You are recommended to
file-equate this name.  You must file-equate it if the current group
contains more than one compilation unit, or if the resultant assembler
source is too big.  For information on file equations, refer to the
MPE/iX Commands Reference Manual.

On HP-UX, the KEEPASMB option produces a file with the same name as the
source file, except that its suffix is .s instead of .p.

The command line option -S also specifies this option.

Syntax 

$KEEPASMB {ON }$
          {OFF}

Default       OFF

Location      At front.

When you use the LIST_CODE option with KEEPASMB, LIST_CODE turns KEEPASMB
on.

Example 

     $KEEPASMB ON$
     PROGRAM x;
     BEGIN
     END.

The program above produces the following assembly file:

          .SPACE $TEXT$
          .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
          .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
     PROGRAM
     _start
          .PROC
          .CALLINFO CALLER,FRAME=0,SAVE_SP,SAVE_RP
          .ENTRY
          STW    2,-20(0,30)  ;offset 0x0
          LDO    48(30),30    ;offset 0x4
          STW    0,-4(0,30)   ;offset 0x8
          .CALL   ;

          BL   P_INIT_ARGS,2  ;offset 0xc
          NOP     ;offset 0x10
          .CALL   ;
          BL   U_INIT_TRAPS,2 ;offset 0x14
          NOP     ;offset 0x18
     $00002711
          .CALL
          BL   P_TERMINATE,2  ;offset 0x1c
          NOP     ;offset 0x20
          NOP     ;offset 0x24
          .CALL
          BL   U_EXIT,2       ;offset 0x28
          NOP        ;offset 0x2c
          LDW   -68(0,30),2   ;offset 0x30
          BV   0(2)  ;offset 0x34
          .EXIT
          LDO   -48(30),30    ;offset 0x38
          .PROCEND ;ln=24,25,26;
          .SUBSPA $UNWIND$,QUAD=0,ALIGN=8,ACCESS=44
          .WORD PROGRAM
          .WORD PROGRAM+56 ; = 0x38
          .WORD 24 ; = 0x18
          .WORD 6 ; = 0x6
          .SUBSPA $RECOVER$,QUAD=0,ALIGN=4,ACCESS=44
          .SPACE $PRIVATE$
          .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
          .SUBSPA $GLOBAL$,QUAD=1,ALIGN=8,ACCESS=31
     M$1
          .ALIGN 8
          .BLOCKZ 8
          .SPACE $TEXT$
          .SUBSPA $CODE$
          .EXPORT PROGRAM,PRIV_LEV=3
          .EXPORT _start,PRIV_LEV=3
          .IMPORT P_INIT_ARGS,CODE
          .IMPORT U_INIT_TRAPS,CODE
          .IMPORT P_TERMINATE,CODE
          .IMPORT U_EXIT,CODE
          .END



MPE/iX 5.0 Documentation