I am using C++ to write a program for a u-processor circuit. In trying to control hardware, I have things mapped to specific memory addresses. I know I will have to use pointers to point to these locations, How can I assign specific numbers to pointers to represent these memory locations. If I directly assign a number value to a pointer,
ie
1 2 3
unsignedint * mypointer;
mypointer = 0x900E0000;
I get compile errors of: (a value of type "unsigned int" cannot be assigned to an entity of type "unsigned int *")
Furthermore, what I really need to do is assign mnemonic constants to the address values for easier readability. something like:
What you wan to do there is mypointer = (unsignedint *)0x900E0000;
However, modern OSs crash programs that try to access memory that doesn't belong to them.