LOCK
Usage: LOCK instruction,dest,src Modifies flags: None
This instruction is a prefix that causes the CPU assert a bus lock signal during the execution of the next instruction. Used to avoid two processors from updating the same data location. This should only be used to lock the bus prior to instructions in following list.
Lock Prefix
LOCK ; F0
LOCK asserts a LOCK# signal for the following Instructions:
ADD, ADC, AND, BTC, BTR, BTS, CMPXCHG, CMPXCH8B, DEC, INC, NEG, NOT, OR, SBB, SUB, XOR, XADD, and XCHG
The Destination Operand must be a Memory Reference.
Insures that the processor has exclusive use of any shared memory while the signal is asserted (In a multiprocessor environment).
Examples:
lock bts D$edi 1
lock add D$eax 010
lock cmpxcg8B Q$esi