I am writing a Task Manager, the MT code is 89% done. I just need to complete the TM. Anyway, I want to know what registers I have to backup when switching tasks.
I know asm, but I am a little confused on the registers.
Important Registers
Re:Important Registers
You need to back up all registers. imagine performing an addition where part of the numbers are lost ie not stored then the result wouldn't be accurate. SO save all register.
Re:Important Registers
Basically depends on what CPU you're on, no?
I assume it's IA-32. You might want to read about and understand something called TSS and how it works. You should also read about and understand FPU, MMX, and SSE registers and how you can detect if they have been used by the application...
I assume it's IA-32. You might want to read about and understand something called TSS and how it works. You should also read about and understand FPU, MMX, and SSE registers and how you can detect if they have been used by the application...
Every good solution is obvious once you've found it.
Re:Important Registers
I highly recommend the Intel architecture manuals. There are 4 of them, the one on optimisation of code is not strictly necessary, but the general architecture, instruction set reference and system programming guide are invaluable. Go to developer.intel.com and to the Pentium 4 pages, look for manuals, and place your order. They are free, even postage is free The P4 manuals are the most up to date, and point out differences between the original Pentium, Pentium Pro, P6 family (PII, Celeron, PIII) and P4 and Xeon processors.Tux wrote: I am writing a Task Manager, the MT code is 89% done. I just need to complete the TM. Anyway, I want to know what registers I have to backup when switching tasks.
I know asm, but I am a little confused on the registers.
Here is a link: http://developer.intel.com/design/pentium4/manuals/ - you can download them as PDFs, or place an order for hard copies.
Order hard copies of the manuals from:
http://developer.intel.com/design/penti ... index2.htm
Re:Important Registers
Thanks, I checked upon a TSS and I got a nice one. It has all I need. Thanks.