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.
PushIP<n>
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  PushIP<n>
 
  /* Push value for instruction pointer onto stack using pc-relative */
  /* address <n>. */
 
  Possible Instructions
 
  PushIPb, PushIPw
 
  See: P-Code Operands
 
  Description
 
  Implements the switch statement by pushing the target address of a break
  statement. The address is relative to the p-code instruction pointer and
  should be the first instruction following the case jump table.
 
  Pseudocode equivalent:
 
  // pc = p-code instruction pointer
 
  // if <n> is a byte <b>
 
  PushW(pc + (<b> & 0xff00))
 
  // if <n> is a word w
 
  PushW(pc + w)
 
  This instruction is generated by an example like the following:
 
  switch (exp)   /* generates a PushIP */
  {
  case 1:
  break;
  }
 
 
                                     -♦-