问题
Through the IDA disassembler I've reached this address:
0010FD74 00 00 00 00 00 00 03 00 00 00 00 00 82 03 80 02
Now I need, given the address to get particular bytes; for example the 7th position where there is "03". I've tried using C language to do this:
char *dummycharacter;
*dummycharacter = *(char*)0x10FD74;
Now if I try to access 7th value with this:
dummycharacter[6]
I don't get 0x03…where am I going wrong?
回答1:
You're trying to assign the value dummycharacter
points to (which is pretty much nowhere, since it's not initialized). Try dummycharacter = (char*)0x10FD74;
.
来源:https://stackoverflow.com/questions/27641794/get-specific-byte-from-m68k-ram-address-with-c-language