//**************************************************************************
// JK29-28 Bitwise Operators                                   S215  10 1129
// 
// 15 POINTS
// *************************************************************************
#include "s215-header19-f45.h" 
#pragma code
//||||||||||||||||||||||||| BEGINNING OF MAIN PROGRAM ||||||||||||||||||||||
void main (void)
{
unsigned char sw76, sw3210;
InitPorts();
//----------------------------------
while (1==1)
{
//|||||||||||||||||||||||||||||||| PRIMARY LOOP ||||||||||||||||||||||||||||
sw76 = SWITCHES & 0b11000000;
sw3210 = SWITCHES & 0b00001111;

switch (sw76)
{
	case 0:	//Let switches 3, 2, 1, and 0 through to LEDs unchanged.
		LEDS = sw3210;
		break;
	case 1: //Let switches 1 and 0 through to LEDs, with LEDs 3 and 2 
			// each being 0.
		// . . . PUT CODE HERE . . .
	case 2: //Let switches 1 and 0 through to LEDs, with LEDs 3 and 2 
			// each being 1.
		// . . . PUT CODE HERE . . .
	case 3:	//Invert switches 3, 2, 1, and 0, and send to LEDs 
		// . . . PUT CODE HERE . . .
}

//||||||||||||||||||||||||||||| END OF PRIMARY LOOP ||||||||||||||||||||||||		
}
}
//||||||||||||||||||||||||||| END OF MAIN PROGRAM ||||||||||||||||||||||||||

