student-distrib/i8259.c
void i8259_init(void) {
	// Mask the master and slave interrupts
	outb(all_mask, MASTER_8259_DATA);
	outb(all_mask, SLAVE_8259_DATA);

	// Send initialization commands to master and slave
	outb(ICW1, MASTER_8259_PORT);
	outb(ICW2_MASTER, MASTER_8259_DATA);
	outb(ICW3_MASTER, MASTER_8259_DATA);
	outb(ICW4, MASTER_8259_DATA);
	
	outb(ICW1, SLAVE_8259_PORT);
	outb(ICW2_SLAVE, SLAVE_8259_DATA);
	outb(ICW3_SLAVE, SLAVE_8259_DATA);
	outb(ICW4, SLAVE_8259_DATA);
	
	// Unmask master and slave interrupts
	outb(master_mask, MASTER_8259_DATA);
	outb(slave_mask, SLAVE_8259_DATA);
}
/* i8259_init(): Initialize the 8259 PIC  (heffley)
 * Inputs: none
 * Returns: none
 * Effects: Initializes the master and slave PICs
 */
Initialize the 8259 PIC  (heffley)
Inputs: none
Returns: none
Effects: Initializes the master and slave PICs
Initialize the 8259 PIC ( heffley ) Inputs : none Returns : none Effects : Initializes the master and slave PICs
void i8259_init(void) {
	outb(all_mask, MASTER_8259_DATA);
	outb(all_mask, SLAVE_8259_DATA);
	outb(ICW1, MASTER_8259_PORT);
	outb(ICW2_MASTER, MASTER_8259_DATA);
	outb(ICW3_MASTER, MASTER_8259_DATA);
	outb(ICW4, MASTER_8259_DATA);
	outb(ICW1, SLAVE_8259_PORT);
	outb(ICW2_SLAVE, SLAVE_8259_DATA);
	outb(ICW3_SLAVE, SLAVE_8259_DATA);
	outb(ICW4, SLAVE_8259_DATA);
	outb(master_mask, MASTER_8259_DATA);
	outb(slave_mask, SLAVE_8259_DATA);
}
void i8259_init ( void ) { outb ( all_mask , MASTER_8259_DATA ) ; outb ( all_mask , SLAVE_8259_DATA ) ; outb ( ICW1 , MASTER_8259_PORT ) ; outb ( ICW2_MASTER , MASTER_8259_DATA ) ; outb ( ICW3_MASTER , MASTER_8259_DATA ) ; outb ( ICW4 , MASTER_8259_DATA ) ; outb ( ICW1 , SLAVE_8259_PORT ) ; outb ( ICW2_SLAVE , SLAVE_8259_DATA ) ; outb ( ICW3_SLAVE , SLAVE_8259_DATA ) ; outb ( ICW4 , SLAVE_8259_DATA ) ; outb ( master_mask , MASTER_8259_DATA ) ; outb ( slave_mask , SLAVE_8259_DATA ) ; }
i8259_init(): Initialize the 8259 PIC  (heffley)
 Inputs: none
 Returns: none
 Effects: Initializes the master and slave PICs
i8259_init () : Initialize the 8259 PIC ( heffley ) Inputs : none Returns : none Effects : Initializes the master and slave PICs
// Mask the master and slave interrupts // Send initialization commands to master and slave // Unmask master and slave interrupts