Gary Herron wrote: > No NO NO! The only way to increment a variable in memory is > through a three step process: > > Load a register from a memory location > Increment the register > Store the value back into memory.
I suggest you read "Intel 64 and IA-32 Architectures Software Developer's Manual" (2A, Instruction Set Reference A-M). INC and DEC can have register *or* memory location as operand, and can be executed atomically even in multiprocessor environments (LOCK prefix). > Ages ago, there were architectures that would do an increment on a > memory location in an atomic way, but with the current (RISC) > architectures these are three separate operations. That may be true for RISC architectures. Unfortunately, all 8086 based CPUs are CISC. Regards, Björn -- BOFH excuse #277: Your Flux Capacitor has gone bad. -- http://mail.python.org/mailman/listinfo/python-list