@cindex shld, obsolete usage @cindex shrd, obsolete usage @opindex SHL @opindex SAL @opindex SHR @opindex SAR @opindex SHLD @opindex SHRD @opindex Shift logical left @opindex Shift arithmetic left @opindex Shift logical right @opindex Shift arithmetic right @opindex Double-precision shift left @opindex Double-precision shift right @opindex shl @opindex sal @opindex shr @opindex sar @opindex dshl @opindex dshr @multitable {""""""""} {""""""""""} {""""""""""""""""""""""""""""""} {""""""""""""""""""""} @item Intel @tab DJASM @tab Meaning @tab Notes @item """""""" @tab """""""""" @tab """""""""""""""""""""""""""""" @tab """""""""""""""""""" @item SHL @tab shl[bwd] @tab Shift logical left @tab (@pxref{shxd}) @item SAL @tab sal[bwd] @tab Shift arithmetic left @item SHR @tab shr[bwd] @tab Shift logical right @tab (@pxref{shxd}) @item SHR @tab sar[bwd] @tab Shift arithmetic right @item SHLD @tab dshl @tab Double precision shift left @tab No [bwd] suffix. @item SHRD @tab dshr @tab Double precision shift right @tab No [bwd] suffix. @end multitable @anchor{shxd} @subheading Change in Mnemonic Usage Beginning with the version of @code{djasm} released with DJGPP v2.04, the mnemonics @code{shld} and @code{shrd} no longer denote Intel's double-precision shift instructions @code{SHLD} and @code{SHRD}, respectively. The correct mnemonics to use for the double-precision shifts are @code{dshl} and @code{dshr}. @c These instructions do not take a memory operand-size suffix. Any attempt to write @code{shld} or @code{shrd} for a double-precision shift will generate an error message and the correct mnemonic to use (@code{dshl} or @code{dshr}) will be indicated. If you are interested, here is the reason for the change. The convention in @code{djasm} is to specify the memory operand size by appending a @code{b} (byte), @code{w} (word), or @code{d} (double word) suffix to the mnemonic. There was one exception, however: in the version of @code{djasm} released with DJGPP v2.03, the mnemonics @code{shld} and @code{shrd} were used to denote Intel's double-precision left/right shift instructions. This usage was inconsistent with every other instruction that could reference a byte, word, or double word memory operand (under the existing convention these mnemonics would be expected to denote left and right shifts of a double-word memory operand). However, the double-precision shifts had been implemented @emph{before} support was added for basic shifts of memory operands (at the time, only basic shifts of register operands had been implemented). The cleanest solution was to replace the mnemonics used by @code{djasm} for the double-precision shift instructions and reserve @code{shld} and @code{shrd} for basic shifts of a double-word memory operand. At the time this change was made (between v2.03 and 2.04) there were no @file{*.asm} files in the DJGPP @acronym{CVS} tree that used @code{shld} or @code{shrd}. It is possible that someone, somewhere, used @code{shld} or @code{shrd} to code for a double-precision shift, but this seems unlikely. According to the DJGPP mail archives, these instructions were added by @email{bill@@taniwha.org,Bill Currie}, who soon thereafter recognized the impending conflict and redefined the mnemonics in his own version of @code{djasm}. Unfortunately, his changes did not make it into the stock @file{djasm.y} at that time. Furthermore, documentation for @code{djasm} has been minimal, and the only way to know what instructions were supported (and what the mnemonics were) was to inspect @file{djasm.y}, or to inspect source code (such as @file{stub.asm}) for @code{djasm} applications.