1 /* Base pointer tests, specifically for the z80.
8 verifyBlock(char *p, char val, int len)
26 #define ABOVE_MEM_SIZE 400
27 #define ABOVE_MEM_TEST_SIZE 17
28 #define BELOW_MEM_SIZE 200
29 #define BELOW_MEM_TEST_SIZE 74
33 // test mcs51 with much less memory
34 #define ABOVE_MEM_SIZE 35
35 #define ABOVE_MEM_TEST_SIZE 17
36 #define BELOW_MEM_SIZE 20
37 #define BELOW_MEM_TEST_SIZE 7
44 char above[ABOVE_MEM_SIZE];
46 char below[BELOW_MEM_SIZE];
48 memset(above, ABOVE_MEM_TEST_SIZE, sizeof(above));
49 memset(below, BELOW_MEM_TEST_SIZE, sizeof(below));
51 ASSERT(verifyBlock(above, ABOVE_MEM_TEST_SIZE, sizeof(above)));
52 ASSERT(verifyBlock(below, BELOW_MEM_TEST_SIZE, sizeof(below)));
57 ASSERT(verifyBlock(above, ABOVE_MEM_TEST_SIZE, sizeof(above)));
58 ASSERT(verifyBlock(below, BELOW_MEM_TEST_SIZE, sizeof(below)));