2 ** Fancy hello world program using cc65.
4 ** Ullrich von Bassewitz (ullrich@von-bassewitz.de)
6 ** TEST version for atari5200 conio, using all four colors
18 /*****************************************************************************/
20 /*****************************************************************************/
24 static const char Text [] = "Hello world!";
28 /*****************************************************************************/
30 /*****************************************************************************/
36 unsigned char XSize, YSize;
39 /* Set screen colors */
40 (void) textcolor (COLOR_WHITE);
41 (void) bordercolor (COLOR_BLACK);
42 (void) bgcolor (COLOR_BLACK);
44 /* Clear the screen, put cursor in upper left corner */
47 /* Ask for the screen size */
48 screensize (&XSize, &YSize);
50 /* Draw a border around the screen */
57 /* Vertical line, left side */
58 cvlinexy (0, 1, YSize - 2);
65 /* Vertical line, right side */
66 cvlinexy (XSize - 1, 1, YSize - 2);
68 /* Write the greeting in the mid of the screen */
69 gotoxy ((XSize - strlen (Text)) / 2, YSize / 2);
73 textcolor (0); /* switch to color #0 */
74 cputsxy(3, PosY++, "COLOR 0");
75 textcolor (1); /* switch to color #1 */
76 cputsxy(3, PosY++, "COLOR 1");
77 textcolor (2); /* switch to color #2 */
78 cputsxy(3, PosY++, "COLOR 2");
79 textcolor (3); /* switch to color #3 */
80 cputsxy(3, PosY, "COLOR 3");
82 #if defined(__NES__) || defined(__PCE__) || defined(__GAMATE__) || defined(__ATARI5200__)
84 /* Wait for the user to press a button */
85 joy_install (joy_static_stddrv);
86 while (!joy_read (JOY_1)) ;
91 /* Wait for the user to press a key */
96 /* Clear the screen again */