
unit SEG7X1
{
	public const uint16 ID = 0;

	public link unit A {}
	public link unit B {}
	public link unit C {}
	public link unit D {}
	public link unit E {}
	public link unit F {}
	public link unit G {}
	public link unit H {}
	
	#include "$run$.txt"

	//[i] function_void OS_init;
	public void OS_init()
	{
		RunInit();
	}
	
	//[i] function_void show_char int32;
	public void show_char( int32 c )
	{
		if( c < 0x20 ) {
			c + 0x10;
		}
		else {
			c - 0x20;
		}
		uint8 d = seg_table[(int16)c];
		
		SetData( d );
	}
	
	//α
	[#.code uint8*?] seg_table =
	[
		//SP     !     "     #
		0x00, 0x00, 0x00, 0x00,
		// $     &     %     '
		0x00, 0x00, 0x00, 0x00,
		// (     )     *     +
		0x00, 0x00, 0x00, 0x00,
		// ,            -     .     /
		0x00, 0b0100_0000, 0x00, 0x00,
		
		0b0011_1111, 0b0000_0110, 0b0101_1011, 0b0100_1111,	//00-- 0 1 2 3
		0b0110_0110, 0b0110_1101, 0b0111_1101, 0b0000_0111,	//04-- 4 5 6 7
		0b0111_1111, 0b0110_1111, 					//08-- 8 9
		
		0b0111_0111, 0b0111_1100, //A B
		0b0011_1001, 0b0101_1110, 0b0111_1001, 0b0111_0001, //0C-- C D E F
		0b0000_0000, 0b0000_0001, 0b0100_0000, 0b0000_1000, //10-- N ^ - _
		0b0000_0001, 0b0000_0010, 0b0000_0100, 0b0000_1000, //14--
		0b0001_0000, 0b0010_0000, //CIRCLE_0 1 2 3 4 5
		0b0000_1001, 0b0001_0010, 0b0010_0100, //1A-- DCIRCLE_0 1 2
		0b0000_0011, 0b0000_0110, 0b0000_1100, 0b0001_1000, 0b0011_0000, 0b0010_0001, //1D-- BCIRCLE_0 1 2 3 4 5
		0b0000_0111, 0b0000_1110, 0b0001_1100, 0b0011_1000, 0b0011_0001, 0b0010_0011  //23-- ECIRCLE_0 1 2 3 4 5
	];
}


