Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the sal command

Status
Not open for further replies.

sseleulc

IS-IT--Management
Dec 11, 2000
1
0
0
US
if the ax register has a dec. value of 16 how do i use the SAL command to cause the ax register to zero out
 
sal ax,16

Take note however that the instruction sal behaves differently on the 8086 versus later versions (80186 and onwards only allow shift counts of 31 or less. If you input a higher number, only the 5 LSig bits will be used).
8086's will except shift counts up to 255. On an 8086 you can only enter shift counts greater than 1 if the shift count is on cl (As opposed to an immediate value) like below

mov cl, 16
sal ax, cl

This will also zero ax:

xor ax,ax


Kim_Christensen@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top