P-Code Instructions (pcode.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LdfA<n>
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  LdfA<n>
 
  /* Load Address of Frame Variable */
 
  Possible Instructions
 
  LdfA0...LdfA9, LdfAb, LdfAw
 
  See: P-Code Operands
 
  Description
 
  Loads the near address of the specified local variable or function
  parameter onto the stack. A negative value for <n> addresses a local
  variable, and a positive value addresses a function parameter.
 
  NOTE: When LdfAb is generated, the byte parameter is assumed to be a
        negative value. Thus, it refers only to local variables.
 
  // when <n> is a implied number #
 
  PushW(bp - fs - (2 *  #));
 
  // when <n> is a byte <b>
 
  PushW(bp + (2 * (<b> | 0xff00)));
 
  // when <n> is a word w
 
  PushW(bp + (2 * w));
 
  The instruction could be generated by assigning a pointer to a
  variable's address. For example,
 
  lp1 = &lTest;            /* generates LdfA<n> */
 
 
                                     -♦-