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.
Incf<t><n>
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  Incf<t><n>
 
  /* Increment frame variable by 1 */
 
  Possible Instructions
 
  IncfBb, IncfBw, IncfW0...IncfW8, IncfWb, IncfWw
 
  See: P-Code Data Types
       P-Code Operands
 
  Description
 
  Increment the frame variable by 1, while the preincremented value is
  stored in the p-code temporary register t.
 
  Pseudocode equivalent:
 
  // when <n> is a implied number #
 
  t = *(bp - fs - (2 *  #));
  *(bp - fs - (2 * #))++;
 
  // when <n> is a byte <b>
 
  t = *(bp + (2 * (<b> | 0xff00)));
  *(bp + (2 * (<b> | 0xff00)))++;
 
  // when <n> is a word w
 
  t = *(bp + (2 * w));
  *(bp + (2 * w))++;
 
  Using the increment operator (++) in C generates this instruction.
 
 
                                     -♦-