home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Go64!
/
Go64_2000-09_2000_CSW_Side_B.d64
/
hello
< prev
next >
Wrap
Text File
|
2023-02-26
|
2KB
|
83 lines
/*
* fANCY HELLO WORLD PROGRAM USING CC65.
*
* uLLRICH VON bASSEWITZ (ULLRICH@VON-BASSEWITZ.DE)
*
*/
#INCLUDE <STDLIB.H>
#INCLUDE <STRING.H>
#INCLUDE <CONIO.H>
#INCLUDE <DBG.H>
/*****************************************************************************/
/* dATA */
/*****************************************************************************/
STATIC CONST CHAR tEXT [] = "hELLO WORLD!";
/*****************************************************************************/
/* cODE */
/*****************************************************************************/
INT MAIN (VOID)
{$7b}
UNSIGNED CHAR xsIZE, ysIZE;
/* sET SCREEN COLORS, HIDE THE CURSOR */
TEXTCOLOR (color_white);
BORDERCOLOR (color_black);
BGCOLOR (color_black);
CURSOR (0);
/* cLEAR THE SCREEN, PUT CURSOR IN UPPER LEFT CORNER */
CLRSCR ();
/* aSK FOR THE SCREEN SIZE */
SCREENSIZE (&xsIZE, &ysIZE);
/* dRAW A BORDER AROUND THE SCREEN */
/* tOP LINE */
CPUTC (ch_ulcorner);
CHLINE (xsIZE - 2);
CPUTC (ch_urcorner);
/* vERTICAL LINE, LEFT SIDE */
CVLINEXY (0, 1, ysIZE - 2);
/* bOTTOM LINE */
CPUTC (ch_llcorner);
CHLINE (xsIZE - 2);
CPUTC (ch_lrcorner);
/* vERTICAL LINE, RIGHT SIDE */
CVLINEXY (xsIZE - 1, 1, ysIZE - 2);
/* wRITE THE GREETING IN THE MID OF THE SCREEN */
GOTOXY ((xsIZE - STRLEN (tEXT)) / 2, ysIZE / 2);
CPRINTF ("%S", tEXT);
/* wAIT FOR THE USER TO PRESS A KEY */
(VOID) CGETC ();
/* cLEAR THE SCREEN AGAIN */
CLRSCR ();
/* dONE */
RETURN exit_success;
{$7d}