home *** CD-ROM | disk | FTP | other *** search
/ Phoenix Heaven Sunny 2 / APPARE2.BIN / oh_towns / his / source / hisl2.asm < prev    next >
Assembly Source File  |  1995-06-20  |  1KB  |  61 lines

  1. ;*****************************************************************
  2. ;*                                                               *
  3. ;*             割り込み処理ライブラリ下請けプロシジャ            *
  4. ;*                                                               *
  5. ;*                     ~ IMR読み込み ~                    *
  6. ;*                                                               *
  7. ;*    1995 / 6 / 12                              ちょもらんま    *
  8. ;*                                                               *
  9. ;*****************************************************************
  10.  
  11.         .386
  12.  
  13. ;************** 割り込みハードウェア関係の定数 *************
  14. OCW1_M        equ    0002h
  15. OCW1_S        equ    0012h
  16. OCW2_M        equ    0000h
  17. OCW2_S        equ    0010h
  18. OCW3_M        equ    0000h
  19. OCW3_S        equ    0010h
  20. ISR_M        equ    0000h
  21. ISR_S        equ    0010h
  22. IRR_M        equ    0000h
  23. IRR_S        equ    0010h
  24. IMR_M        equ    0002h
  25. IMR_S        equ    0012h
  26. ReadIRR        equ    00001010b
  27. ReadISR        equ    00001011b
  28. EOIcommand    equ    00100000b
  29. WaitRegister    equ    006ch
  30.  
  31. ; int HIS_readIMR( void );
  32.         public    HIS_readIMR
  33.  
  34. ;------------ PICアクセス待ちウェイト -------------
  35. PicWait        macro
  36.         out    WaitRegister,al ; 1μ秒ウェイト
  37.         cmc
  38.         cmc
  39.         endm
  40.  
  41.         assume    cs:code
  42. code        segment    public use32 'CODE'
  43.  
  44. ;**************** 割り込みマスクレジスタの読み出し ***************
  45.  
  46.         public    HIS_readIMR
  47. HIS_readIMR    proc
  48.         xor    eax,eax
  49.         PicWait
  50.         in    al,IMR_S
  51.         PicWait
  52.         mov    ah,al
  53.         in    al,IMR_M
  54.         ret
  55. HIS_readIMR    endp
  56.  
  57.  
  58. code        ends
  59.  
  60.         end
  61.