// This file is the main executable for the kernel code.
// It is the core of a real-time multitasking operating system
//
// Written by Ryan Potter
// ryanpotter@cfl.rr.com
// 
// Project start date: October 14, 2002
//


#include <>

#define max_tasks 10
#define max_resources 10



// GLOBAL VARIABLES

// this variable is used by the interrupt routine to force the 
// highest priority task to run by setting active_task=0
unsigned char active_task;




void main()
(


// VARIABLES

// Create task table
unsigned char task_priorities[max_tasks-1];
unsigned char task_state[max_tasks-1];
unsigned int task_pointer[max_tasks-1];

// create resource table
unsigned char resource_id[max_resources=1];
unsigned int resource_pointer[max_resources-1];
unsigned char resource_state[max_resources-1];




// PREOPERATION SETUP
	// setup the interrupt timer and divider
	// set shell to task_num = 0
	// determine async task server task_num
	// determine idle task task_num
	


// MAIN KERNEL ROUTINE
	// This routine will cycle once per 
while (1) {


	if (active_task > max_tasks) {
		active_task = 0;
	}

	for (i=active_task; i=max_tasks; i++) {
		if (task_state[active_task] = 1) {
			// goto task_pointer[active_task];
		}	
	}
	
}	// end while (1)
)	// end main()
