Click to See Complete Forum and Search --> : Registers


kakuustaad
02-03-2002, 10:14 AM
Is there any good book which explain registers in a well organized and detailed manner ? + easy to comprehand ? in html format ?
or some material which can help me understanding the main purpose of different kind of available registers on x86 platforms ?

TacKat
02-03-2002, 11:28 AM
Try http://webster.cs.ucr.edu/Page_asm/ArtOfAsm.html Quick summary:

There are four 32-bit general purpose registers, eax, ebx, ecx and edx. You can access the lower 16 bits of each of these by using ax, bx, cx and dx. The upper 8 bits of that can be accessed through ah, bh, ch and dh. Lower 8 bits are al, bl, cl and dl.

Each of the general purpose registers also has a semi-specific purpose. For instance, EAX is used in the add and sub ops, ECX for loop counting.

ESI and EDI are source index and destination index. When dealing with string instructions, ESI points to the current position in the string, EDI points to the destination position in the other string.

EBP is the base pointer usually used for changing stack frames and just general pointing. ESP is the stack pointer. It points to the current position in the stack and as such is incremented or decremented by the pop and push ops.

CS, DS, SS and ES are all segment pointers. In 16-bit coding they can all point to different places. CS to the code segment, DS to data, SS to stack, ES is an extra. In 32-bit programming, all the segment pointers point to the same place.

EIP is the instruction pointer. It points to the next instruction to be executed.

slapNUT
02-03-2002, 01:11 PM
Try going here (http://developer.intel.com/design/litcentr/index.htm) then scroll down to the processor you are interested in. Click on the pull-down list for a list of manuals available. There's virtually Gigabytes of info available.