Get specific byte from M68k ram address with C language

馋奶兔 提交于 2019-12-23 20:35:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!