home *** CD-ROM | disk | FTP | other *** search
/ Phoenix Heaven Sunny 2 / APPARE2.BIN / oh_towns / his / source / hisinner.h < prev    next >
C/C++ Source or Header  |  1995-06-20  |  3KB  |  78 lines

  1. /***********************************************************************
  2.  *                                                                     *
  3.  *                    ハードウェア割り込み支援ライブラリ               *
  4.  *                                                                     *
  5.  *                     ~  共通インクルードファイル  ~                *
  6.  *                                                                     *
  7.  *        1995.6.12                                  by ちょもらんま   *
  8.  *                                                                     *
  9.  ***********************************************************************/
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <dos.h>
  14. #include <his.h>
  15.  
  16. #define HardwareIntTypes 16
  17. #define HardVector       0x40
  18.  
  19. /***********************************************************************/
  20. /*                               外部変数                              */
  21. /***********************************************************************/
  22.  
  23. /*----------------- ユーザー割り込みハンドラ記録用構造体 --------------*/
  24.  
  25. typedef struct
  26. {
  27.     _Far void (*handlerAdr)();
  28.     unsigned short dataSegment;
  29. } userHandler_t;
  30.  
  31. extern userHandler_t userHandler[ HardwareIntTypes ];
  32.  
  33.  
  34. /*-------------------- 旧割り込みハンドラ支援用構造体 -----------------*/
  35.  
  36. /* 割り込みハンドラアドレス&割り込みマスクレジスタ(IMR)の記録 */
  37. typedef struct
  38. {
  39.     void                *nextInfo;     /* 次のハンドラ情報へのポインタ */
  40.     int                 IMR;           /* ハンドラ登録時点での
  41.                                           指定された割り込みに対応する
  42.                                           IMRの値 */
  43.     _real_int_handler_t RealHandler;   /* 退避したリアル側ハンドラ */
  44.     _Handler            NativeHandler; /* 退避したネイティブ側ハンドラ */
  45.     unsigned short      dataSegment;   /* 退避したハンドラのDSの値 */
  46. } intInfo;
  47.  
  48.  
  49. /*--- 旧割り込みハンドラアドレス&割り込みマスクレジスタの記録状態 ----*/
  50.  
  51. extern intInfo *topIntInfo[ HardwareIntTypes ];
  52.  
  53. /*-------------------- 割り込みハンドラ用スタック支援 -----------------*/
  54.  
  55. extern char *stackAddress;
  56.  
  57.  
  58. /***********************************************************************/
  59. /*                            割り込みエントリ                         */
  60. /***********************************************************************/
  61.  
  62. void HardIntEntry0 ( void );
  63. void HardIntEntry1 ( void );
  64. void HardIntEntry2 ( void );
  65. void HardIntEntry3 ( void );
  66. void HardIntEntry4 ( void );
  67. void HardIntEntry5 ( void );
  68. void HardIntEntry6 ( void );
  69. void HardIntEntry7 ( void );
  70. void HardIntEntry8 ( void );
  71. void HardIntEntry9 ( void );
  72. void HardIntEntry10( void );
  73. void HardIntEntry11( void );
  74. void HardIntEntry12( void );
  75. void HardIntEntry13( void );
  76. void HardIntEntry14( void );
  77. void HardIntEntry15( void );
  78.