#include <stdio.h>
#include <conio.h>

#define DPORT 0x378
#define SPORT 0x379
#define CPORT 0x37a

main()
{
	//int i;
	int DPortValue, Value;

//	DPortValue = _inp( DPORT );
//	printf("\n\nValue %d is in the port\n", DPortValue);


	Value = 7;
	while ( Value >=0 )
	{
		_outp( DPORT, Value ); 

		DPortValue = _inp( DPORT );
		printf("\n\nValue %d is written into the parallel port\n", Value);
		printf("\nPlease type the other value to write - ");

		scanf("%d", &Value);
	}
	
	//sleep( 2000 );
	//for ( i = 0; i < 1000000; i++ );
	
	return 0;
}
