1 /*
2 ** test program for ANTIC instructions as defined in "_antic.h"
3 **
4 ** 23-Feb-2017, Christian Krueger
5 */
6
7 #include <conio.h>
8 #include <atari.h>
9
10 // code is only for testing purposes, as screen and display list are not aligned,
11 // and jumps not set!
12
13 unsigned char DummyScreen[400];
14
15 void DisplayList = {
16 DL_BLK1,
17 DL_BLK2,
18 DL_BLK3,
19 DL_BLK4,
20 DL_BLK5,
21 DL_BLK6,
22 DL_BLK7,
23 DL_DLI(DL_BLK8),
24 DL_LMS(DL_CHR40x8x1),
25 DummyScreen,
26 DL_HSCROL(DL_CHR40x10x1),
27 DL_VSCROL(DL_CHR40x8x4),
28 DL_CHR40x16x4,
29 DL_LMS(DL_HSCROL(DL_VSCROL(DL_DLI(DL_CHR20x8x2)))),
30 DummyScreen+120,
31 DL_CHR20x16x2,
32 DL_MAP40x8x4,
33 DL_MAP80x4x2,
34 DL_MAP80x4x4,
35 DL_MAP160x2x2,
36 DL_MAP160x1x2,
37 DL_MAP160x2x4,
38 DL_MAP160x1x4,
39 DL_MAP320x1x1,
40 DL_JVB,
41 DL_JMP
42 };
43
44
45 /* We know that the sizeof expression is constant; don't tell us. */
46
47 #pragma warn (const-comparison, off)
48
49 int
main(void)50 main(void)
51 {
52 int returnValue = (sizeof DisplayList != 28); // assure only one byte per instruction!
53
54 clrscr();
55 if (returnValue)
56 cputs("Test FAILED!");
57 else
58 cputs("Test passed.");
59
60 cputs("\n\rHit any key to exit...");
61 cgetc();
62
63 return returnValue;
64 }
65