home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ccdos / ccxibm.dat < prev    next >
Text File  |  2020-01-01  |  30KB  |  592 lines

  1.         public  serini, serrst, clrbuf, outchr, coms, vts, vtstat
  2.         public  dodel, ctlu, cmblnk, locate, prtchr, dobaud, clearl
  3.         public  dodisk, getbaud, beep, termtb, shomodem, getmodem, mdmhand
  4.         public  count, xofsnt, puthlp, putmod, clrmod, poscur, holdscr
  5.         public  sendbr, sendbl, machnam, setktab, setkhlp, lclini, showkey
  6.         public  ihosts, ihostr, dtrlow, serhng, comptab, pcwait
  7.         include ccsdef.h
  8.  
  9.  
  10. off     equ     0
  11. bufon   equ     1               ; buffer level xon/xoff on-state control flag
  12. usron   equ     2               ; user level xon/xoff on-state control flag
  13.  
  14. mntrgh  equ     bufsiz*3/4      ; High point = 3/4 of buffer full
  15. mntrgl  equ     bufsiz/4        ; Low point = 1/4 buffer full
  16.  
  17. BRKBIT  EQU     040H            ; Send-break bit.
  18. TIMERCMD EQU    43h             ; 8253/4 Timer chip command port
  19. TIMER2DATA EQU  42h             ; 8253/4 Timer 2 data port
  20. PPI_PORT EQU    61h             ; 8255 prog peripheral chip control port
  21. MCONF   EQU     11H             ; Bios Machine configuration s/ware interrupt.
  22. KEYB    EQU     16H             ; Bios keyboard software interrupt
  23. VIDEO   EQU     10H             ; Bios Video display software interrupt
  24. RS232   EQU     14H             ; Bios RS232 serial port s/ware interrupt
  25.  
  26. ; constants used by serial port handler
  27. ;;MDMDAT1       EQU     03F8H           ; Address of port com1 (data)
  28. ;;MDMCOM1       EQU     03FBH           ; Address of port com1 (command)
  29. ;;MDMSTS1       EQU     03FDH           ; Address of port com1 (status)
  30. ;;MDMDAT2       EQU     02F8H           ; Port com2 data
  31. ;;MDMCOM2       EQU     02FBH           ; Port com2 command
  32. ;;MDMSTS2       EQU     02FDH           ; Port com2 status
  33. MDMINTV EQU     0CH             ; IRQ4 com1/3 port interrupt vector
  34. MDINTV2 EQU     0BH             ; IRQ3 com2/4 port interrupt vector
  35. MDMINTO EQU     0EFH            ; Mask to enable interrupt level IRQ4
  36. MDINTO2 EQU     0F7H            ; Mask to enable interrupt level IRQ3
  37. MDMINTC EQU     010H            ; Bit to set to disable interrupts for IRQ4
  38. MDINTC2 EQU     008H            ; Bit to set to disable interrupts for IRQ3
  39. EOICOM  EQU     0064H           ; End of interrupt for IRQ4
  40. EOICOM2 EQU     0063H           ; End of interrupt for IRQ3
  41.  
  42. INTCONT EQU     0021H           ; Address of 8259 interrupt controller ICW2-3
  43. INTCON1 EQU     0020H           ; Address of 8259 ICW1
  44. MDMINP  EQU     1               ; Input ready bit
  45. MDMOVER EQU     2               ; Receiver overrun
  46.  
  47. ; external variables used:
  48. ; drives - # of disk drives on system
  49. ; flags - global flags as per flginfo structure defined in pcdefs
  50. ; trans - global transmission parameters, trinfo struct defined in pcdefs
  51. ; portval - pointer to current portinfo structure (currently either port1
  52. ;    or port2)
  53. ; port1, port2 - portinfo structures for the corresponding ports
  54. ; low_rgt - low byte = last column (typ 79), high byte = last text row
  55. ;  (typ 23) in screen coordinates (start at 0), set by msyibm.
  56.  
  57. ; global variables defined in this module:
  58. ; xofsnt, xofrcv - tell whether we saw or sent an xoff.
  59. ; setktab - keyword table for redefining keys (should contain a 0 if
  60. ;    not implemented)
  61. ; setkhlp - help for setktab.
  62.  
  63. datas   segment public 'datas'
  64.         extrn   drives:byte, flags:byte, trans:byte, ttyact:byte
  65.         extrn   portval:word, port1:byte, port2:byte, port3:byte, port4:byte
  66.         extrn   lclexit:word, rxtable:byte, decbuf:byte, taklev:byte
  67.         extrn   refresh:byte, scbattr:byte, low_rgt:word, vtemu:byte
  68.         extrn   vtroll:byte, tekflg:byte, tekgraf:byte, vtclear:byte
  69.         extrn   isccdos:byte    ; Jun 25,1990
  70.  
  71. ; structure for status information table sttab.
  72. stent   struc
  73. sttyp   dw      ?               ; type (actually routine to call)
  74. msg     dw      ?               ; message to print
  75. val2    dw      ?               ; needed value: another message, or tbl addr
  76. tstcel  dw      ?               ; address of cell to test, in data segment
  77. basval  dw      0               ; base value, if non-zero
  78. stent   ends
  79.  
  80. setktab db      0               ; superceded by msuibm code, return 0 here
  81. setkhlp db      '$'             ; and add empty help string
  82. holdscr db      0               ; Hold-Screen, non-zero to stop reading
  83. savsci  dd      ?               ; old serial port interrupt vector
  84. sav232  dd      ?               ; Original Bios Int 14H address, in Code seg
  85. savirq  db      ?               ; Original Interrupt mask for IRQ
  86. savlcr  db      ?               ; Original Line Control Reg (3fbh) contents
  87. brkval  db      BRKBIT          ; What to send for a break
  88. brkadr  dw      0               ; Where to send it
  89. intkind db      0               ; cause of serial port interrupt
  90. isps2   db      0               ; non-zero if real IBM PS/2
  91. modem   mdminfo <>
  92. hngmsg  db      cr,lf,' The phone or network connection should have hungup'
  93.         db      cr,lf,'$'
  94. chngmsg db      cr,lf,' ╡τ╗░╗≥═°┬τ┴¬╜╙╥╤╛¡╣╥╢╧'
  95.         db      cr,lf,'$'
  96. hnghlp  db      cr,lf,' The modem control lines DTR and RTS for the current'
  97.         db      ' port are forced low (off)'
  98.         db      cr,lf,' to hangup the phone. Normally, Kermit leaves them'
  99.         db      ' high (on) when it exits.',cr,lf
  100.         db      ' For networks, the active session is terminated.',cr,lf,'$'
  101. chnghlp db      cr,lf,' ╡▒╟░┤«╨╨┐┌╡─╡≈╓╞╜Γ╡≈╞≈┐╪╓╞╧▀ DTR ║═ RTS ╥╤▒╗╓├│╔╡═'
  102.         db      '╡τ╞╜(off)'
  103.         db      cr,lf,', ╥╘▒π╜½╡τ╗░╣╥╢╧. ═¿│ú, Kermit ═╦│÷╧╡═│╩▒╒Γ╨⌐┐╪╓╞╧▀'
  104.         db      '╚╘╜½▒ú│╓╕▀╡τ╞╜(on)▓╗▒Σ;',cr,lf
  105.         db      '╢╘╙δ═°┬τ, ╒²╜°╨╨╡─╢╘╗░╜½▒╗╓╒╓╣.',cr,lf,'$'
  106. erms40  db      cr,lf,'?Warning: Unrecognized baud rate',cr,lf,'$'
  107. cerms40 db      cr,lf,'?╛»╕µ: ▓╗─▄╜╙╩▄╡─▓¿╠╪┬╩',cr,lf,'$'
  108. erms41  db      cr,lf,'?More parameters are needed$'
  109. cerms41 db      cr,lf,'?╨Φ╥¬╕ⁿ╢α╡─▓╬╩²$'
  110. badbd   db      cr,lf,'Unimplemented baud rate$'
  111. cbadbd  db      cr,lf,'▓╗─▄╔Φ╓├╡─▓¿╠╪┬╩$'
  112. badprt  db      cr,lf,' Serial port $'
  113. cbadprt db      cr,lf,' ┤«╨╨┐┌ $'
  114. badprt2 db      ' is not available',cr,lf,'$'
  115. cbadprt2 db     ' ▓╗─▄╩╣╙├',cr,lf,'$'
  116. biospt  db      'BIOS$'
  117. compt   db      'COM$'
  118. unkpt   db      'Unknown$'
  119. cunkpt  db      '▓╗╚╧╩╢$'
  120. biosmsg db      cr,lf,'This port operates through the Bios',cr,lf,'$'
  121. cbiosmsg db     cr,lf,'┤╦╢╦┐┌═¿╣²Bios▓┘╫≈',cr,lf,'$'
  122. msmsg1  db      cr,lf,'  Modem is not ready: DSR is off$'
  123. cmsmsg1 db      cr,lf,'  Modem ├╗╙╨╫╝▒╕║├ :  DSR ╬¬ off$'
  124. msmsg2  db      cr,lf,'  Modem is ready:     DSR is on$'
  125. cmsmsg2 db      cr,lf,'  Model╥╤╫╝▒╕║├:      DSR ╬¬ on$'
  126. msmsg3  db      cr,lf,'  No Carrier Detect:  CD  is off$'
  127. cmsmsg3 db      cr,lf,'  ├╗╙╨╘╪▓¿╨┼║┼:       CD ╬¬ off $'
  128. msmsg4  db      cr,lf,'  Carrier Detect:     CD  is on$'
  129. cmsmsg4 db      cr,lf,'  ╙╨╘╪▓¿╨┼║┼:         CD ╬¬ on$'
  130. msmsg5  db      cr,lf,'  No Clear To Send:   CTS is off$'
  131. cmsmsg5 db      cr,lf,'  ├╗╙╨╟σ│²╖ó╦═╨┼║┼:   CTS ╬¬ off$'
  132. msmsg6  db      cr,lf,'  Clear To Send:      CTS is on$'
  133. cmsmsg6 db      cr.lf,'  ├╗╙╨╟σ│²╖ó╦═╨┼║┼:   CTS ╬¬ on$'
  134. msmsg7  db      cr,lf,'  Modem is not used by the Network$'
  135. cmsmsg7 db      cr,lf,'  ═°┬τ╬┤╩╣╙├╡≈╓╞╜Γ╡≈╞≈$'
  136.  
  137. machnam db      'IBM-PC$'
  138. crlf    db      cr,lf,'$'
  139. delstr  db      BS,BS,'  ',BS,BS,'$'    ; Delete string
  140. clrlin  db      cr,'$'                  ; Clear line (just the cr part)
  141. tabmsg  db      'Tab stops ''T'' and columns -$'
  142. clone   db      0               ; clone flag (0 = real, 'B' = system Bios,
  143.                                 ; 'N'=NetBios/network, 'U'=Ungermann/Bass net)
  144. portin  db      -1              ; Has comm port been initialized, -1=not used
  145. xofsnt  db      0               ; Say if we sent an XOFF
  146. xofrcv  db      0               ; Say if we received an XOFF
  147. parmsk  db      0ffh            ; parity mask, 0ffh for no parity, 07fh with
  148. flowoff db      0               ; flow-off char, Xoff or null (if no flow)
  149. flowon  db      0               ; flow-on char, Xon or null
  150. pcwcnt  dw      240             ; number of loops for 1 millisec in pcwait
  151. temp    dw      0
  152. temp2   dw      0
  153. tempsci dw      0               ; temp storage for serint
  154. tempdum dw      0               ; temp storage for serdum
  155. rdbuf   db      80 dup (?)      ; temporary storage
  156.  
  157.                                         ; begin Terminal emulator data set
  158. termtb  db      tttypes                 ; entries for Status, not Set
  159.         mkeyw   'Heath-19',ttheath
  160.         mkeyw   'none',ttgenrc
  161.         mkeyw   'Tek4010',tttek
  162.         mkeyw   'VT102',ttvt100
  163.         mkeyw   'VT52',ttvt52
  164.  
  165. vttbl   db      18                      ; number of entries
  166.         mkeyw   'Character-set',chaval+300h
  167.         mkeyw   'Clear-screen',1000h    ; 1000h = marker here
  168.         mkeyw   'Color',200H            ; screen fore/back colors; 200H=marker
  169.         mkeyw   'Cursor-style',curval
  170.         mkeyw   'Direction',dirval
  171.         mkeyw   'Graphics',800h         ; Tek graphics board, 800h=marker
  172.         mkeyw   'Heath-19',ttheath+100H ; note 100H flag for decoding here
  173.         mkeyw   'Keyclick',keyval
  174.         mkeyw   'Margin-bell',marval
  175.         mkeyw   'None',ttgenrc+100H
  176.         mkeyw   'Newline',newval
  177.         mkeyw   'Rollback',400h         ; note 400H flag for decoding
  178.         mkeyw   'Screen-background',scrval
  179.         mkeyw   'Tabstops',tabval
  180.         mkeyw   'Tek4010',tttek+100H
  181.         mkeyw   'VT102',ttvt100+100H
  182.         mkeyw   'VT52',ttvt52+100H
  183.         mkeyw   'Wrap',wraval
  184.  
  185. scrtab  db      02H                     ; screen attributes
  186.         mkeyw   'normal',00H
  187.         mkeyw   'reverse',01H
  188.  
  189. dirtab  db      2                       ; writing direction
  190.         mkeyw   'left-to-right',0
  191.         mkeyw   'right-to-left',1
  192.  
  193. curtab  db      02H                     ; cursor attributes
  194.         mkeyw   'block',00H
  195.         mkeyw   'underline',01H
  196.  
  197. chatab  db      3                       ; character set (pound sign choice)
  198.         mkeyw   'UK-ascii',0
  199.         mkeyw   'US-ascii',1            ; US ASCII is default (1)
  200.         mkeyw   'Alternate-ROM',3       ; Alternate-ROM character set
  201.  
  202. graftab db      6
  203.         mkeyw   'auto-sensing',0        ; autosensing
  204.         mkeyw   'CGA',1
  205.         mkeyw   'EGA',2
  206.         mkeyw   'VGA',3
  207.         mkeyw   'Hercules',4
  208.         mkeyw   'ATT',5
  209.  
  210. tabtab  db      02H                     ; label says it all!
  211.         mkeyw   'at',0FFH               ; For setting tab stops
  212.         mkeyw   'Clear',00H             ; For clearing tab stops
  213.  
  214. alltab  db      02H                     ; more tab command decoding
  215.         mkeyw   'all',00H
  216.         mkeyw   'at',01H
  217.  
  218. vtable  dw      ontab, curtab, chatab, ontab, ontab, ontab, scrtab, dirtab,0
  219.  
  220. vtsflg equ      this byte               ; define small digits xxxval
  221. newval  equ     $-vtsflg                ; and mask for bit in byte
  222.         db      vsnewline
  223. curval  equ     $-vtsflg
  224.         db      vscursor
  225. chaval  equ     $-vtsflg
  226.         db      vsshift3
  227. keyval  equ     $-vtsflg
  228.         db      vskeyclick
  229. wraval  equ     $-vtsflg
  230.         db      vswrap
  231. marval  equ     $-vtsflg
  232.         db      vsmarginbell
  233. scrval  equ     $-vtsflg
  234.         db      vsscreen
  235. dirval  equ     $-vtsflg
  236.         db      vswdir
  237. numflgs equ     $-vtsflg
  238. tabval  equ     $-vtsflg
  239.         db      0
  240. vtrtns  dw      numflgs dup (flgset), tabset ; dispatch table for vtsflg
  241. colortb db      0,4,2,6,1,5,3,7         ; color reversed-bit setting bytes
  242. clrset  db      ?                       ; Temp for SET Term Tabstops xxx
  243.  
  244. vthlp   db      ' one of the following:',cr,lf
  245.       db '  terminal types of:  None, Heath-19, VT52, VT102, or Tek4010',cr,lf
  246.         db '  Newline-mode    Cursor-style        Character-set (US, UK, Alt)'
  247.         db      cr,lf
  248.         db '  Keyclick        Margin-bell         Screen-background'
  249.         db      ' (normal, reverse)',cr,lf
  250.         db '  Tabstops        Wrap (long lines)   Color (fore & background)'
  251.         db      cr,lf,'  Clear-screen  (clears old startup screen)'
  252.         db      cr,lf,'  Direction Left-to-right or Right-to-left'
  253.         db      ' (screen writing direction)'
  254.         db      cr,lf,'  Graphics  (type of display adapter when in Tek4010'
  255.         db      ' mode)'
  256.         db      cr,lf,'  Rollback  (undo screen roll back before writing new'
  257.         db      ' chars, default=off)$'
  258. cvthlp  db      ' ╧┬╩÷╓«╥╗:',cr,lf
  259.         db '  ┐╔╤í╘±╡─╓╒╢╦└α╨═╬¬: None, Heath-19, VT52, VT102, ╗≥ Tek4010'
  260.         db      cr,lf 
  261.         db '  Newline-mode    Cursor-style        Charcter-set (US, UK, Alt)'
  262.         db      cr,lf
  263.         db      '  Keyclick        Margin-bell         Screen-background'
  264.         db      ' (normal, reverse)',cr,lf
  265.         db      '  Tabstops        Wrap (╢α╨╨╩²)       Color(╟░╛░║═▒│╛░╔½)'
  266.         db      cr,lf,'  Clear-screan  (╟σ│²╛╔╡─╞┴─╗╧╘╩╛)'
  267.         db      cr,lf,'  Direction Left-to-right ╗≥ Right-to-left'
  268.         db      ' (╨┤╞┴─╗╡─╖╜╧≥)'
  269.         db      cr,lf,'  Graphics  (╖┬╒µ Tek4010 ╩▒╧╘╩╛╞≈╩╩┼Σ┐¿╡─└α╨═)'
  270.         db      cr,lf,'  Rollback  (╘┌╨┤╚δ╨┬╡─╫╓╖√╓«╟░╞┴─╗╖¡╗╪,╚▒╩í=off)$'
  271. clrhlp  db      ' one of the following:'
  272.         db      cr,lf,'  AT #s  (to set tabs at column #s)    or'
  273.         db      ' AT start-column:spacing'
  274.         db      cr,lf,'  Clear AT #s (clears individual tabs) or'
  275.         db      ' AT start-column:spacing'
  276.         db      cr,lf,'  Clear ALL  (to clear all tabstops)'
  277.         db      cr,lf,'  Ex: Set term tab at 10, 20, 34        sets tabs'
  278.         db      cr,lf,'  Ex: Set term tab at 1:8        sets tabs at 1, 9,'
  279.                 db      ' 17,...$'
  280.         db      cr,lf,'  Ex: Set term tab clear at 9, 17, 65   clears tabs'
  281.         db      cr,lf,'  Ex: Set term tab clear at 1:8  clears tabs at 1, 9,'
  282.                 db      ' 17,...$'
  283. cclrhlp  db     ' ╧┬╩÷╓«╥╗:'
  284.         db      cr,lf,'  AT #s  (╔Φ╓├ Tab ╡─╬╗╓├(╡┌╝╕┴╨)    ╗≥'
  285.         db      ' AT <╞≡╩╝┴╨>:<┐╒╝Σ(╝┤┐╒╕±╩²)>'
  286.         db      cr,lf,'  Clear AT #s (╟σ│²╕÷▒≡ Tab ╝ⁿ) ╗≥'
  287.         db      ' AT <╞≡╩╝┴╨>:<┐╒╝Σ(╝┤┐╒╕±╩²)>'
  288.         db      cr,lf,'  Clear ALL  (╟σ│²╦∙╙╨ Tab ╝ⁿ)'
  289.         db      cr,lf,'  └²╚τ: Set term tab at 10, 20, 34        sets tabs'
  290.         db      cr,lf,'  └²╚τ: Set term tab at 1:8        sets tabs at 1, 9,'
  291.                 db      ' 17,...$'
  292.         db      cr,lf,'  └²╚τ: Set term tab clear at 9, 17, 65   clears tabs'
  293.         db      cr,lf,'  └²╚τ: Set term tab clear at 1:8  clears tabs at 1, 9,'
  294.                 db      ' 17,...$'
  295. tbserr  db      cr,lf,'?Column number is not in range 1 to screen width-1$'
  296. ctbserr db      cr,lf,'?┴╨╩²▓╗╘┌ 1 ╡╜ <╞┴┐φ-1>╡─╖╢╬º─┌$'
  297. colhlp  db      cr,lf,'  Set Term Color  value, value, value, ...'
  298.         db      cr,lf,'   0 no-snow mode on an IBM CGA and white on black'
  299.         db      cr,lf,'   1 for high intensity foreground'
  300.         db      cr,lf,'  10 for fast CGA screen updating (may cause snow)'
  301.         db      cr,lf,'  Foreground color (30-37) = 30 + sum of colors'
  302.         db      cr,lf,'  Background color (40-47) = 40 + sum of colors'
  303.         db      cr,lf,'    where colors are  1 = red, 2 = green, 4 = blue'
  304.         db      cr,lf,'  Ex: 0, 1, 37, 44   IBM CGA(0), bright(1) white(37)'
  305.         db      ' chars on a blue(44) field'
  306.         db      cr,lf,'  Attributes are applied in order of appearance.$'
  307. ccolhlp db      cr,lf,'  ╔Φ╓├╓╒╢╦╤╒╔½ ( Set Term Color <╓╡>,<╓╡>,<╓╡>, ...)'
  308.         db      cr,lf,'   0 -- IBM CGA ╡─╬▐╤⌐╗¿╡π╖╜╩╜╝░┐╒╕±┤ª╬¬░╫╔½'
  309.         db      cr,lf,'   1 -- ╕▀┴┴╢╚╟░╛░╔½'
  310.         db      cr,lf,'  10 -- CGA╞┴─╗╦ó╨┬┐∞╦┘(┐╔─▄╗ß▓·╔·╤⌐╗¿)'
  311.         db      cr,lf,'  ╟░╛░╔½╚í╓╡ (30-37) = 30 + ╔½▓╩╓╡╓«║═'
  312.         db      cr,lf,'  ▒│╛░╔½╚í╓╡ (40-47) = 40 + ╔½▓╩╓╡╓«║═'
  313.         db      cr,lf,'      ╒Γ└∩╡─╤╒╔½╩╟  1 = ║∞╔½, 2 = ┬╠╔½, 4 = └╢╔½'
  314.         db      cr,lf,'  └²╚τ: 0, 1, 37, 44  ▒φ╩╛ IBM CGA(0), ╝╙┴┴(1)░╫╔½(37)'
  315.         db      '╡─╧╘╩╛╫╓╖√, ▒│╛░╬¬└╢╔½(44)'
  316.         db      cr,lf,'$'
  317. ; ??      db      cr,lf,'  Attributes are applied in order of appearance.$'
  318. colerr  db      cr,lf,'?Value not in range of 0, 1, 10, 30-37, or 40-47$'
  319. ccolerr db      cr,lf,'?╓╡▓╗╘┌ 0, 1, 10, 30-37, ╗≥ 44-47 ╖╢╬º─┌$'
  320. vtwrap  db      'Term wrap-lines: $'
  321. cvtwrap  db     'Term wrap-lines: $'
  322. vtbell  db      'Term margin-bell: $'
  323. cvtbell  db     'Term margin-bell: $'
  324. vtnewln db      'Term newline: $'
  325. cvtnewln db     'Term ╨┬╨╨: $'
  326. vtcur   db      'Term cursor-style: $'
  327. cvtcur   db     'Term ╣Γ▒Ω╖╜╩╜: $'
  328. vtcset  db      'Term character-set: $'
  329. cvtcset  db     'Term ╫╓╖√╝»: $'
  330. vtclik  db      'Term key-click: $'
  331. cvtclik  db     'Term key-click: $'
  332. vtscrn  db      'Term screen-background: $'
  333. cvtscrn  db     'Term ╞┴─╗▒│╛░╔½: $'
  334. colst1  db      'Term color  foreground:3$'
  335. ccolst1  db     'Term ╔½▓╩ ╟░╛░╔½:3$'
  336. colst2  db      ' background:4$'
  337. ccolst2  db     ' ▒│╛░╔½:4$'
  338. vtgraf  db      'Term graphics: $'
  339. cvtgraf  db     'Term ═╝╨╬╖╜╩╜: $'
  340. vtrolst db      'Term rollback: $'
  341. cvtrolst db     'Term rollback: $'
  342. vtdir   db      'Term direction: $'
  343. cvtdir   db     'Term ╧╘╩╛╖╜╧≥: $'
  344.                                                         ; terminal emulator
  345. vtstbl  stent   <srchkb,vtwrap,ontab,vswrap,vtemu.vtflgop>      ; line wrap
  346.         stent   <srchkb,vtbell,ontab,vsmarginbell,vtemu.vtflgop>; margin bell
  347.         stent   <srchkb,vtcur,curtab,vscursor,vtemu.vtflgop>    ; cursor type
  348.         stent   <srchkb,vtnewln,ontab,vsnewline,vtemu.vtflgop>  ; newline
  349.         stent   <srchkb,vtscrn,scrtab,vsscreen,vtemu.vtflgop>   ; screen
  350.         stent   <srchkw,vtcset,chatab,vtemu.vtchset>            ; char set
  351.         stent   <srchkb,vtdir,dirtab,vswdir,vtemu.vtflgop>      ; write direct
  352.         stent   <colstat>                                       ; VT100 colors
  353.         stent   <srchkb,vtclik,ontab,vskeyclick,vtemu.vtflgop>  ; keyclick
  354.         stent   <srchkw,vtrolst,ontab,vtroll>
  355.         stent   <srchkw,vtgraf,graftab,tekgraf>
  356.         stent   <filler>
  357.         stent   <tabstat>       ; VT100 tab status - needs one whole line
  358.         dw      0               ; end of table
  359.                                                 ; end of Terminal data set
  360.                                                         ; terminal emulator
  361. cvtstbl  stent   <srchkb,cvtwrap,ontab,vswrap,vtemu.vtflgop>      ; line wrap
  362.         stent   <srchkb,cvtbell,ontab,vsmarginbell,vtemu.vtflgop>; margin bell
  363.         stent   <srchkb,cvtcur,curtab,vscursor,vtemu.vtflgop>    ; cursor type
  364.         stent   <srchkb,cvtnewln,ontab,vsnewline,vtemu.vtflgop>  ; newline
  365.         stent   <srchkb,cvtscrn,scrtab,vsscreen,vtemu.vtflgop>   ; screen
  366.         stent   <srchkw,cvtcset,chatab,vtemu.vtchset>            ; char set
  367.         stent   <srchkb,cvtdir,dirtab,vswdir,vtemu.vtflgop>      ; write direct
  368.         stent   <colstat>                                       ; VT100 colors
  369.         stent   <srchkb,cvtclik,ontab,vskeyclick,vtemu.vtflgop>  ; keyclick
  370.         stent   <srchkw,cvtrolst,ontab,vtroll>
  371.         stent   <srchkw,cvtgraf,graftab,tekgraf>
  372.         stent   <filler>
  373.         stent   <tabstat>       ; VT100 tab status - needs one whole line
  374.         dw      0               ; end of table
  375.                                                 ; end of Terminal data set
  376.  
  377. ontab   db      2                       ; Two entries
  378.         mkeyw   'off',0
  379.         mkeyw   'on',1
  380.  
  381. comptab db      15                      ; communications port options
  382.         mkeyw   'Bios1','0'+1           ; '0' is to flag value as forced Bios
  383.         mkeyw   'Bios2','0'+2
  384.         mkeyw   'Bios3','0'+3
  385.         mkeyw   'Bios4','0'+4
  386.         mkeyw   'COM1',1                ; these go straight to the hardware
  387.         mkeyw   'COM2',2
  388.         mkeyw   'COM3',3
  389.         mkeyw   'COM4',4
  390.         mkeyw   '1',1                   ; straight to the hardware
  391.         mkeyw   '2',2
  392.         mkeyw   '3',3
  393.         mkeyw   '4',4
  394.         mkeyw   'NetBios','N'           ; Netbios
  395.         mkeyw   'UB-Net1','U'           ; Ungermann Bass Net One
  396.         mkeyw   '   ',0                 ; port is not present, for Status
  397.  
  398. ; this table is indexed by the baud rate definitions given in
  399. ; pcdefs.  Unsupported baud rates should contain FF.
  400. bddat   label   word
  401.         dw      9E4H            ; 45.5 baud
  402.         dw      900H            ; 50 baud
  403.         dw      600H            ; 75 baud
  404.         dw      417H            ; 110 baud
  405.         dw      359H            ; 134.5 baud
  406.         dw      300H            ; 150 baud
  407.         dw      180H            ; 300 baud
  408.         dw      0C0H            ; 600 baud
  409.         dw      60H             ; 1200 baud
  410.         dw      40H             ; 1800 baud
  411.         dw      3AH             ; 2000 baud
  412.         dw      30H             ; 2400 baud
  413.         dw      18H             ; 4800 baud
  414.         dw      0CH             ; 9600 baud
  415.         dw      06H             ; 19200 baud
  416.         dw      03H             ; 38400 baud
  417.         dw      02h             ; 57600 baud
  418.         dw      01h             ; 115200 baud
  419. baudlen equ     ($-bddat)/2     ; number of entries above
  420.  
  421. jrbddat label   word            ; Baud rate table for IBM PCjrs [tm]
  422.         dw      0FFH            ; 45.5 baud  -- Not supported
  423.         dw      8bfH            ; 50 baud
  424.         dw      5d3H            ; 75 baud
  425.         dw      3f9H            ; 110 baud
  426.         dw      340H            ; 134.5 baud
  427.         dw      2e9H            ; 150 baud
  428.         dw      175H            ; 300 baud
  429.         dw      0baH            ; 600 baud
  430.         dw      5dH             ; 1200 baud
  431.         dw      3eH             ; 1800 baud
  432.         dw      38H             ; 2000 baud
  433.         dw      2fH             ; 2400 baud
  434.         dw      18H             ; 4800 baud
  435.         dw      0CH             ; 9600 baud
  436.         dw      06H             ; 19200 baud
  437.         dw      03H             ; 38400 baud
  438.         dw      02h             ; 57600 baud
  439.         dw      01h             ; 115200 baud
  440.  
  441. ; this table is indexed by the baud rate definitions given in
  442. ; pcdefs.  Unsupported baud rates should contain FF.
  443. ; Clone: bits are for Bios speed, no parity, 8 data bits. [jrd]
  444. clbddat   label   word
  445.         dw      0FFH            ; 45.5 baud  -- Not supported
  446.         dw      0FFH            ; 50 baud
  447.         dw      0FFH            ; 75 baud
  448.         dw      03H             ; 110 baud
  449.         dw      0FFH            ; 134.5 baud
  450.         dw      23H             ; 150 baud
  451.         dw      43H             ; 300 baud
  452.         dw      63H             ; 600 baud
  453.         dw      83H             ; 1200 baud
  454.         dw      0ffH            ; 1800 baud
  455.         dw      0FFH            ; 2000 baud
  456.         dw      0a3H            ; 2400 baud
  457.         dw      0c3H            ; 4800 baud
  458.         dw      0e3H            ; 9600 baud
  459.         dw      0FFH            ; 19200 baud
  460.         dw      0FFH            ; 38400 baud
  461.         dw      0FFH            ; 57600 baud
  462.         dw      0FFH            ; 115200 baud
  463. ; variables for serial interrupt handler
  464.  
  465. source  db      bufsiz+2 DUP(?) ; Buffer for data from port (+ 2 guard bytes)
  466. srcpnt  dw      source          ; Pointer in buffer (DI)
  467. count   dw      0               ; Number of chars in int buffer
  468. mst     dw      0               ; Modem status address
  469. mdat    dw      0               ; Modem data address
  470. mdeoi   db      0               ; End-of-Interrupt value
  471. mdmhand db      0               ; Modem status register, current
  472.  
  473. ; Information structures for IBM Netbios compatible Local Area Networks
  474.                                 ; network constants
  475. netint  equ     5ch             ; Netbios interrupt
  476. nadd    equ     30h             ; Add name
  477. ncall   equ     10h             ; CALL, open a virtual circuit session
  478. ncancel equ     35h             ; Cancel command in scb buffer
  479. ndelete equ     31h             ; Delete Name
  480. nhangup equ     12h             ; Hangup virtual circuit session
  481. nlisten equ     11h             ; Listen for session caller
  482. naustat equ     33h             ; Network Adapter Unit, get status of
  483. nreceive equ    15h             ; Receive on virtual circuit
  484. nreset  equ     32h             ; Reset NAU and tables
  485. nsend   equ     14h             ; Send on virtual circuit
  486. nsestat equ     34h             ; Session, get status of
  487. netbrk  equ     70h             ; STARLAN Int 5bh send Break
  488. nowait  equ     80h             ; no-wait, command modifier
  489. npending equ    0ffh            ; Pending request
  490. exnbios equ     0400h           ; Int 2ah exec netbios call, error retry
  491. nbuflen equ     256             ; bytes in each network buffer (two of them)
  492. netbios equ     8000h           ; network type bit, using NetBios
  493. starlan equ     1               ; network type bit, AT&T STARLAN
  494. netone  equ     02h             ; [ohl] type bit, Ungermann-Bass Net/One
  495. ;xncall equ     74h             ; [ohl] Net/One extended call function
  496. netci   equ     6Bh             ; [ohl] Net/One command interface interrupt,
  497.                                 ; [ohl]  used for the following functions:
  498. nciwrit equ     0000h           ; [ohl] Net/One write function
  499. nciread equ     0100h           ; [ohl] Net/One read function
  500. ncistat equ     0700h           ; [ohl] Net/One status function
  501. ncicont equ     0600h           ; [ohl] Net/One control function
  502. ncibrk  equ     02h             ; [ohl] Net/One code for a break
  503. ncidis  equ     04h             ; [ohl] Net/One code for disconnect
  504. ncihld  equ     06h             ; [ohl] code for placing a connection on hold
  505. ;; pcnet values:        0       no network available at all
  506. ;;                      1       network board reports itself as present
  507. ;;                      2       and session is in progress
  508. ;; extrn byte pcnet is  defined in msster.
  509.  
  510. portn   prtinfo <0FFFH,0,defpar,1,0,defhand,floxon> ; port struc for PORTN
  511. scbst struc                     ; Session (Network) Control Block [PCnet comp]
  512.         scb_cmd         db 0    ; command code for Netbios Int 5ch
  513.         scb_err         db 0    ; error return or request is pending
  514.         scb_vcid        db 0    ; virtual circuit ident number
  515.         scb_num         db 0    ; local name-number
  516.         scb_baddr       dw ?    ; buffer address, offset
  517.                         dw datas ;  and segment
  518.         scb_length      dw ?    ; length of buffer data
  519.         scb_rname       db '*               ' ; remote name, 16 chars space
  520.         scb_lname       db 'cckermit        ' ; local name      filled
  521.                         db 0    ; reserved
  522.                         db 0    ; reserved
  523.         scb_post        dw ?    ; interrupt driven post address, offset
  524.                         dw code ;  and segment
  525.                         db 0    ; LAN_num (adapter #), set to zero for STARLAN
  526.         scb_done        db 0    ; command complete status
  527.                                 ; the 14 bytes below are normally 'reserved'
  528.                                 ; STARLAN uses 5 for long/special call names
  529.                                 ;  together with STARLAN specific Int 5bh
  530.         scb_vrname      dw 0,0  ; Variable length call name ptr offset,segment
  531.         scb_vrlen       db 0    ; length of vrname
  532.                         db 9 dup (0)    ; reserved
  533. scbst   ends
  534.  
  535. rcv     scbst   <,,,,rcvbuf,,length rcvbuf,,,,,rpost>; declare scb for rcvr
  536. xmt     scbst   <,,,,xmtbuf,,length xmtbuf,,,,,spost>;  for xmtr
  537. lsn     scbst   <,,,,xmtbuf,,length xmtbuf,,,,,lpost>;  for server listen
  538. can     scbst   <>                                   ;  for cancels
  539. pcnet   db      0               ; Network is functioning
  540. xmtbuf  db      nbuflen dup (0) ; network buffer for transmitter
  541. xmtcnt  dw      0               ; occupancy in current output buffer
  542. xmtbufx db      nbuflen dup (0) ; external version of xmtbuf (dbl buffers)
  543. rcvbuf  db      nbuflen dup (0) ; network buffer for receiver
  544. nambuf  db      65 dup (?)      ; network long name storage (STARLAN)
  545. sposted db      0               ; send interlock, 0 if no send posted
  546. rposted db      0               ; rcv interlock, 0 if no receive posted
  547. lposted db      0               ; listen outstanding (if non-zero)
  548. netdbfr db      0               ; non-zero if net board is double buffered
  549. deflname db     'cckermit        ' ; default local name, 16 bytes
  550. nsbrk   dw      0               ; net can send Break
  551. nettype dw      0               ; kind of local area net (vendor bit field)
  552. chkmsg1 db      cr,lf,' Cannot construct a local Kermit name, error = $'
  553. cchkmsg1 db     cr,lf,' ▓╗─▄╣╣╘∞╥╗╕÷▒╛╡╪ Kermit ├√, ┤φ╬≤║┼ = $'
  554. chkmsg2 db      cr,lf,lf,' Name $'
  555. cchkmsg2 db     cr,lf,lf,' ├√╫╓ $'
  556. chkmsg3 db      ' is already in use. Please enter another of'
  557.         db      cr,lf,' 1 - 14 letters or numbers (or nothing to quit): $'
  558. cchkmsg3 db     ' ╥╤╘┌╩╣╙├. ╟δ╩Σ╚δ┴φ═Γ╥╗╕÷'
  559.          db     cr,lf,'1-14╕÷╫╓─╕╗≥╩²╫╓╡─├√╫╓(╗≥╓▒╜╙═╦│÷): $'
  560. netmsg1 db      cr,lf,' Checking if our node name is unique ...$'
  561. cnetmsg1 db     cr,lf,' ╝∞▓Θ╬╥├╟╡─╜ß╡π├√╩╟╖±╬¿╥╗ ...'
  562. netmsg2 db      cr,lf,' The network is active, our name is $'
  563. cnetmsg2 db     cr,lf,' ═°┬τ╒²╘┌╘╦╨╨╓«╓╨, ╬╥├╟╡─├√╫╓╩╟ $'
  564. nonetmsg db     cr,lf,'?The network is not available$'
  565. cnonetmsg db    cr,lf,'?═°┬τ╬▐╖¿╩╣╙├$'
  566. nethlp  db      cr,lf,' Enter node name of remote system,'
  567.         db      cr,lf,'  or a carriage return to use current name,'
  568.         db      cr,lf,'  or a carriage return  for server mode.$'
  569. cnethlp db      cr,lf,' ╩Σ╚δ╘╢╢╦╧╡═│╡─╜┌╡π├√,'
  570.         db      cr,lf,'   ╗≥┤≥╗╪│╡╥╘▒π╓▒╜╙╩╣╙├╡▒╟░╡─├√╫╓,'
  571.         db      cr,lf,'   ╗≥┤≥╗╪│╡╜°╚δ╖■╬±╖╜╩╜.$'
  572. ngodset db      cr,lf,' Connecting to network node: $'
  573. cngodset db     cr,lf,' ┴¬╜╙╡╜═°┬τ╜┌╡π: $'
  574. nbadset db      bell,cr,lf,' Cannot reach network node: $'
  575. cnbadset db     bell,cr,lf,' ╬▐╖¿╡╜┤∩═°┬τ╜┌╡π: $'
  576. recmsg  db      cr,lf,' Network receive failed, status = $'
  577. crecmsg db      cr,lf,' ═°┬τ╜╙╩╒╩º░▄, ╫┤╠¼ = $'
  578. sndmsg  db      cr,lf,' Network send failed, status = $'
  579. csndmsg db      cr,lf,' ═°┬τ╖ó╦═╩º░▄, ╫┤╠¼ = $'
  580. naskpmt db      cr,lf,' A network session is active.',cr,lf
  581.         db      ' Enter RESUME to resume it or NEW to start a new session.'
  582.         db      cr,lf,'> $'
  583. cnaskpmt db     cr,lf,' ═°┬τ╢╘╗░╙╨╨º.',cr,lf
  584.         db      ' ╩Σ╚δ RESUME ╝╠╨°╢╘╗░ ╗≥ ╩Σ╚δ NEW ┐¬╩╝╥╗┤╬╨┬╡─╢╘╗░.'
  585.         db      cr,lf,'> $'
  586. nettab  db      2
  587.         mkeyw   'New',0
  588.         mkeyw   'Resume',1
  589. datas   ends
  590.  
  591.  
  592.