P-Code Instructions (pcode.hlp) (Table of Contents; Topic list)
AddWP
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  AddWP
 
  /* Add scaled integer word to pointer */
 
  Description
 
  Performs the addition of a scaled integer to a pointer. This requires
  the multiplication of the integer by the number of bytes per word before
  the addition takes place.
 
  Pseudocode equivalent:
 
  w2 = PopW();
  w1 = PopW();
  PushW(w1 + w2 * 2);
 
  This can be generated by assigning an integer value to an element of an
  array of integers, as follows:
 
  for( iw = 0; iw < 6; iw++ )
  rgw[iw] = iw                /* generates AddWP */
 
 
                                     -♦-