home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
archives
/
ccdos.tar.gz
/
ccdos.tar
/
ccxibm.dat
< prev
next >
Wrap
Text File
|
1991-09-08
|
30KB
|
592 lines
public serini, serrst, clrbuf, outchr, coms, vts, vtstat
public dodel, ctlu, cmblnk, locate, prtchr, dobaud, clearl
public dodisk, getbaud, beep, termtb, shomodem, getmodem, mdmhand
public count, xofsnt, puthlp, putmod, clrmod, poscur, holdscr
public sendbr, sendbl, machnam, setktab, setkhlp, lclini, showkey
public ihosts, ihostr, dtrlow, serhng, comptab, pcwait
include ccsdef.h
off equ 0
bufon equ 1 ; buffer level xon/xoff on-state control flag
usron equ 2 ; user level xon/xoff on-state control flag
mntrgh equ bufsiz*3/4 ; High point = 3/4 of buffer full
mntrgl equ bufsiz/4 ; Low point = 1/4 buffer full
BRKBIT EQU 040H ; Send-break bit.
TIMERCMD EQU 43h ; 8253/4 Timer chip command port
TIMER2DATA EQU 42h ; 8253/4 Timer 2 data port
PPI_PORT EQU 61h ; 8255 prog peripheral chip control port
MCONF EQU 11H ; Bios Machine configuration s/ware interrupt.
KEYB EQU 16H ; Bios keyboard software interrupt
VIDEO EQU 10H ; Bios Video display software interrupt
RS232 EQU 14H ; Bios RS232 serial port s/ware interrupt
; constants used by serial port handler
;;MDMDAT1 EQU 03F8H ; Address of port com1 (data)
;;MDMCOM1 EQU 03FBH ; Address of port com1 (command)
;;MDMSTS1 EQU 03FDH ; Address of port com1 (status)
;;MDMDAT2 EQU 02F8H ; Port com2 data
;;MDMCOM2 EQU 02FBH ; Port com2 command
;;MDMSTS2 EQU 02FDH ; Port com2 status
MDMINTV EQU 0CH ; IRQ4 com1/3 port interrupt vector
MDINTV2 EQU 0BH ; IRQ3 com2/4 port interrupt vector
MDMINTO EQU 0EFH ; Mask to enable interrupt level IRQ4
MDINTO2 EQU 0F7H ; Mask to enable interrupt level IRQ3
MDMINTC EQU 010H ; Bit to set to disable interrupts for IRQ4
MDINTC2 EQU 008H ; Bit to set to disable interrupts for IRQ3
EOICOM EQU 0064H ; End of interrupt for IRQ4
EOICOM2 EQU 0063H ; End of interrupt for IRQ3
INTCONT EQU 0021H ; Address of 8259 interrupt controller ICW2-3
INTCON1 EQU 0020H ; Address of 8259 ICW1
MDMINP EQU 1 ; Input ready bit
MDMOVER EQU 2 ; Receiver overrun
; external variables used:
; drives - # of disk drives on system
; flags - global flags as per flginfo structure defined in pcdefs
; trans - global transmission parameters, trinfo struct defined in pcdefs
; portval - pointer to current portinfo structure (currently either port1
; or port2)
; port1, port2 - portinfo structures for the corresponding ports
; low_rgt - low byte = last column (typ 79), high byte = last text row
; (typ 23) in screen coordinates (start at 0), set by msyibm.
; global variables defined in this module:
; xofsnt, xofrcv - tell whether we saw or sent an xoff.
; setktab - keyword table for redefining keys (should contain a 0 if
; not implemented)
; setkhlp - help for setktab.
datas segment public 'datas'
extrn drives:byte, flags:byte, trans:byte, ttyact:byte
extrn portval:word, port1:byte, port2:byte, port3:byte, port4:byte
extrn lclexit:word, rxtable:byte, decbuf:byte, taklev:byte
extrn refresh:byte, scbattr:byte, low_rgt:word, vtemu:byte
extrn vtroll:byte, tekflg:byte, tekgraf:byte, vtclear:byte
extrn isccdos:byte ; Jun 25,1990
; structure for status information table sttab.
stent struc
sttyp dw ? ; type (actually routine to call)
msg dw ? ; message to print
val2 dw ? ; needed value: another message, or tbl addr
tstcel dw ? ; address of cell to test, in data segment
basval dw 0 ; base value, if non-zero
stent ends
setktab db 0 ; superceded by msuibm code, return 0 here
setkhlp db '$' ; and add empty help string
holdscr db 0 ; Hold-Screen, non-zero to stop reading
savsci dd ? ; old serial port interrupt vector
sav232 dd ? ; Original Bios Int 14H address, in Code seg
savirq db ? ; Original Interrupt mask for IRQ
savlcr db ? ; Original Line Control Reg (3fbh) contents
brkval db BRKBIT ; What to send for a break
brkadr dw 0 ; Where to send it
intkind db 0 ; cause of serial port interrupt
isps2 db 0 ; non-zero if real IBM PS/2
modem mdminfo <>
hngmsg db cr,lf,' The phone or network connection should have hungup'
db cr,lf,'$'
chngmsg db cr,lf,' ╡τ╗░╗≥═°┬τ┴¬╜╙╥╤╛¡╣╥╢╧'
db cr,lf,'$'
hnghlp db cr,lf,' The modem control lines DTR and RTS for the current'
db ' port are forced low (off)'
db cr,lf,' to hangup the phone. Normally, Kermit leaves them'
db ' high (on) when it exits.',cr,lf
db ' For networks, the active session is terminated.',cr,lf,'$'
chnghlp db cr,lf,' ╡▒╟░┤«╨╨┐┌╡─╡≈╓╞╜Γ╡≈╞≈┐╪╓╞╧▀ DTR ║═ RTS ╥╤▒╗╓├│╔╡═'
db '╡τ╞╜(off)'
db cr,lf,', ╥╘▒π╜½╡τ╗░╣╥╢╧. ═¿│ú, Kermit ═╦│÷╧╡═│╩▒╒Γ╨⌐┐╪╓╞╧▀'
db '╚╘╜½▒ú│╓╕▀╡τ╞╜(on)▓╗▒Σ;',cr,lf
db '╢╘╙δ═°┬τ, ╒²╜°╨╨╡─╢╘╗░╜½▒╗╓╒╓╣.',cr,lf,'$'
erms40 db cr,lf,'?Warning: Unrecognized baud rate',cr,lf,'$'
cerms40 db cr,lf,'?╛»╕µ: ▓╗─▄╜╙╩▄╡─▓¿╠╪┬╩',cr,lf,'$'
erms41 db cr,lf,'?More parameters are needed$'
cerms41 db cr,lf,'?╨Φ╥¬╕ⁿ╢α╡─▓╬╩²$'
badbd db cr,lf,'Unimplemented baud rate$'
cbadbd db cr,lf,'▓╗─▄╔Φ╓├╡─▓¿╠╪┬╩$'
badprt db cr,lf,' Serial port $'
cbadprt db cr,lf,' ┤«╨╨┐┌ $'
badprt2 db ' is not available',cr,lf,'$'
cbadprt2 db ' ▓╗─▄╩╣╙├',cr,lf,'$'
biospt db 'BIOS$'
compt db 'COM$'
unkpt db 'Unknown$'
cunkpt db '▓╗╚╧╩╢$'
biosmsg db cr,lf,'This port operates through the Bios',cr,lf,'$'
cbiosmsg db cr,lf,'┤╦╢╦┐┌═¿╣²Bios▓┘╫≈',cr,lf,'$'
msmsg1 db cr,lf,' Modem is not ready: DSR is off$'
cmsmsg1 db cr,lf,' Modem ├╗╙╨╫╝▒╕║├ : DSR ╬¬ off$'
msmsg2 db cr,lf,' Modem is ready: DSR is on$'
cmsmsg2 db cr,lf,' Model╥╤╫╝▒╕║├: DSR ╬¬ on$'
msmsg3 db cr,lf,' No Carrier Detect: CD is off$'
cmsmsg3 db cr,lf,' ├╗╙╨╘╪▓¿╨┼║┼: CD ╬¬ off $'
msmsg4 db cr,lf,' Carrier Detect: CD is on$'
cmsmsg4 db cr,lf,' ╙╨╘╪▓¿╨┼║┼: CD ╬¬ on$'
msmsg5 db cr,lf,' No Clear To Send: CTS is off$'
cmsmsg5 db cr,lf,' ├╗╙╨╟σ│²╖ó╦═╨┼║┼: CTS ╬¬ off$'
msmsg6 db cr,lf,' Clear To Send: CTS is on$'
cmsmsg6 db cr.lf,' ├╗╙╨╟σ│²╖ó╦═╨┼║┼: CTS ╬¬ on$'
msmsg7 db cr,lf,' Modem is not used by the Network$'
cmsmsg7 db cr,lf,' ═°┬τ╬┤╩╣╙├╡≈╓╞╜Γ╡≈╞≈$'
machnam db 'IBM-PC$'
crlf db cr,lf,'$'
delstr db BS,BS,' ',BS,BS,'$' ; Delete string
clrlin db cr,'$' ; Clear line (just the cr part)
tabmsg db 'Tab stops ''T'' and columns -$'
clone db 0 ; clone flag (0 = real, 'B' = system Bios,
; 'N'=NetBios/network, 'U'=Ungermann/Bass net)
portin db -1 ; Has comm port been initialized, -1=not used
xofsnt db 0 ; Say if we sent an XOFF
xofrcv db 0 ; Say if we received an XOFF
parmsk db 0ffh ; parity mask, 0ffh for no parity, 07fh with
flowoff db 0 ; flow-off char, Xoff or null (if no flow)
flowon db 0 ; flow-on char, Xon or null
pcwcnt dw 240 ; number of loops for 1 millisec in pcwait
temp dw 0
temp2 dw 0
tempsci dw 0 ; temp storage for serint
tempdum dw 0 ; temp storage for serdum
rdbuf db 80 dup (?) ; temporary storage
; begin Terminal emulator data set
termtb db tttypes ; entries for Status, not Set
mkeyw 'Heath-19',ttheath
mkeyw 'none',ttgenrc
mkeyw 'Tek4010',tttek
mkeyw 'VT102',ttvt100
mkeyw 'VT52',ttvt52
vttbl db 18 ; number of entries
mkeyw 'Character-set',chaval+300h
mkeyw 'Clear-screen',1000h ; 1000h = marker here
mkeyw 'Color',200H ; screen fore/back colors; 200H=marker
mkeyw 'Cursor-style',curval
mkeyw 'Direction',dirval
mkeyw 'Graphics',800h ; Tek graphics board, 800h=marker
mkeyw 'Heath-19',ttheath+100H ; note 100H flag for decoding here
mkeyw 'Keyclick',keyval
mkeyw 'Margin-bell',marval
mkeyw 'None',ttgenrc+100H
mkeyw 'Newline',newval
mkeyw 'Rollback',400h ; note 400H flag for decoding
mkeyw 'Screen-background',scrval
mkeyw 'Tabstops',tabval
mkeyw 'Tek4010',tttek+100H
mkeyw 'VT102',ttvt100+100H
mkeyw 'VT52',ttvt52+100H
mkeyw 'Wrap',wraval
scrtab db 02H ; screen attributes
mkeyw 'normal',00H
mkeyw 'reverse',01H
dirtab db 2 ; writing direction
mkeyw 'left-to-right',0
mkeyw 'right-to-left',1
curtab db 02H ; cursor attributes
mkeyw 'block',00H
mkeyw 'underline',01H
chatab db 3 ; character set (pound sign choice)
mkeyw 'UK-ascii',0
mkeyw 'US-ascii',1 ; US ASCII is default (1)
mkeyw 'Alternate-ROM',3 ; Alternate-ROM character set
graftab db 6
mkeyw 'auto-sensing',0 ; autosensing
mkeyw 'CGA',1
mkeyw 'EGA',2
mkeyw 'VGA',3
mkeyw 'Hercules',4
mkeyw 'ATT',5
tabtab db 02H ; label says it all!
mkeyw 'at',0FFH ; For setting tab stops
mkeyw 'Clear',00H ; For clearing tab stops
alltab db 02H ; more tab command decoding
mkeyw 'all',00H
mkeyw 'at',01H
vtable dw ontab, curtab, chatab, ontab, ontab, ontab, scrtab, dirtab,0
vtsflg equ this byte ; define small digits xxxval
newval equ $-vtsflg ; and mask for bit in byte
db vsnewline
curval equ $-vtsflg
db vscursor
chaval equ $-vtsflg
db vsshift3
keyval equ $-vtsflg
db vskeyclick
wraval equ $-vtsflg
db vswrap
marval equ $-vtsflg
db vsmarginbell
scrval equ $-vtsflg
db vsscreen
dirval equ $-vtsflg
db vswdir
numflgs equ $-vtsflg
tabval equ $-vtsflg
db 0
vtrtns dw numflgs dup (flgset), tabset ; dispatch table for vtsflg
colortb db 0,4,2,6,1,5,3,7 ; color reversed-bit setting bytes
clrset db ? ; Temp for SET Term Tabstops xxx
vthlp db ' one of the following:',cr,lf
db ' terminal types of: None, Heath-19, VT52, VT102, or Tek4010',cr,lf
db ' Newline-mode Cursor-style Character-set (US, UK, Alt)'
db cr,lf
db ' Keyclick Margin-bell Screen-background'
db ' (normal, reverse)',cr,lf
db ' Tabstops Wrap (long lines) Color (fore & background)'
db cr,lf,' Clear-screen (clears old startup screen)'
db cr,lf,' Direction Left-to-right or Right-to-left'
db ' (screen writing direction)'
db cr,lf,' Graphics (type of display adapter when in Tek4010'
db ' mode)'
db cr,lf,' Rollback (undo screen roll back before writing new'
db ' chars, default=off)$'
cvthlp db ' ╧┬╩÷╓«╥╗:',cr,lf
db ' ┐╔╤í╘±╡─╓╒╢╦└α╨═╬¬: None, Heath-19, VT52, VT102, ╗≥ Tek4010'
db cr,lf
db ' Newline-mode Cursor-style Charcter-set (US, UK, Alt)'
db cr,lf
db ' Keyclick Margin-bell Screen-background'
db ' (normal, reverse)',cr,lf
db ' Tabstops Wrap (╢α╨╨╩²) Color(╟░╛░║═▒│╛░╔½)'
db cr,lf,' Clear-screan (╟σ│²╛╔╡─╞┴─╗╧╘╩╛)'
db cr,lf,' Direction Left-to-right ╗≥ Right-to-left'
db ' (╨┤╞┴─╗╡─╖╜╧≥)'
db cr,lf,' Graphics (╖┬╒µ Tek4010 ╩▒╧╘╩╛╞≈╩╩┼Σ┐¿╡─└α╨═)'
db cr,lf,' Rollback (╘┌╨┤╚δ╨┬╡─╫╓╖√╓«╟░╞┴─╗╖¡╗╪,╚▒╩í=off)$'
clrhlp db ' one of the following:'
db cr,lf,' AT #s (to set tabs at column #s) or'
db ' AT start-column:spacing'
db cr,lf,' Clear AT #s (clears individual tabs) or'
db ' AT start-column:spacing'
db cr,lf,' Clear ALL (to clear all tabstops)'
db cr,lf,' Ex: Set term tab at 10, 20, 34 sets tabs'
db cr,lf,' Ex: Set term tab at 1:8 sets tabs at 1, 9,'
db ' 17,...$'
db cr,lf,' Ex: Set term tab clear at 9, 17, 65 clears tabs'
db cr,lf,' Ex: Set term tab clear at 1:8 clears tabs at 1, 9,'
db ' 17,...$'
cclrhlp db ' ╧┬╩÷╓«╥╗:'
db cr,lf,' AT #s (╔Φ╓├ Tab ╡─╬╗╓├(╡┌╝╕┴╨) ╗≥'
db ' AT <╞≡╩╝┴╨>:<┐╒╝Σ(╝┤┐╒╕±╩²)>'
db cr,lf,' Clear AT #s (╟σ│²╕÷▒≡ Tab ╝ⁿ) ╗≥'
db ' AT <╞≡╩╝┴╨>:<┐╒╝Σ(╝┤┐╒╕±╩²)>'
db cr,lf,' Clear ALL (╟σ│²╦∙╙╨ Tab ╝ⁿ)'
db cr,lf,' └²╚τ: Set term tab at 10, 20, 34 sets tabs'
db cr,lf,' └²╚τ: Set term tab at 1:8 sets tabs at 1, 9,'
db ' 17,...$'
db cr,lf,' └²╚τ: Set term tab clear at 9, 17, 65 clears tabs'
db cr,lf,' └²╚τ: Set term tab clear at 1:8 clears tabs at 1, 9,'
db ' 17,...$'
tbserr db cr,lf,'?Column number is not in range 1 to screen width-1$'
ctbserr db cr,lf,'?┴╨╩²▓╗╘┌ 1 ╡╜ <╞┴┐φ-1>╡─╖╢╬º─┌$'
colhlp db cr,lf,' Set Term Color value, value, value, ...'
db cr,lf,' 0 no-snow mode on an IBM CGA and white on black'
db cr,lf,' 1 for high intensity foreground'
db cr,lf,' 10 for fast CGA screen updating (may cause snow)'
db cr,lf,' Foreground color (30-37) = 30 + sum of colors'
db cr,lf,' Background color (40-47) = 40 + sum of colors'
db cr,lf,' where colors are 1 = red, 2 = green, 4 = blue'
db cr,lf,' Ex: 0, 1, 37, 44 IBM CGA(0), bright(1) white(37)'
db ' chars on a blue(44) field'
db cr,lf,' Attributes are applied in order of appearance.$'
ccolhlp db cr,lf,' ╔Φ╓├╓╒╢╦╤╒╔½ ( Set Term Color <╓╡>,<╓╡>,<╓╡>, ...)'
db cr,lf,' 0 -- IBM CGA ╡─╬▐╤⌐╗¿╡π╖╜╩╜╝░┐╒╕±┤ª╬¬░╫╔½'
db cr,lf,' 1 -- ╕▀┴┴╢╚╟░╛░╔½'
db cr,lf,' 10 -- CGA╞┴─╗╦ó╨┬┐∞╦┘(┐╔─▄╗ß▓·╔·╤⌐╗¿)'
db cr,lf,' ╟░╛░╔½╚í╓╡ (30-37) = 30 + ╔½▓╩╓╡╓«║═'
db cr,lf,' ▒│╛░╔½╚í╓╡ (40-47) = 40 + ╔½▓╩╓╡╓«║═'
db cr,lf,' ╒Γ└∩╡─╤╒╔½╩╟ 1 = ║∞╔½, 2 = ┬╠╔½, 4 = └╢╔½'
db cr,lf,' └²╚τ: 0, 1, 37, 44 ▒φ╩╛ IBM CGA(0), ╝╙┴┴(1)░╫╔½(37)'
db '╡─╧╘╩╛╫╓╖√, ▒│╛░╬¬└╢╔½(44)'
db cr,lf,'$'
; ?? db cr,lf,' Attributes are applied in order of appearance.$'
colerr db cr,lf,'?Value not in range of 0, 1, 10, 30-37, or 40-47$'
ccolerr db cr,lf,'?╓╡▓╗╘┌ 0, 1, 10, 30-37, ╗≥ 44-47 ╖╢╬º─┌$'
vtwrap db 'Term wrap-lines: $'
cvtwrap db 'Term wrap-lines: $'
vtbell db 'Term margin-bell: $'
cvtbell db 'Term margin-bell: $'
vtnewln db 'Term newline: $'
cvtnewln db 'Term ╨┬╨╨: $'
vtcur db 'Term cursor-style: $'
cvtcur db 'Term ╣Γ▒Ω╖╜╩╜: $'
vtcset db 'Term character-set: $'
cvtcset db 'Term ╫╓╖√╝»: $'
vtclik db 'Term key-click: $'
cvtclik db 'Term key-click: $'
vtscrn db 'Term screen-background: $'
cvtscrn db 'Term ╞┴─╗▒│╛░╔½: $'
colst1 db 'Term color foreground:3$'
ccolst1 db 'Term ╔½▓╩ ╟░╛░╔½:3$'
colst2 db ' background:4$'
ccolst2 db ' ▒│╛░╔½:4$'
vtgraf db 'Term graphics: $'
cvtgraf db 'Term ═╝╨╬╖╜╩╜: $'
vtrolst db 'Term rollback: $'
cvtrolst db 'Term rollback: $'
vtdir db 'Term direction: $'
cvtdir db 'Term ╧╘╩╛╖╜╧≥: $'
; terminal emulator
vtstbl stent <srchkb,vtwrap,ontab,vswrap,vtemu.vtflgop> ; line wrap
stent <srchkb,vtbell,ontab,vsmarginbell,vtemu.vtflgop>; margin bell
stent <srchkb,vtcur,curtab,vscursor,vtemu.vtflgop> ; cursor type
stent <srchkb,vtnewln,ontab,vsnewline,vtemu.vtflgop> ; newline
stent <srchkb,vtscrn,scrtab,vsscreen,vtemu.vtflgop> ; screen
stent <srchkw,vtcset,chatab,vtemu.vtchset> ; char set
stent <srchkb,vtdir,dirtab,vswdir,vtemu.vtflgop> ; write direct
stent <colstat> ; VT100 colors
stent <srchkb,vtclik,ontab,vskeyclick,vtemu.vtflgop> ; keyclick
stent <srchkw,vtrolst,ontab,vtroll>
stent <srchkw,vtgraf,graftab,tekgraf>
stent <filler>
stent <tabstat> ; VT100 tab status - needs one whole line
dw 0 ; end of table
; end of Terminal data set
; terminal emulator
cvtstbl stent <srchkb,cvtwrap,ontab,vswrap,vtemu.vtflgop> ; line wrap
stent <srchkb,cvtbell,ontab,vsmarginbell,vtemu.vtflgop>; margin bell
stent <srchkb,cvtcur,curtab,vscursor,vtemu.vtflgop> ; cursor type
stent <srchkb,cvtnewln,ontab,vsnewline,vtemu.vtflgop> ; newline
stent <srchkb,cvtscrn,scrtab,vsscreen,vtemu.vtflgop> ; screen
stent <srchkw,cvtcset,chatab,vtemu.vtchset> ; char set
stent <srchkb,cvtdir,dirtab,vswdir,vtemu.vtflgop> ; write direct
stent <colstat> ; VT100 colors
stent <srchkb,cvtclik,ontab,vskeyclick,vtemu.vtflgop> ; keyclick
stent <srchkw,cvtrolst,ontab,vtroll>
stent <srchkw,cvtgraf,graftab,tekgraf>
stent <filler>
stent <tabstat> ; VT100 tab status - needs one whole line
dw 0 ; end of table
; end of Terminal data set
ontab db 2 ; Two entries
mkeyw 'off',0
mkeyw 'on',1
comptab db 15 ; communications port options
mkeyw 'Bios1','0'+1 ; '0' is to flag value as forced Bios
mkeyw 'Bios2','0'+2
mkeyw 'Bios3','0'+3
mkeyw 'Bios4','0'+4
mkeyw 'COM1',1 ; these go straight to the hardware
mkeyw 'COM2',2
mkeyw 'COM3',3
mkeyw 'COM4',4
mkeyw '1',1 ; straight to the hardware
mkeyw '2',2
mkeyw '3',3
mkeyw '4',4
mkeyw 'NetBios','N' ; Netbios
mkeyw 'UB-Net1','U' ; Ungermann Bass Net One
mkeyw ' ',0 ; port is not present, for Status
; this table is indexed by the baud rate definitions given in
; pcdefs. Unsupported baud rates should contain FF.
bddat label word
dw 9E4H ; 45.5 baud
dw 900H ; 50 baud
dw 600H ; 75 baud
dw 417H ; 110 baud
dw 359H ; 134.5 baud
dw 300H ; 150 baud
dw 180H ; 300 baud
dw 0C0H ; 600 baud
dw 60H ; 1200 baud
dw 40H ; 1800 baud
dw 3AH ; 2000 baud
dw 30H ; 2400 baud
dw 18H ; 4800 baud
dw 0CH ; 9600 baud
dw 06H ; 19200 baud
dw 03H ; 38400 baud
dw 02h ; 57600 baud
dw 01h ; 115200 baud
baudlen equ ($-bddat)/2 ; number of entries above
jrbddat label word ; Baud rate table for IBM PCjrs [tm]
dw 0FFH ; 45.5 baud -- Not supported
dw 8bfH ; 50 baud
dw 5d3H ; 75 baud
dw 3f9H ; 110 baud
dw 340H ; 134.5 baud
dw 2e9H ; 150 baud
dw 175H ; 300 baud
dw 0baH ; 600 baud
dw 5dH ; 1200 baud
dw 3eH ; 1800 baud
dw 38H ; 2000 baud
dw 2fH ; 2400 baud
dw 18H ; 4800 baud
dw 0CH ; 9600 baud
dw 06H ; 19200 baud
dw 03H ; 38400 baud
dw 02h ; 57600 baud
dw 01h ; 115200 baud
; this table is indexed by the baud rate definitions given in
; pcdefs. Unsupported baud rates should contain FF.
; Clone: bits are for Bios speed, no parity, 8 data bits. [jrd]
clbddat label word
dw 0FFH ; 45.5 baud -- Not supported
dw 0FFH ; 50 baud
dw 0FFH ; 75 baud
dw 03H ; 110 baud
dw 0FFH ; 134.5 baud
dw 23H ; 150 baud
dw 43H ; 300 baud
dw 63H ; 600 baud
dw 83H ; 1200 baud
dw 0ffH ; 1800 baud
dw 0FFH ; 2000 baud
dw 0a3H ; 2400 baud
dw 0c3H ; 4800 baud
dw 0e3H ; 9600 baud
dw 0FFH ; 19200 baud
dw 0FFH ; 38400 baud
dw 0FFH ; 57600 baud
dw 0FFH ; 115200 baud
; variables for serial interrupt handler
source db bufsiz+2 DUP(?) ; Buffer for data from port (+ 2 guard bytes)
srcpnt dw source ; Pointer in buffer (DI)
count dw 0 ; Number of chars in int buffer
mst dw 0 ; Modem status address
mdat dw 0 ; Modem data address
mdeoi db 0 ; End-of-Interrupt value
mdmhand db 0 ; Modem status register, current
; Information structures for IBM Netbios compatible Local Area Networks
; network constants
netint equ 5ch ; Netbios interrupt
nadd equ 30h ; Add name
ncall equ 10h ; CALL, open a virtual circuit session
ncancel equ 35h ; Cancel command in scb buffer
ndelete equ 31h ; Delete Name
nhangup equ 12h ; Hangup virtual circuit session
nlisten equ 11h ; Listen for session caller
naustat equ 33h ; Network Adapter Unit, get status of
nreceive equ 15h ; Receive on virtual circuit
nreset equ 32h ; Reset NAU and tables
nsend equ 14h ; Send on virtual circuit
nsestat equ 34h ; Session, get status of
netbrk equ 70h ; STARLAN Int 5bh send Break
nowait equ 80h ; no-wait, command modifier
npending equ 0ffh ; Pending request
exnbios equ 0400h ; Int 2ah exec netbios call, error retry
nbuflen equ 256 ; bytes in each network buffer (two of them)
netbios equ 8000h ; network type bit, using NetBios
starlan equ 1 ; network type bit, AT&T STARLAN
netone equ 02h ; [ohl] type bit, Ungermann-Bass Net/One
;xncall equ 74h ; [ohl] Net/One extended call function
netci equ 6Bh ; [ohl] Net/One command interface interrupt,
; [ohl] used for the following functions:
nciwrit equ 0000h ; [ohl] Net/One write function
nciread equ 0100h ; [ohl] Net/One read function
ncistat equ 0700h ; [ohl] Net/One status function
ncicont equ 0600h ; [ohl] Net/One control function
ncibrk equ 02h ; [ohl] Net/One code for a break
ncidis equ 04h ; [ohl] Net/One code for disconnect
ncihld equ 06h ; [ohl] code for placing a connection on hold
;; pcnet values: 0 no network available at all
;; 1 network board reports itself as present
;; 2 and session is in progress
;; extrn byte pcnet is defined in msster.
portn prtinfo <0FFFH,0,defpar,1,0,defhand,floxon> ; port struc for PORTN
scbst struc ; Session (Network) Control Block [PCnet comp]
scb_cmd db 0 ; command code for Netbios Int 5ch
scb_err db 0 ; error return or request is pending
scb_vcid db 0 ; virtual circuit ident number
scb_num db 0 ; local name-number
scb_baddr dw ? ; buffer address, offset
dw datas ; and segment
scb_length dw ? ; length of buffer data
scb_rname db '* ' ; remote name, 16 chars space
scb_lname db 'cckermit ' ; local name filled
db 0 ; reserved
db 0 ; reserved
scb_post dw ? ; interrupt driven post address, offset
dw code ; and segment
db 0 ; LAN_num (adapter #), set to zero for STARLAN
scb_done db 0 ; command complete status
; the 14 bytes below are normally 'reserved'
; STARLAN uses 5 for long/special call names
; together with STARLAN specific Int 5bh
scb_vrname dw 0,0 ; Variable length call name ptr offset,segment
scb_vrlen db 0 ; length of vrname
db 9 dup (0) ; reserved
scbst ends
rcv scbst <,,,,rcvbuf,,length rcvbuf,,,,,rpost>; declare scb for rcvr
xmt scbst <,,,,xmtbuf,,length xmtbuf,,,,,spost>; for xmtr
lsn scbst <,,,,xmtbuf,,length xmtbuf,,,,,lpost>; for server listen
can scbst <> ; for cancels
pcnet db 0 ; Network is functioning
xmtbuf db nbuflen dup (0) ; network buffer for transmitter
xmtcnt dw 0 ; occupancy in current output buffer
xmtbufx db nbuflen dup (0) ; external version of xmtbuf (dbl buffers)
rcvbuf db nbuflen dup (0) ; network buffer for receiver
nambuf db 65 dup (?) ; network long name storage (STARLAN)
sposted db 0 ; send interlock, 0 if no send posted
rposted db 0 ; rcv interlock, 0 if no receive posted
lposted db 0 ; listen outstanding (if non-zero)
netdbfr db 0 ; non-zero if net board is double buffered
deflname db 'cckermit ' ; default local name, 16 bytes
nsbrk dw 0 ; net can send Break
nettype dw 0 ; kind of local area net (vendor bit field)
chkmsg1 db cr,lf,' Cannot construct a local Kermit name, error = $'
cchkmsg1 db cr,lf,' ▓╗─▄╣╣╘∞╥╗╕÷▒╛╡╪ Kermit ├√, ┤φ╬≤║┼ = $'
chkmsg2 db cr,lf,lf,' Name $'
cchkmsg2 db cr,lf,lf,' ├√╫╓ $'
chkmsg3 db ' is already in use. Please enter another of'
db cr,lf,' 1 - 14 letters or numbers (or nothing to quit): $'
cchkmsg3 db ' ╥╤╘┌╩╣╙├. ╟δ╩Σ╚δ┴φ═Γ╥╗╕÷'
db cr,lf,'1-14╕÷╫╓─╕╗≥╩²╫╓╡─├√╫╓(╗≥╓▒╜╙═╦│÷): $'
netmsg1 db cr,lf,' Checking if our node name is unique ...$'
cnetmsg1 db cr,lf,' ╝∞▓Θ╬╥├╟╡─╜ß╡π├√╩╟╖±╬¿╥╗ ...'
netmsg2 db cr,lf,' The network is active, our name is $'
cnetmsg2 db cr,lf,' ═°┬τ╒²╘┌╘╦╨╨╓«╓╨, ╬╥├╟╡─├√╫╓╩╟ $'
nonetmsg db cr,lf,'?The network is not available$'
cnonetmsg db cr,lf,'?═°┬τ╬▐╖¿╩╣╙├$'
nethlp db cr,lf,' Enter node name of remote system,'
db cr,lf,' or a carriage return to use current name,'
db cr,lf,' or a carriage return for server mode.$'
cnethlp db cr,lf,' ╩Σ╚δ╘╢╢╦╧╡═│╡─╜┌╡π├√,'
db cr,lf,' ╗≥┤≥╗╪│╡╥╘▒π╓▒╜╙╩╣╙├╡▒╟░╡─├√╫╓,'
db cr,lf,' ╗≥┤≥╗╪│╡╜°╚δ╖■╬±╖╜╩╜.$'
ngodset db cr,lf,' Connecting to network node: $'
cngodset db cr,lf,' ┴¬╜╙╡╜═°┬τ╜┌╡π: $'
nbadset db bell,cr,lf,' Cannot reach network node: $'
cnbadset db bell,cr,lf,' ╬▐╖¿╡╜┤∩═°┬τ╜┌╡π: $'
recmsg db cr,lf,' Network receive failed, status = $'
crecmsg db cr,lf,' ═°┬τ╜╙╩╒╩º░▄, ╫┤╠¼ = $'
sndmsg db cr,lf,' Network send failed, status = $'
csndmsg db cr,lf,' ═°┬τ╖ó╦═╩º░▄, ╫┤╠¼ = $'
naskpmt db cr,lf,' A network session is active.',cr,lf
db ' Enter RESUME to resume it or NEW to start a new session.'
db cr,lf,'> $'
cnaskpmt db cr,lf,' ═°┬τ╢╘╗░╙╨╨º.',cr,lf
db ' ╩Σ╚δ RESUME ╝╠╨°╢╘╗░ ╗≥ ╩Σ╚δ NEW ┐¬╩╝╥╗┤╬╨┬╡─╢╘╗░.'
db cr,lf,'> $'
nettab db 2
mkeyw 'New',0
mkeyw 'Resume',1
datas ends