GNU Info

Info Node: (nasm.info)Section B.4.283

(nasm.info)Section B.4.283


Next: Section B.4.284 Prev: Section B.4.282 Up: Section B.4
Enter node , (file) or (file)node

B.4.283. `SAL', `SAR': Bitwise Arithmetic Shifts
------------------------------------------------

     SAL r/m8,1                    ; D0 /4                [8086]
     SAL r/m8,CL                   ; D2 /4                [8086]
     SAL r/m8,imm8                 ; C0 /4 ib             [186]
     SAL r/m16,1                   ; o16 D1 /4            [8086]
     SAL r/m16,CL                  ; o16 D3 /4            [8086]
     SAL r/m16,imm8                ; o16 C1 /4 ib         [186]
     SAL r/m32,1                   ; o32 D1 /4            [386]
     SAL r/m32,CL                  ; o32 D3 /4            [386]
     SAL r/m32,imm8                ; o32 C1 /4 ib         [386]

     SAR r/m8,1                    ; D0 /7                [8086]
     SAR r/m8,CL                   ; D2 /7                [8086]
     SAR r/m8,imm8                 ; C0 /7 ib             [186]
     SAR r/m16,1                   ; o16 D1 /7            [8086]
     SAR r/m16,CL                  ; o16 D3 /7            [8086]
     SAR r/m16,imm8                ; o16 C1 /7 ib         [186]
     SAR r/m32,1                   ; o32 D1 /7            [386]
     SAR r/m32,CL                  ; o32 D3 /7            [386]
     SAR r/m32,imm8                ; o32 C1 /7 ib         [386]

   `SAL' and `SAR' perform an arithmetic shift operation on the given
source/destination (first) operand. The vacated bits are filled with
zero for `SAL', and with copies of the original high bit of the source
operand for `SAR'.

   `SAL' is a synonym for `SHL' (see *Note Section B.4.290::). NASM
will assemble either one to the same code, but NDISASM will always
disassemble that code as `SHL'.

   The number of bits to shift by is given by the second operand. Only
the bottom five bits of the shift count are considered by processors
above the 8086.

   You can force the longer (286 and upwards, beginning with a `C1'
byte) form of `SAL foo,1' by using a `BYTE' prefix: `SAL foo,BYTE 1'.
Similarly with `SAR'.


automatically generated by info2www version 1.2.2.9