
	public void OS_run()
	{
		if( DIR == 0 ) {
			return;
		}
		if( time == 0 ) {
			DIR = 0;
			return;
		}
		if( time > 0 ) {
			time - 1;
		}
		
		if( DIR == 1 ) {
			OUTPUT << 1;
			if( OUTPUT == 0x10 ) {
				OUTPUT = 0x01;
			}
		}
		if( DIR == 2 ) {
			OUTPUT >> 1;
			if( OUTPUT == 0x00 ) {
				OUTPUT = 0x08;
			}
		}
		PORT.D0 = OUTPUT.0(bit);
		PORT.D1 = OUTPUT.1(bit);
		PORT.D2 = OUTPUT.2(bit);
		PORT.D3 = OUTPUT.3(bit);
	}
	
	