Esempio n. 1
0
int main() {
	printf("Start Computer \n");

	//initialize all data structures
	initializeInstructionMemory();
	memory = (int*) calloc(sizeOfMemory, sizeof(int));
	initializeRegisters();

	//Alarm as clock
	signal(SIGALRM, clockTick);		
	alarm(1);
	while(flag == 0) {
		pause();
	}
	
	freeArrays();
	printf("\nThe End\n\n");	
	return 0;
}
Esempio n. 2
0
void CPetText::setupArrays(int count) {
	freeArrays();
	if (count < 10 || count > 60)
		count = 10;
	_array.resize(count);
}