As long as I save and restore ESP and don't use any CALLs nothing will interrupt my proc and stuff up because of ESP?
This was a problem in DOS (INTs interrupting your proc) but Win32 doesn't have this problem does it?
Yu can use ESP without any problems in win32 as long as you preserve it somewhere, either a global variable or in another type of register. For the obvious reason you cannot use the stack while ESP is in use elsewhere.
As I surmised. Thanks.
instead of have your timecriticalcode that is speedup by using ESP in main or a proc and need to restore stack alot and easily a cause to crash the app , put that code inside a workerthread which the OS keeps with its own separate set of general regs, you can have the rest of your app do all apicalling and none-timecritical-code