13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AMD64 Technology 24594 Rev. 3.10 February 2005DEC Decrement by 1Subtracts 1 from the specified register or memory location. The CF flag is notaffected.The one-byte forms of this instruction (opcodes 48 through 4F) are used as REXprefixes in 64-bit mode. See “REX Prefixes” on page 14.The forms of the DEC instruction that write to memory support the LOCK prefix. Fordetails about the LOCK prefix, see “Lock Prefix” on page 10.To perform a decrement operation that updates the CF flag, use a SUB instructionwith an immediate oper<strong>and</strong> of 1.Mnemonic Opcode DescriptionDEC reg/mem8 FE /1DEC reg/mem16 FF /1DEC reg/mem32 FF /1DEC reg/mem64 FF /1Decrement the contents of an 8-bit register or memory locationby 1.Decrement the contents of a 16-bit register or memory locationby 1.Decrement the contents of a 32-bit register or memory locationby 1.Decrement the contents of a 64-bit register or memory locationby 1.DEC reg16DEC reg3248 +rw48 +rdDecrement the contents of a 16-bit register by 1.(See “REX Prefixes” on page 14.)Decrement the contents of a 32-bit register by 1.(See “REX Prefixes” on page 14.)Related <strong>Instructions</strong>INC, SUB138 DEC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!