>>13
1/10
Those are not general purpose registers, most can't be used to store general-purpose data. They represent the CPU's status in various forms.
EIP - (extended) instruction pointer
EFLAGS - (extended) flags
EIP points to the current instruction, so you can't really use it to meaninfully store anything without crashing the thread.
cs-ss - segment regs, set by the OS or programmer, again they point to memory or descriptors.
TSS - current task status register.
MSW's - not portable between CPUs, local cpu-specific flags and configuration (can be very useful for some specific things)
GDTR - global descriptor table register
IDTR - interrupt descriptor table register
They point to those descriptor tables.
CR0-7 - protected mode configuration registers.
DR0-7 - debug registers. some contain configuration, and 4 of them contain the hardware breakpoint addresses. Can actually be used to store arbitrary data, but you'll have to set some handlers to ignore random int1's that would occur if the breakpoints are hit!
Those registers aren't hidden from casual programmers, they're just special registers with special purposes. They can be modified by the programmer through a variety of means (some need you to run code in ring0, so a driver is required), others (like drx, eip, eflags) are the current processes' status, so they can be modified easily, how? eip - any instruction changes eip (increment by size of instruction upon execution), jumps change it explicitly (jmp eax would be the same as mov eip, eax, except jmp eax makes a lot more sense), retn pops it from the stack, and so on (there are many other instructions tha change eip). eflags can be changed by a large variety of instructions, like arithmethic ones, and specific flags can be checked by jumps and other instructions. eflags can also be explicitly set by using popfd (and saved to stack by pushfd). Debug registers can't be set directly in ring3 (can be done in ring0), however operating systems provide facilities to set them (along with ANY register), for example in Win32, it can be done by using exception handlers or the
SetContext API.