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.
CvtBW
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  CvtBW
 
  /* Convert byte to word (sign extended) on top of stack. */
 
  Description
 
  Pops the word on top of the stack, sign extends the least significant
  byte, and pushes the resulting word back onto the stack.
 
  Pseudocode equivalent:
 
  b = (char) popW();
  pushW( (int) b);
 
  The following example is one that generates this instruction:
 
  w = (int) b;             /* generates a CvtBW */
 
 
                                     -♦-