Last week I had an interview. I was asked to write a macro to read a memory location (say 0x2000).
I wrote the code in normal programming, but I could not write the macro.
Please help me figure out how to write the macro for the code below:
char *address = (char*)0x2000; // address is a pointer to address 3000 char val
*address = 36; // write 36 to 8 bit location at address
val = *address; // read 8 bit value from address
Something like this?