home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / TASMSWAN.ZIP / SHIFT.ASM < prev    next >
Assembly Source File  |  1989-07-10  |  431b  |  34 lines

  1. %TITLE  "Shift instruction demo"
  2.  
  3.     IDEAL
  4.     DOSSEG
  5.     MODEL    small
  6.     STACK    256
  7.  
  8.     DATASEG
  9.  
  10. exitCode    DB    0    ;if you want comments
  11. operand        DB    0AAh    ; BUY the book
  12.  
  13.     CODESEG
  14.  
  15. Start:
  16.     mov    ax,@data
  17.     mov    ds,ax
  18.  
  19.     shl    [operand],1
  20.     shr    [operand],1
  21.     rol    [operand],1
  22.     ror    [operand],1
  23.     rcl    [operand],1
  24.     rcr    [operand],1
  25.     sal    [operand],1
  26.     sar    [operand],1
  27.  
  28. Exit:
  29.     mov    ah,04Ch
  30.     mov    al,[exitCode]
  31.     int     21h
  32.  
  33.     End     Start
  34.