Page 1 of 1
Important Registers
Posted: Tue Jul 22, 2003 6:56 pm
by Tux
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.
Re:Important Registers
Posted: Tue Jul 22, 2003 7:17 pm
by Slasher
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
Posted: Tue Jul 22, 2003 9:49 pm
by Solar
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...
Re:Important Registers
Posted: Wed Jul 23, 2003 3:03 am
by jamesb.au
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.
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.
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
Posted: Wed Jul 23, 2003 10:53 am
by Tux
Thanks, I checked upon a TSS and I got a nice one. It has all I need. Thanks.