
unit Port
{
	public const uint16 ID = 0;
	
	public link unit PORT {}
	
	#include "$run$.txt"
	
	public link bit OUT_DIR = PORT.D0_DIR;
	public link bit OUT_IN = PORT.D0_IN;
	public link bit OUT_OUT = PORT.D0_OUT;

	//[i] linkconst_bit_1 IStatus;
	public const bit IStatus = 1;

	//---------------------------------------------------
	//[i] function_void OS_init;
	public void OS_init()
	{
		OUT_DIR = 1;
		OUT_OUT = IStatus;
	}
	//---------------------------------------------------
	//[i] function_void SetStatus int32;
	public void SetStatus( int32 s )
	{
		if( s == 0 ) {
			OUT_OUT = 0;
		}
		else {
			OUT_OUT = 1;
		}
	}
}




