1 /* Base pointer tests, specifically for the z80.
7 verifyBlock(char *p, char val, int len)
23 #if defined(SDCC_mcs51) || defined(SDCC_pic16)
25 // test devices with much less memory
26 #define ABOVE_MEM_SIZE 30
27 #define ABOVE_MEM_TEST_SIZE 17
28 #define BELOW_MEM_SIZE 20
29 #define BELOW_MEM_TEST_SIZE 7
33 #define ABOVE_MEM_SIZE 400
34 #define ABOVE_MEM_TEST_SIZE 17
35 #define BELOW_MEM_SIZE 200
36 #define BELOW_MEM_TEST_SIZE 74
43 char above[ABOVE_MEM_SIZE];
45 char below[BELOW_MEM_SIZE];
47 memset(above, ABOVE_MEM_TEST_SIZE, sizeof(above));
48 memset(below, BELOW_MEM_TEST_SIZE, sizeof(below));
50 ASSERT(verifyBlock(above, ABOVE_MEM_TEST_SIZE, sizeof(above)));
51 ASSERT(verifyBlock(below, BELOW_MEM_TEST_SIZE, sizeof(below)));
56 ASSERT(verifyBlock(above, ABOVE_MEM_TEST_SIZE, sizeof(above)));
57 ASSERT(verifyBlock(below, BELOW_MEM_TEST_SIZE, sizeof(below)));