1 /* Base pointer tests, specifically for the z80.
7 verifyBlock(char *p, char val, int len)
25 #define ABOVE_MEM_SIZE 400
26 #define ABOVE_MEM_TEST_SIZE 17
27 #define BELOW_MEM_SIZE 200
28 #define BELOW_MEM_TEST_SIZE 74
32 // test mcs51 with much less memory
33 #define ABOVE_MEM_SIZE 35
34 #define ABOVE_MEM_TEST_SIZE 17
35 #define BELOW_MEM_SIZE 20
36 #define BELOW_MEM_TEST_SIZE 7
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)));