/* ------------------------------ $Id: mkhd.c,v 1.4 2004/10/12 09:16:57 marquet Exp $ ------------------------------------------------------------ Create and intialize a drive using the hardware simulator. Philippe Marquet, october 2002 A minimal example of a program using the ATA interface. It is given to the students as such. */ #include #include #include static void emptyIT() { return; } int main(int argc, char **argv) { unsigned int i; /* init hardware */ if(initHardware("hardware.ini") == 0) { fprintf(stderr, "Error in hardware initialization\n"); exit(EXIT_FAILURE); } /* Interreupt handlers */ for(i=0; i<16; i++) IRQVECTOR[i] = emptyIT; /* Allows all IT */ _mask(1); /* and exit! */ exit(EXIT_SUCCESS); }