2 #ident "$Id: fancyhello.c,v 1.2 2004/12/14 22:46:25 hpa Exp $"
3 /* ----------------------------------------------------------------------- *
5 * Copyright 2004 H. Peter Anvin - All Rights Reserved
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
10 * Boston MA 02111-1307, USA; either version 2 of the License, or
11 * (at your option) any later version; incorporated herein by reference.
13 * ----------------------------------------------------------------------- */
18 * Hello, World! using libcom32 and ANSI console; also possible to compile
19 * as a Linux application for testing.
25 #include <consoles.h> /* Provided by libutil */
33 printf("\033[1;33;44m *** \033[37mHello, World!\033[33m *** \033[0m\n");
36 printf("\033[1;36m>\033[0m ");
37 fgets(buffer, sizeof buffer, stdin);
38 if ( !strncmp(buffer, "exit", 4) )
40 printf("\033[1m:\033[0m %s", buffer);