Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the width of a stack in an Intel IA32 architecture?

Tags:

stack

assembly

Is the width of the stack 8 bit wide for IA32 architecture and for all types microprocessors/microcontrollers.

I am currently reading http://ozark.hendrix.edu/~burch/csbsju/cs/350/handouts/x86.html about assembly language. At the explanation of "call" it says that the stack pointer is being decreased by 4 and the program counter is push into the stack. Does this mean that the width of the stack buffer is of 8bit wide because the program counter is 32 bit long? I tried finding it in the intel IA32 architecture software development manual but can't seems to confirm it.

Thanks Sziang

like image 522
sziang Avatar asked Jun 30 '10 04:06

sziang


People also ask

How many 32 bits data register are available in IA-32 architecture?

The IA-32 architecture provides ten 32-bit and six 16-bit registers. These registers are grouped into general, control, and segment registers. The general registers are further divided into data, pointer, and index registers as shown in Figures 4.2 and 4.3.

Which way does the stack grow on x86?

Intel's x86 architecture places its stack "head down". It starts at some address and grows down to a lower address. Here's how it looks: So when we say "top of the stack" on x86, we actually mean the lowest address in the memory area occupied by the stack.

What is Intel 64 architecture?

Intel® 64 architecture delivers 64-bit computing in embedded designs when combined with supporting software. Intel® 64 architecture improves performance by allowing systems to address more than 4 GB of both virtual and physical memory.

What is IA-32 architecture?

IA-32 Architecture refers to systems based on 32-bit processors generally compatible with the Intel Pentium® II processor, (for example, Intel® Pentium® 4 processor or Intel® Xeon® processor), or processors from other manufacturers supporting the same instruction set, running a 32-bit operating system.


1 Answers

In the IA32 architecture, memory is addressed in bytes.

Hence, in order to put another 4 bytes on the stack, you need to shift your stack pointer by 4.

like image 94
Anon. Avatar answered Oct 02 '22 11:10

Anon.