2 ** Fancy hello world program using cc65.
4 ** Ullrich von Bassewitz (ullrich@von-bassewitz.de)
17 /*****************************************************************************/
19 /*****************************************************************************/
23 static const char Text [] = "Hello world!";
27 /*****************************************************************************/
29 /*****************************************************************************/
35 unsigned char XSize, YSize;
37 /* Set screen colors */
38 (void) textcolor (COLOR_WHITE);
39 (void) bordercolor (COLOR_BLACK);
40 (void) bgcolor (COLOR_BLACK);
42 /* Clear the screen, put cursor in upper left corner */
45 /* Ask for the screen size */
46 screensize (&XSize, &YSize);
48 /* Draw a border around the screen */
55 /* Vertical line, left side */
56 cvlinexy (0, 1, YSize - 2);
63 /* Vertical line, right side */
64 cvlinexy (XSize - 1, 1, YSize - 2);
66 /* Write the greeting in the mid of the screen */
67 gotoxy ((XSize - strlen (Text)) / 2, YSize / 2);
70 #if defined(__NES__) || defined(__PCE__) || defined(__GAMATE__)
72 /* Wait for the user to press a button */
73 joy_install (joy_static_stddrv);
74 while (!joy_read (JOY_1)) ;
79 /* Wait for the user to press a key */
84 /* Clear the screen again */