来个思考题!

8 views
Skip to first unread message

julyon

unread,
Aug 5, 2009, 9:39:45 PM8/5/09
to RTEMS Chinese User Group
void _MOVD2(int in, int * out){
memcpy((char *)out, (char *)&in, sizeof(int));
}


void _MOVD(int in, int * out){
*out = in;
}

char a[5];

int i = 0x12345678;

_MOVD(i, &a[1]);

请问大家,a[5]上的排列情况?如果换成把_MOVD()换成_MOVD2(),情况又怎样呢?
采用ARM处理器,存储为大端模式。如果是X86下呢?

excalibur.wu

unread,
Aug 5, 2009, 9:49:38 PM8/5/09
to rtems-chinese-user-group
刚接触嵌入式不久,只能围观一下,等待强人解答~
 
 
2009-08-06

excalibur.wu

发件人: julyon
发送时间: 2009-08-06  09:39:54
收件人: RTEMS Chinese User Group
抄送:
主题: 来个思考题!

xu ray

unread,
Aug 8, 2009, 7:58:11 AM8/8/09
to rtems-chines...@googlegroups.com
有趣...
近来准备面试的铜子可以看看

2009/8/6 excalibur.wu <excali...@gmail.com>:

--
Thanks & Best Regards!

Ray, Xu

Reply all
Reply to author
Forward
0 new messages