home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
archives
/
ccdos.zip
/
ccsscp.dat
< prev
next >
Wrap
Text File
|
1991-09-08
|
7KB
|
141 lines
include ccsdef.h
public script, scout, scinp, scpau, scecho, scclr, scxmit, scwait
public goto, screinp, ifcmd, setalrm, inptim, chktmo, alrhms
linelen equ 134 ; length of working buffer line
prtbuflen equ 128 ; serial port local buffer length
maxtry equ 5 ; maximum number of output retries
stat_unk equ 0 ; status return codes.
stat_ok equ 1 ; have a port character
stat_cc equ 2 ; control-C typed
stat_tmo equ 4 ; timeout
stat_cr equ 8 ; carriage return typed
ifsuc equ 0 ; indicators for IF conditions
iffail equ 1
ifext equ 2
iferr equ 3
ifnot equ 4
ifctr equ 5
ifmdf equ 6
ifalarm equ 7
ifequal equ 8
datas segment public 'datas'
extrn taklev:byte, takadr:word, portval:word, flags:byte
extrn rxtable:byte, spause:byte, errlev:byte, fsta:word
extrn kstatus:word, mcctab:byte, comand:byte, ttyact:byte
extrn isccdos:byte ; Jun 25,1990
; global (public) variables
script scptinfo <> ; global structure, containing:
;;inactv db 0 ; input action value (default proceed)
;;incasv db 0dfh ; input case (default ignore)
;;indfto dw 1 ; input and pause timeout (def 1 sec)
;;inecho db 1 ; echo Input cmd text (0 = no)
; local variables
line db linelen+1 dup (?) ; line of output or input + terminator
prtbuf db prtbuflen dup (?) ; serial port storage buffer
bufcnt dw 0 ; serial port buf byte cnt, must be 0
bufrdptr dw prtbuf ; serial port buf read ptr
bufwtptr dw prtbuf ; serial port buf write ptr
bufpkptr dw prtbuf ; peek-read pointer
bufpkcnt dw 0 ; peek-read byte count remaining
reinflg db 0 ; 0 = INPUT, else REINPUT command
inplen dw 0 ; length of input match string
notflag db 0 ; IF NOT flag
slablen dw 0 ; label length, for GOTO
temptr dw ? ; temporary pointer
temptr2 dw ? ; ditto, points to end of INPUT string
tempd dw ? ; temp
tempa db ? ; another temp
retry db 0 ; number of output retries
status dw ? ; general status word
fhandle dw ? ; file handle storage place
parmsk db 7fh ; 7/8 bit parity mask
lecho db ? ; local echo of output (0 = no)
timout dw ? ; work area (seconds before timeout)
timhms db 4 dup (?) ; hhmmss.s time of day buffer
alrhms db 4 dup (?) ; hhmmss.s time of day alarm buffer
eolchr db LF ; end of line character
crlf db cr,lf,'$'
xfrfnf db cr,lf,'?Transmit file not found$'
cxfrfnf db cr,lf,'?╒╥▓╗╡╜╥¬╖ó╦═╡─╬─╝■$'
xfrrer db cr,lf,'?error reading Transmit file$'
cxfrrer db cr,lf,'?╢┴╖ó╦═(Transmit)╬─╝■┤φ$'
xfrcan db cr,lf,'?Transmission canceled$'
cxfrcan db cr,lf,'?╚í╧√╖ó╦═╣²│╠$'
indmis db '?Indirect file not found',cr,lf,'$'
cindmis db '?╒╥▓╗╡╜╝Σ╜╙╬─╝■',cr,lf,'$'
inderr db '?error reading indirect file',cr,lf,'$'
cinderr db '?╢┴╝Σ╜╙╬─╝■┤φ',cr,lf,'$'
laberr db cr,lf,'?Label ":$'
claberr db cr,lf,'?▒Ω║┼ ":$'
laberr2 db '" was not found.',cr,lf,'$'
claberr2 db '" ╒╥▓╗╡╜.',cr,lf,'$'
tmomsg db cr,lf,'?Timeout',cr,'$'
ctmomsg db cr,lf,'?│¼╩▒',cr,'$'
outhlp db 'line of text to be sent to remote host$'
couthlp db '╖ó╦═╒²╬─╨╨╡╜╘╢│╠╓≈╗·$'
inphlp db 'time-limit and line of text expected from remote host'
db cr,lf,' Time is number of seconds or until a specific'
db ' hh:mm:ss (24 hour clock)$'
cinphlp db '╩▒╝Σ╧▐╓╞║═╞┌┤²└┤╫╘╘╢│╠╓≈╗·╡─╒²╬─╨╨'
db cr,lf,' ╒Γ╩╟├δ╩²╗≥╥╗╕÷╠╪╢¿╡─╩▒╝Σ'
db ' ╩▒:╖╓:├δ (24 ╨í╩▒╩▒╓╙)$'
echhlp db 'line of text to be Echoed to screen$'
cechhlp db '╒²╬─▒╗╗╪╧╘╡╜╞┴─╗$'
ptshlp db 'amount of time to pause'
db cr,lf,' Time is number of seconds or until a specific'
db ' hh:mm:ss (24 hour clock)$'
cptshlp db '╘▌═ú╩▒╝Σ'
db cr,lf,' ╒Γ╩╟├δ╩²╗≥╥╗╕÷╠╪╢¿╡─╩▒╝Σ'
db ' ╩▒:╖╓:├δ (24 ╨í╩▒╩▒╓╙)$'
wthlp db 'time-limit and modem status signals \CD, \CTS, and \DSR'
db cr,lf,' Time is number of seconds or until a specific'
db ' hh:mm:ss (24 hour clock)$'
cwthlp db '╩▒╝Σ╧▐╓╞║═╡≈╓╞╜Γ╡≈╞≈╫┤╠¼╨┼║┼ \CD, \CTS, and \DSR'
db cr,lf,' ╒Γ╩╟├δ╩²╗≥╥╗╕÷╠╪╢¿╡─╩▒╝Σ'
db ' ╩▒:╖╓:├δ (24 ╨í╩▒╩▒╓╙)$'
xmthlp db ' Name of file to be Transmitted$'
cxmthlp db ' ▒╗╖ó╦═╡─╬─╝■├√$'
pmthlp db cr,lf
db ' Prompt character expected as an ACK from host (\0 for none)$'
cpmthlp db cr,lf
db ' ╧ú═√╫≈╬¬└┤╫╘╓≈╗·╧∞╙ª(ACK)╡─╠ß╩╛╫╓╖√ (\0 ▒φ╩╛├╗╙╨)$'
ifdfhlp db cr,lf,' Name of macro or variable then a command$'
cifdfhlp db cr,lf,' ║Ω╗≥▒Σ┴┐├√║≤╕·╥╗╕÷├ⁿ┴ε$'
alrmhlp db cr,lf,' Seconds from now or time of day (HH:MM:SS) for alarm,'
db ' < 12H from present$'
calrmhlp db cr,lf,' ┤╙╧╓╘┌┐¬╩╝╡─├δ╩² ╗≥ ╡╜╥╗╠∞╡──│╥╗╩▒┐╠ (╩▒:╖╓:├δ) ▒¿╛»,'
db ' ┤╙╧╓╘┌┐¬╩╝╨í╙┌ 12H$'
ifnhlp db cr,lf,' Number which errorlevel should match or exceed$'
cifnhlp db cr,lf,' errorlevel ╙╨┐╔─▄╞Ñ┼Σ╗≥│¼╣²╡─╩²$'
ifnmsg db cr,lf,'?Number expected, ignoring "$'
cifnmsg db cr,lf,'?╞┌═√╡─╩², ║÷┬╘ "$'
ifnmsg2 db '"$'
discard db ' Kermit command'
db cr,lf,' "IF" condition is false, command will be ignored.$'
cdiscard db ' Kermit ├ⁿ┴ε'
db cr,lf,' ╚τ╣√("IF")╠⌡╝■▓╗│╔┴ó(╝┘), ├ⁿ┴ε╜½▒╗║÷┬╘.$'
ifehlp1 db cr,lf,'?pair of words or variables to be compared$'
cifehlp1 db cr,lf,'?▒╚╜╧┤╩╗≥▒Σ┴┐╢╘$'
ifehlp2 db cr,lf,'?second word or variable to be compared$'
cifehlp2 db cr,lf,'?▒╚╜╧╡┌╢■╕÷┤╩╗≥▒Σ┴┐$'
iftable db 9 ; IF command dispatch table
mkeyw 'Not',ifnot
mkeyw 'Alarm',ifalarm
mkeyw 'Count',ifctr
mkeyw 'Defined',ifmdf
mkeyw 'Errorlevel',iferr
mkeyw 'Equal',ifequal
mkeyw 'Exist',ifext
mkeyw 'Failure',iffail
mkeyw 'Success',ifsuc
datas ends