home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 3 / FreeSoftwareCollection3pd199x-jp.img / pao / ms_dos / wild / src / int23.asm < prev    next >
Assembly Source File  |  1980-01-02  |  3KB  |  109 lines

  1. ;==============================================================================
  2. ;    << MASM V5.1 >>  for  FM TOWNS
  3. ;==============================================================================
  4.     page        60,132
  5.     name        INT23
  6.     title        INT23 Proc
  7. ;==============================================================================
  8. ;    ^C ハンドリング
  9. ;
  10. ;    CREATE : 1990.08.17
  11. ;    FINISH : 1990.08.17  V0.50
  12. ;
  13. ;    MSC 用 関数(スモールモデル)
  14. ;    -- インターバルタイマの使用 --
  15. ;    INT23_init(void) ;
  16. ;    INT23_release(void) ;
  17. ;
  18. ;    < HISTORY >
  19. ;    1990.08.17 : CREATE
  20. ;
  21. ;    All Rights Reserved, Copyright (C) Y.Hirata 1990.
  22. ;
  23. ;    Programed by Y.Hirata ( NIFTY-ID : NAB03321 )
  24. ;==============================================================================
  25. ;
  26.             .MODEL    SMALL,C                    ;
  27. ;
  28.             .CODE                            ;
  29. ;
  30. COPYRIGHT    db            0Dh
  31.             db            '     ',0Dh,0Ah,07h
  32.             db            0Dh,0Ah,'        '
  33.             db            'INT23 ハンドラー V0.50   1990-08-17',0Dh,0Ah
  34.             db            0Dh,0Ah,'        '
  35.             db            'Copyright (C) Y.Hirata 1990.'
  36.             db            0Dh,0Ah,0Dh,0Ah,1Ah
  37. ;
  38. TITLE_name    db            'INT23 handring'
  39. TITLE_len    EQU            $-TITLE_name
  40. ;
  41. ;********************************************
  42. ;            定数定義
  43. ;********************************************
  44. ;
  45. TRUE        EQU            1
  46. FALSE        EQU            0
  47. ;
  48. ZERO        EQU            0
  49. ;
  50. ;********************************************
  51. ;            データ領域
  52. ;********************************************
  53. vct_23h        dd        far                        ; ^C 割り込みベクタ
  54. ;
  55. ;********************************************
  56. ;            ^C ハンドラ
  57. ;********************************************
  58. int23_abort        proc    far                    ;
  59.             iret                            ;
  60. int23_abort        endp                        ;
  61. ;
  62. ;********************************************
  63. ;            ^C ハンドラのセット
  64. ;********************************************
  65. INT23_init        proc    near                ;
  66.             push    es                        ;
  67.             push    ds                        ;
  68.             push    dx                        ;
  69.             push    bx                        ;
  70.             push    cs                        ;
  71.             pop        ds                        ; ds = cs
  72. ;
  73.             mov        ax,3523h                ;
  74.             int        21h                        ;
  75.             mov        WORD ptr cs:vct_23h,bx    ;
  76.             mov        WORD ptr cs:vct_23h+2,es    ;
  77. ;
  78.             mov        dx,offset cs:int23_abort    ; ^C ハンドラのベクタセット
  79.             mov        ax,2523h                ;
  80.             int        21h                        ;
  81. ;
  82.             pop        bx                        ;
  83.             pop        dx                        ;
  84.             pop        ds                        ;
  85.             pop        es                        ;
  86.             ret                                ;
  87. INT23_init        endp                        ;
  88. ;
  89. ;********************************************
  90. ;            ^C ハンドラのリセット
  91. ;********************************************
  92. INT23_release    proc    near                ;
  93.             push    ds                        ;
  94.             push    dx                        ;
  95.             push    cs                        ;
  96.             pop        ds                        ; ds = cs
  97. ;
  98.             lds        dx,DWORD ptr cs:vct_23h    ;
  99.             mov        ax,2523h                ;
  100.             int        21h                        ;
  101. ;
  102.             pop        dx                        ;
  103.             pop        ds                        ;
  104.             ret                                ;
  105. INT23_release    endp                        ;
  106. ;
  107.             end
  108.  
  109.