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.
StifQW<b>
                                              Up Contents Index Back
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  StifQW<b>
 
  /* Store indirect bit field into word using far pointer. */
 
  Description
 
  Pops the far pointer and a word from the top of the stack and merges the
  bit field contained within the word with the contents of the word stored
  at the location referenced by the far pointer.
 
  The one byte parameter <b> specifies the shift count (0-15) and the
  width (minus 1) of the bit field (0-15).
 
  Pseudocode equivalent:
 
  int far *lpw;
  unsigned int w, width, shift, mask;
  lpw = PopL();
  w = PopW();
  width = (<b> >> 4) + 1;
  shift = (<b> & 0xf0);
  mask = ~((~(0xffff << width)) << shift);
  *lpw = (*lpw & mask) | ((w << shift) & mask);
 
 
                                     -♦-