/*
    exDOS - Experimental 32 Bit protected mode scripted operating system
    (C) 2005 Jason Hunt
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

    Contact: nulluser@gmail.com

    File: interrupt.h
*/

#ifndef INTERRUPT_H
#define INTERRUPT_H

#define intr_base_1     0x20                    // First interrupt controller
#define intr_base_2     0xA0                    // Second interrupt controller
#define intr_data_1     intr_base_1 + 1         // First interrupt controller
#define intr_data_2     intr_base_2 + 1         // Second interrupt controller
#define intr_init       0x11                    // Cascade mode, ICW4 needed

/* Interrupt descripter entry */
typedef struct 
{
    word offset_low;                            // Low word of function pointer
    word selector;                              // Segment selector
    byte count;                                 // Not used
    byte flags;                                 // Gate type
    word offset_high;                           // High word of function pointer
} idt_entry;



void interrupt_init(void);                      // Start interrupts 
void timer_delay(word delay);
void intr_set_vector(byte intr_num, void (*interrupt_func)());

void disable_nmi( void );
void enable_nmi( void );



#endif






