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, hide the cursor */
38 textcolor (COLOR_WHITE);
39 bordercolor (COLOR_BLACK);
40 bgcolor (COLOR_BLACK);
43 /* Clear the screen, put cursor in upper left corner */
46 /* Ask for the screen size */
47 screensize (&XSize, &YSize);
49 /* Draw a border around the screen */
56 /* Vertical line, left side */
57 cvlinexy (0, 1, YSize - 2);
64 /* Vertical line, right side */
65 cvlinexy (XSize - 1, 1, YSize - 2);
67 /* Write the greeting in the mid of the screen */
68 gotoxy ((XSize - strlen (Text)) / 2, YSize / 2);
71 /* Wait for the user to press a key */
74 /* Clear the screen again */