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.
Sar<t>
                                              ◄Up► ◄Contents► ◄Index► ◄Back►
──P-Code Instructions───────────────────────────────────────────────────────
 
  Syntax
 
  Sar<t>
 
  /* Shift Arithmetic Right signed integer */
 
  Possible Instructions
 
  SarW, SarL
 
  See: ◄P-Code Data Types►
 
  Description
 
  Pops two elements from the stack and does an arithmetic right shift,
  shifting the second popped element right by the value of the first
  popped element.
 
  Pseudocode equivalent:
 
  w2 = PopW();
  t1 = Pop<t>();
  Push<t>(t1 >> w2);
 
  This can be generated by the following:
 
  wT = wT1 >> 2;           /* generates SarW */
 
 
                                     -♦-