1 /* Base pointer tests, specifically for the z80.
7 verifyBlock(char *p
, char val
, int len
)
23 #if defined(__SDCC_pic14) || defined(__SDCC_pdk14)
25 // test devices with much less memory
26 #define ABOVE_MEM_SIZE 20
27 #define ABOVE_MEM_TEST_SIZE 17
28 #define BELOW_MEM_SIZE 10
29 #define BELOW_MEM_TEST_SIZE 7
31 #elif defined(__SDCC_mcs51) || defined(__SDCC_pic16) || defined(__SDCC_pdk15) || defined(__SDCC_STACK_AUTO)
33 // test devices with much less
34 #define ABOVE_MEM_SIZE 30
35 #define ABOVE_MEM_TEST_SIZE 17
36 #define BELOW_MEM_SIZE 20
37 #define BELOW_MEM_TEST_SIZE 7
41 #define ABOVE_MEM_SIZE 400
42 #define ABOVE_MEM_TEST_SIZE 17
43 #define BELOW_MEM_SIZE 200
44 #define BELOW_MEM_TEST_SIZE 74
51 char above
[ABOVE_MEM_SIZE
];
53 char below
[BELOW_MEM_SIZE
];
55 memset(above
, ABOVE_MEM_TEST_SIZE
, sizeof(above
));
56 memset(below
, BELOW_MEM_TEST_SIZE
, sizeof(below
));
58 ASSERT(verifyBlock(above
, ABOVE_MEM_TEST_SIZE
, sizeof(above
)));
59 ASSERT(verifyBlock(below
, BELOW_MEM_TEST_SIZE
, sizeof(below
)));
64 ASSERT(verifyBlock(above
, ABOVE_MEM_TEST_SIZE
, sizeof(above
)));
65 ASSERT(verifyBlock(below
, BELOW_MEM_TEST_SIZE
, sizeof(below
)));