Hi,
I'm trying to make my program read the content at a known memory address as fast as it can. I tried declaring that memory location as a variable (say 'aaaaa') normally as below:
unsigned int * aaaaa = (unsigned int *) 0xA0000008;
It compiled and retrieved the memory content at 0xA0000008 properly for me, except it took many assembly codes. This is because aaaaa is mapped to an internal code (say '012345') by my compiler. When running, 012345 is loaded into a CPU register, then the register content is used to get the memory address 0xA0000008, then the memory content is read from memory location 0xA0000008. (I read the assembly file generated by the compiler).
I would like the compiler to map aaaaa to 0xA0000008 instead, so that when running aaaaa (i.e. 0xA0000008) can be loaded into the CPU register, then the memory content pointed to by the register can be read right away, skipping one level of indirection.
Does anybody know how to write the C codes to get such effect?
Look forward to everybody's replies.
CCHMA