#include <stdio.h>

//int checkDigit(char aDigit);

int main(void){
	int n = 3;									//The number of characters taken as input
	char string[5];								//The array itself
	extern void bitPack(int, char*);			//The assembly function
	
	//Following code was omitted for ease of testing
	//Requirements did not specify if n was to be hardcoded into main function, or taken as an input

	//do{
		//printf("Please enter the number of characters, between 0 and 5: ");
		//scanf("%d", &n);
		//if(n<0 || n>5)
			//printf("\tInvalid number of characters, please re-enter\n");
	//}while(n<0 || n>5);
	
	bitPack(n, string);							//Call assembly function
	
	printf("The string is: %s\n\n", string);	//Print the resulting string
	
	return 0;
}

int checkDigit(char aDigit){
	//Check if digit is valid
	if((aDigit >= '0' && aDigit <= '9') || (aDigit >= 'A' && aDigit <= 'F')){
		//If it is, print it and return 1
		printf("%c\n", aDigit);
		return 1;
	}
	else{
		//If not, print error message and return 0
		printf("NOT A DIGIT\n");
		return 0;
	}
}