File: displaylist.c

package info (click to toggle)
cc65 2.19-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,268 kB
  • sloc: ansic: 117,151; asm: 66,339; pascal: 4,248; makefile: 1,009; perl: 607
file content (64 lines) | stat: -rw-r--r-- 1,223 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
** test program for ANTIC instructions as defined in "_antic.h"
**
** 23-Feb-2017, Christian Krueger
*/

#include <conio.h>
#include <atari.h>

// code is only for testing purposes, as screen and display list are not aligned,
// and jumps not set!

unsigned char DummyScreen[400];

void DisplayList = {
    DL_BLK1,
    DL_BLK2,
    DL_BLK3,
    DL_BLK4,
    DL_BLK5,
    DL_BLK6,
    DL_BLK7,
    DL_DLI(DL_BLK8),
    DL_LMS(DL_CHR40x8x1),
    DummyScreen,
    DL_HSCROL(DL_CHR40x10x1),
    DL_VSCROL(DL_CHR40x8x4),
    DL_CHR40x16x4,
    DL_LMS(DL_HSCROL(DL_VSCROL(DL_DLI(DL_CHR20x8x2)))),
    DummyScreen+120,
    DL_CHR20x16x2,
    DL_MAP40x8x4,
    DL_MAP80x4x2,
    DL_MAP80x4x4,
    DL_MAP160x2x2,
    DL_MAP160x1x2,
    DL_MAP160x2x4,
    DL_MAP160x1x4,
    DL_MAP320x1x1,
    DL_JVB,
    DL_JMP
};


/* We know that the sizeof expression is constant; don't tell us. */

#pragma warn (const-comparison, off)

int
main(void)
{
    int returnValue = (sizeof DisplayList != 28);       // assure only one byte per instruction!

    clrscr();
    if (returnValue)
        cputs("Test FAILED!");
    else
        cputs("Test passed.");

    cputs("\n\rHit any key to exit...");
    cgetc();

    return returnValue;
}