P-Code Instructions (pcode.hlp) (Table of Contents; Topic list)
Stg<t><n>
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  Stg<t><n>
 
  /* Store value to global address */
 
  Possible Instructions
 
  StgW0...StgW7, StgWb, StgLb, StgR, StgD, StgT
 
  See: P-Code Data Types
       P-Code Operands
 
  Description
 
  Transfers the value on top of the stack to the specified global variable
  and pops it off the stack. The address of the global variable is found
  relative to the current procedure (for Stg<t>#) or the program segment
  (for Stg<t>b).
 
  Pseudocode equivalent:
 
  **(prgSeg + <n>) = Pop<t>();     or
  **(prgProc + <n>) = Pop<t>();
 
  If the index <n> is specified as an immediate operand, then the global
  variable address can be either near or far. The decision is made by the
  compiler, and implemented at run time using a range check on the index.
 
  Assigning a value to a global variable generates this instruction:
 
  fGlobal = 10;       /* generates StgW<n> */
 
 
                                     -♦-