I am looking to implement a stack in a C program with which I was thinking about using an unsigned char * as a base. This would be the bottom of the stack and all other registers and information would be a displacement of this address. However, I cannot seem to understand how to do this properly. I was thinking of doing something like this...
//Info: Store 20 at address x0000007c
unsigned char * base = 0;
int address = x0000007c;
(base + address) = 20;
The C compiler does not like this so I was wondering how to fix this or do something similar without losing my pointer.