$ nasm -v NASM version 2.16rc0 compiled on Sep 6 2022 $ cat test.asm xchg word [0], ax xchg ax, word [0] lock xchg word [0], ax lock xchg ax, word [0] $ nasm test.asm test.asm:4: warning: instruction is not lockable [-w+lock] $ nasm test.asm -l /dev/stderr 1 00000000 87060000 xchg word [0], ax 2 00000004 87060000 xchg ax, word [0] 3 00000008 F087060000 lock xchg word [0], ax test.asm:4: warning: instruction is not lockable [-w+lock] 4 0000000D F087060000 lock xchg ax, word [0] 4 ****************** warning: instruction is not lockable [-w+lock] $