完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
当目标存储器块位于零页面时,该地址通常从0x0到0xff。例如,如果目标存储器起始地址是0x0,则memory()将内容从0x100复制到地址。 memory()反汇编指令如:
LDW X,& sharpLength 循环:LD A,(scr + X) LD(dst + X),A DECW X. JRNE循环 RET'scr'和'dst'的值是存储块起始地址1之前的地址。例如如果memcpy()的'destination parameter'的起始地址是0x80,那么'dst'应该是0x7f,如果它的起始地址是0x0,'dst'将是0xff,那么内容将复制到内存从0x100。 我认为这应该是一个编译器问题。 #stm8-assembly #memcpy 以上来自于谷歌翻译 以下为原文 When the destination memory block is locate in zero page which the address is often rang from 0x0 to 0xff. For instance, if a destination memory start address is 0x0, the memory() will copy the contents to address from 0x100. The memory() disassembly instructions like: LDW X, &sharpLength loop: LD A, (scr + X) LD (dst + X), A DECW X JRNE loop RETThe value of 'scr' and 'dst' is the address before 1 of start address of memory block. e.g. If the start address of 'destination parameter' of memcpy() is 0x80, then the 'dst' should be 0x7f, and if the start address of it is 0x0, the 'dst' will be 0xff, then the contents will copy to the memory from 0x100. I thinks this should be a compiler issue. #stm8-assembly #memcpy |
|
相关推荐
3个回答
|
|
你好,
什么编译器? 请发布一个显示问题的最低C代码,以便我们可以重现它。 问候, 卢卡 以上来自于谷歌翻译 以下为原文 Hello, what compiler? Please post a minimum C code that shows the problem so that we can reproduce it. Regards, Luca |
|
|
|
嗨卢卡,
附加的stvd演示项目和捕获图像描述了在我的环境中运行的结果。 环境: Win10 STVD:版本4.3.10 宇宙:CxSTM8 4.3.5 以上来自于谷歌翻译 以下为原文 Hi Luca, Attached stvd demo project, and a capture image descripts the result of running in my environment. Environment: Win10 STVD: version 4.3.10 Cosmic: CxSTM8 4.3.5 |
|
|
|
你好,
编译器使用地址0来指示NULL指针值,这意味着有一些事情你无法用它来做,包括使用memcpy。 我建议在你的数组之前声明另一个变量,这样它就不再从0开始了,你可以以任何你想要的方式安全地访问它,但是如果你绝对需要在地址0使用memcpy你可以编写自己的版本它并使用它而不是默认的。 问候, 卢卡(宇宙) 以上来自于谷歌翻译 以下为原文 Hello, the address 0 is used by the compiler to indicate the NULL pointer value, and that implies that there are a few things you cannot do with it, including using memcpy. I would suggest to declare another variable before your array, so that it does not start at 0 anymore and you can access it safely in whatever way you want, but if you absolutely need to use memcpy at address 0 you can write your own version of it and use it instead of the default one. Regards, Luca (Cosmic) |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2913 浏览 1 评论
3292 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1876 浏览 1 评论
3728 浏览 6 评论
6140 浏览 21 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
28浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
22浏览 5评论
17浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
17浏览 5评论
stm32mp135使用官方SDK交叉编译工具链,编译的时候却找不到头文件怎么解决?
30浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-3-14 08:48 , Processed in 0.520144 second(s), Total 49, Slave 43 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191