/*
   GRAMCHAR.C

   KLB-GRPH
   OP6300/KDM-G8X40

   Shows the use of RAM characters functions for the KDM graphics
	controller.
		
	lg_stdcg() sends a 64 byte array to lg_cgram which uses the array
	as a bitmaps for 8 8x8 pixel special characters. See lg_cgram
	documentation if you want create your own characters. 

   NOTE: The documentation is incorrect for the proper jumper setting
         on the KLB-GRPH controller board.  
         H2 (not J2) should be jumpered: 1-3 and 2-4.  
         H11 and H6 should be open.  
         The boards are configured properly from the factory.
*/

#use "kdm.lib"
#define LK_COLS      40       // Number of text columns 
#define LK_LINES		8

main(){
	int i,j,k,n;
   outport(DCNTL, 0x30);   // Set I/O wait states to max (4) 
   lg_init();
	lg_stdcg();
	for(i=160;i<=167;i++){  // When in CG ROM mode characters 128-255
		hitwd();
		lg_pos(0,i-160);		// are user defined RAM chars, but the lg_putc
		lg_putc((char)i);		// function subtracts 32 to convert from ASCII
	}
}


