亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

標(biāo)題: 請(qǐng)問(wèn)code int nums[]={....};和int code nums[]={...}; 有區(qū)別嗎 [打印本頁(yè)]

作者: laopihappy123    時(shí)間: 2020-10-16 20:05
標(biāo)題: 請(qǐng)問(wèn)code int nums[]={....};和int code nums[]={...}; 有區(qū)別嗎
大家好,我查到 code的意思是固化在rom里 ,我想: 那么應(yīng)該是不可寫(xiě)了? 豈不是const了
由此想到了標(biāo)題這個(gè)問(wèn)題

不知道順序的變化是否會(huì)影響代碼,這里的num應(yīng)該是個(gè)常量指針,不可改。。。


作者: angmall    時(shí)間: 2020-10-16 22:18
code 順序的變化是不會(huì)影響代碼的

  1. code

  2. The code memory type may be used for constants and functions. This memory is accessed using 16-bit addresses and may be on-chip or external.

  3. For constants (ROM variables), code memory is limited to 64K. Objects are limited to 64K and may not cross a 64K boundary. Constant variables declared code are located in the CODE memory class.
  4. For program code (functions), code memory is limited to 64K. Program functions are stored in the CODE memory class by default. The code memory type specifier is not required.
  5. Declare code objects as follows:

  6. unsigned char code code_constant;

  7. unsigned int func (void)
  8. {
  9.    return (0);
  10. }

  11. ============================================
  12. The Cx51 Compiler conforms to the ANSI definition of const objects.

  13. Variables declared with the const type qualifier alone are stored in the memory area (data, idata, xdata, and so on) associated with their definition.

  14. Variables you want to locate in ROM must be declared with the code memory type. For example:
  15. code char test[] = "This is a text string";

復(fù)制代碼


作者: laopihappy123    時(shí)間: 2020-10-16 22:56
angmall 發(fā)表于 2020-10-16 22:18
code 順序的變化是不會(huì)影響代碼的

哇塞! 這個(gè)文檔看起來(lái)好像很厲害的樣子 請(qǐng)問(wèn)在哪里可以看到?
作者: angmall    時(shí)間: 2020-10-16 23:44
laopihappy123 發(fā)表于 2020-10-16 22:56
哇塞! 這個(gè)文檔看起來(lái)好像很厲害的樣子 請(qǐng)問(wèn)在哪里可以看到?

這里
https://www.keil.com/support/man/docs/c51/c51_le_code.htm
作者: laopihappy123    時(shí)間: 2020-10-17 00:08
angmall 發(fā)表于 2020-10-16 23:44
這里
https://www.keil.com/support/man/docs/c51/c51_le_code.htm

感恩大佬!




歡迎光臨 (http://www.denmoz.com/bbs/) Powered by Discuz! X3.1