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
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With