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