home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / tel2305s.zip / NET14 / SMALL14.ASM < prev    next >
Assembly Source File  |  1980-01-13  |  3KB  |  125 lines

  1. ;
  2. ;  Int 14h support routines
  3. ;****************************************************************************
  4. ;*                                                                          *
  5. ;*                                                                          *
  6. ;*      part of NCSA Telnet                                                 *
  7. ;*      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  8. ;*          Kurt Mahan, Heeren Pathak, Quincey Koziol, & Chris Wilson       *
  9. ;*                                                                          *
  10. ;*      National Center for Supercomputing Applications                     *
  11. ;*      152 Computing Applications Building                                 *
  12. ;*      605 E. Springfield Ave.                                             *
  13. ;*      Champaign, IL  61820                                                *
  14. ;*                                                                          *
  15. ;****************************************************************************
  16. ;
  17.     NAME    INT14
  18. ;Microsoft EQU 1
  19. ;Lattice EQU 1
  20.     ifndef Microsoft
  21.         ifndef Lattice
  22.             if2
  23.                 %out
  24.                 %out ERROR: You have to specify "/DMicrosoft" or "/DLattice" on the
  25.                 %out         MASM command line to determine the type of assembly.
  26.                 %out
  27.             endif
  28.             end
  29.         endif
  30.     endif
  31. ;
  32. ;******************************************************************
  33. ;*
  34. ;*    We need to set up a stack for netsleep when we exit to DOS.
  35.  
  36. X    EQU        6
  37. PORT    EQU 1
  38. ifdef Microsoft
  39. ;DGROUP  group _DATA
  40. ;_DATA segment public 'DATA'
  41. ;    assume DS:DGROUP
  42. .MODEL    LARGE
  43. .DATA
  44. else    
  45.     INCLUDE    DOS.MAC
  46.     SETX
  47.     DSEG
  48. endif
  49.  
  50. OLDINT14SEG     dw ?
  51. OLDINT14OFF     dw ?
  52. OLDSS           dw ?
  53. OLDSP           dw ?
  54.  
  55. ifdef Microsoft
  56. ;_DATA ends
  57. ;
  58. ;_TEXT    segment public 'CODE'
  59. ;    assume CS:_TEXT
  60. .CODE
  61. else
  62.     ENDDS
  63.     PSEG
  64. endif    
  65. ;
  66. ;**************************************************************************
  67. ;
  68. ;  Routines to install and deinstall a routine which manages the
  69. ;       serial port
  70. ;
  71. ;
  72. SERIALINT     EQU 4*14H       ; User hook to timer int
  73.  
  74. ifdef Microsoft
  75.     PUBLIC  _INT14CHECK,_INT14RECEIVE
  76. else    
  77.     PUBLIC  INT14CHECK,INT14RECEIVE
  78. endif   
  79. ;*************************************************************************
  80. ;
  81. ;  Check the int14 receive status
  82. ;
  83. ifdef Microsoft
  84. _INT14CHECK    PROC    FAR
  85. else
  86. INT14CHECK PROC    FAR
  87. endif
  88.     MOV     AH,3
  89.     MOV     DX,PORT
  90.     INT     14H
  91.     XOR     AL,AL
  92.     RET
  93. ifdef Microsoft
  94. _INT14CHECK    ENDP
  95. else
  96. INT14CHECK ENDP
  97. endif
  98.  
  99. ;*************************************************************************
  100. ;
  101. ;  Get a character from int14
  102. ;
  103. ifdef Microsoft
  104. _INT14RECEIVE    PROC    FAR
  105. else
  106. INT14RECEIVE PROC    FAR
  107. endif
  108.     MOV     AH,2
  109.     MOV     DX,PORT
  110.     INT     14H
  111.     RET
  112. ifdef Microsoft
  113. _INT14RECEIVE   ENDP
  114. else
  115. INT14RECEIVE ENDP
  116. endif
  117.  
  118. ifdef Microsoft
  119. ;_TEXT ends
  120.  
  121. else
  122.     ENDPS
  123. endif
  124.     END
  125.