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.
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 */
 
 
                                     -♦-