and how do I code InterlockedExchangeAdd64 in In 32-bit x86 assembly ?
InterlockedExchangeAdd64 is a function that atomically adds a 64-bit integer to a target variable and returns the original value of the target variable. In 32-bit x86 assembly, you can implement this using a combination of the LOCK prefix, CMPXCHG8B instruction, and ADD instruction. Here's an example implementation in x86 assembly:
assembly