General purpose registers are used to store intermediate results during program execution and to run mathematical operations. The four general purpose registers are EAX, EBX, ECX, and EDX:
- EAX (The accumulator register): Used for basic mathematical operations and to return the value of a function.
- EBX: This is used for nominal storage as needed.
- ECX (The counter register): Used for looping through functions and iterations. It can also be used for general storage.
- EDX (The data register): It is used for higher mathematical operations such as multiplication and division. It also stores function variables while running a program.