⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fetchoverlap.c

📁 sdcc是为51等小型嵌入式cpu设计的c语言编译器支持数种不同类型的cpu
💻 C
字号:
/* Test to reproduce a bug in the z80 compiler where A is used as the   left and right of an operand.*/#include <testfwk.h>#include <string.h>/* In the previous bug, both *p and val in the compare operation were   assigned into A due to *p being packed for ACC use into A.*/intverifyBlock(char *p, char val, int len){  while (len--) {    if (*p++ != val) {      return 0;    }  }  return 1;}voidtestOverlap(void){  char buf[20];  memset(buf, 12, sizeof(buf));  buf[12] = 13;  ASSERT(!verifyBlock(buf, 12, sizeof(buf)));  buf[12] = 12;  ASSERT(verifyBlock(buf, 12, sizeof(buf)));}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -