[英]Get specific byte from M68k ram address with C language
Through the IDA disassembler I've reached this address: 通过IDA反汇编程序,我已经到达了这个地址:
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".
例如,存在“03”的第7个位置。 I've tried using C language to do this:
我尝试使用C语言来做到这一点:
char *dummycharacter;
*dummycharacter = *(char*)0x10FD74;
Now if I try to access 7th value with this: 现在如果我尝试使用以下方法访问第7个值:
dummycharacter[6]
I don't get 0x03…where am I going wrong? 我没有得到0x03 ......我哪里错了?
You're trying to assign the value dummycharacter
points to (which is pretty much nowhere, since it's not initialized). 您正在尝试将值
dummycharacter
分配给(这几乎没有任何地方,因为它未初始化)。 Try dummycharacter = (char*)0x10FD74;
尝试
dummycharacter = (char*)0x10FD74;
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.