I’m writing a stack class in C# that behaves like an x86 stack (word padding, ability to push and pop different sized “objects”, etc.)
If I call Push<int>(0x01234567), the ASCII art below depicts what should happen. Is this big-endian or little-endian.
| 0x01 | 0x23 | 0x45 | 0x67 | ---- Low Address (New top)
| | | \----> 0x67
| | \-----------> 0x45
| \------------------> 0x23
\-------------------------> 0x01
---- High Address (Orig top)
The least significant byte (0x67) is in the lowest address, so little endian.