Category : C Source Code
Archive   : LSPD05-2.ZIP
Filename : 089.C

 
Output of file : 089.C contained in archive : LSPD05-2.ZIP
/* Light Speed Reference Example Program */
/* Setting pallete registers */
#include "lspeed.h"
#include
#include

main()
{
/* Variables */
int newpallete[16] = /* Reverse yellow and white, black and blue */
{ 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14 };
int *pointer;
pointer=newpallete;

/* Write some text, wait for ready to read it */
textcolor(WHITE);
textbackground(BLACK);
cprintf("This will change from white/black to yellow/blue!\n\r");
cprintf("Press a key...\n\r");
getxch();

/* Re-define pallete, wait for next keypress */
ega_writepalette(pointer);
cprintf("See! Press a key to restore old pallete and quit.\n\r");
getxch();

/* Restore values, exit */
newpallete[0] = 0; newpallete[1] = 1;
newpallete[14] = 15; newpallete[15] = 14;
ega_writepalette(pointer);
}




  3 Responses to “Category : C Source Code
Archive   : LSPD05-2.ZIP
Filename : 089.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/