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.
NegW
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  NegW
 
  /* Negate word (2's complement) */
 
  Description
 
  Negates the top stack element and pushes it back onto the stack.
 
  w1 = popW();
  pushW(-w1);
 
  A simple expression such as
 
  if (-wt1 < 0)
 
  generates the NegW instruction.
 
 
                                     -♦-