home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 3 / FreeSoftwareCollection3pd199x-jp.img / pao / ms_dos / game / src / int23.asm < prev    next >
Assembly Source File  |  1980-01-02  |  3KB  |  108 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. ;    INT23_init(void) ;
  15. ;    INT23_release(void) ;
  16. ;
  17. ;    < HISTORY >
  18. ;    1990.08.17 : CREATE
  19. ;
  20. ;    All Rights Reserved, Copyright (C) Y.Hirata 1990.
  21. ;
  22. ;    Programed by Y.Hirata ( NIFTY-ID : NAB03321 )
  23. ;==============================================================================
  24. ;
  25.             .MODEL    LARGE,C                    ;
  26. ;
  27.             .CODE                            ;
  28. ;
  29. COPYRIGHT    db            0Dh
  30.             db            '     ',0Dh,0Ah,07h
  31.             db            0Dh,0Ah,'        '
  32.             db            'INT23 ハンドラー V0.50   1990-08-17',0Dh,0Ah
  33.             db            0Dh,0Ah,'        '
  34.             db            'Copyright (C) Y.Hirata 1990.'
  35.             db            0Dh,0Ah,0Dh,0Ah,1Ah
  36. ;
  37. TITLE_name    db            'INT23 handring'
  38. TITLE_len    EQU            $-TITLE_name
  39. ;
  40. ;********************************************
  41. ;            定数定義
  42. ;********************************************
  43. ;
  44. TRUE        EQU            1
  45. FALSE        EQU            0
  46. ;
  47. ZERO        EQU            0
  48. ;
  49. ;********************************************
  50. ;            データ領域
  51. ;********************************************
  52. vct_23h        dd        far                        ; ^C 割り込みベクタ
  53. ;
  54. ;********************************************
  55. ;            ^C ハンドラ
  56. ;********************************************
  57. int23_abort        proc    far                    ;
  58.             iret                            ;
  59. int23_abort        endp                        ;
  60. ;
  61. ;********************************************
  62. ;            ^C ハンドラのセット
  63. ;********************************************
  64. INT23_init        proc                        ;
  65.             push    es                        ;
  66.             push    ds                        ;
  67.             push    dx                        ;
  68.             push    bx                        ;
  69.             push    cs                        ;
  70.             pop        ds                        ; ds = cs
  71. ;
  72.             mov        ax,3523h                ;
  73.             int        21h                        ;
  74.             mov        WORD ptr cs:vct_23h,bx    ;
  75.             mov        WORD ptr cs:vct_23h+2,es    ;
  76. ;
  77.             mov        dx,offset cs:int23_abort    ; ^C ハンドラのベクタセット
  78.             mov        ax,2523h                ;
  79.             int        21h                        ;
  80. ;
  81.             pop        bx                        ;
  82.             pop        dx                        ;
  83.             pop        ds                        ;
  84.             pop        es                        ;
  85.             ret                                ;
  86. INT23_init        endp                        ;
  87. ;
  88. ;********************************************
  89. ;            ^C ハンドラのリセット
  90. ;********************************************
  91. INT23_release    proc                        ;
  92.             push    ds                        ;
  93.             push    dx                        ;
  94.             push    cs                        ;
  95.             pop        ds                        ; ds = cs
  96. ;
  97.             lds        dx,DWORD ptr cs:vct_23h    ;
  98.             mov        ax,2523h                ;
  99.             int        21h                        ;
  100. ;
  101.             pop        dx                        ;
  102.             pop        ds                        ;
  103.             ret                                ;
  104. INT23_release    endp                        ;
  105. ;
  106.             end
  107.  
  108.