Registers

Registers are in RAM and are built into the CPUs. As volatile memory they are fast and are where instructions are loaded when programs execute.

32 Bit Platforms have 8 registers, 64 bit have 16.

32 bit architecture uses a naming convention that starts with E, 64 starts with R.

32 bit have 4 byte long registers, 64 have 8 byte.

The most notable registers are as follows: (Named in 32 bit convention)

  • EAX - multipurpose, often to return values
  • EBX - often base pointer for data section
  • ECX - often a counter
  • EDX - often an I/O pointer
  • ESI - "source index"
  • EDI - "destination index"
  • EBP - base pointer
  • ESP - stack pointer

I'll explain what these all mean in the next few modules.

In addition to General Purpose registers we have EIP (32 bit) and RIP (64 bit) instruction pointers.

There are also registers of registers named EFLAGs, but we can ignore them for now.

Task:

  • Submit text discussing anything that you struggled with and didn't understand, and what you did to overcome that problem. If you still don't understand, tell us what specifically you did not understand.