
	int8 LastD;

	void RunInit()
	{
		LastD = 0;
	}
	
	void OS_run()
	{
		int8 d = (int8)(int16)#.OS.REMO_ModuleRead( (int)(ID * 0x00010000 + 0x0000) );
		
		if( d != LastD ) {
			LastD = d;
			if( d == 1 ) {
				OS_EventFlag.0(bit) = 1;
			}
			else {
				OS_EventFlag.1(bit) = 1;
			}
		}
	}


