Proccessor Registors...

This is a discussion on Proccessor Registors... within the C++ Programming forums, part of the General Programming Boards category; I would really love to know what these registers mean (one by one in a list), as in what thier ...

  1. #1
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Lightbulb Proccessor Registors...

    I would really love to know what these registers mean (one by one in a list), as in what thier functions are, I only beleive I know:

    ah + al - x86 hardware interrupt.

    Well... I would really love it if someone would list what all of them do:

    eax
    ebx
    ecx
    edx
    esi
    edi
    ax
    bx
    cx
    dx
    si
    di
    al
    ah
    bl
    bh
    cl
    ch
    dl
    dh

    Thanks in advance, SPH!

    P.S. oh, and also it would be wonderfull if someone would give me a list of the memory locations that corresond to things as well, I only know one: 0xA0000000L, video memory, and I know 0x0000001 and up to somewhere is memory, but I really need this info in full, thanks, SPH
    Last edited by minime6696; 09-30-2001 at 01:12 PM.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    >I really need this info in full, thanks, SPH

    This is more than any board could accomplish.
    Get a book on Assembly.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Unregistered
    Guest

    Lightbulb registers

    Here is what I know....

    EAX is a 32 bit register, and it is the same register as AX which was the "old" 16 bit register for the x86. The E stands for "Extended" I think. AH and AL are the high and low order bits of EAX, and ax on a 16 bit system is the same as AL with the 32 bit processor. This was all for backward compatibility type reasons. All these rules apply to all the other registers too.

    So EAX, EBX, ECX, EDX are all general purpose registers, but each is optimized for specific purposes. EAX is the general purpse, put anything here register. It is optimized for arithmetic instructions. Of special significance is that when making function calls in c, the return value is stored in EAX. So when the function returns, EAX is never pushed and never popped, because you want the value of it to change...unless you have a void function(). EBX is optimized to hold addresses. ECX is a counter register, ie for loops, and I think there is some auto-incrementing features to this if you use some of the CISC-y instructions for looping. EDX is optimized for ....uh...gotta look at the book for this one...oh right..it is used for multiply and divide instructions..."for example, EDX holds the high 32 bits of the product" in a multiply instruction.
    ESI and EDI are string registers, and they stand for destination index and source index. These two are used with the string movement instructions, so you let esi point to the source string address, and edi point to the destination addresss.

    There are tons of other assembly language things to learn, this is just the surface on top of the surface. Very interesting topic though, I enjoyed the class a lot when I took it in school.

    Good Luck.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21