home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
archives
/
trs80model4.tar.gz
/
trs80model4.tar
/
m4str.asm
< prev
next >
Wrap
Assembly Source File
|
1986-10-22
|
19KB
|
668 lines
; M4STR/ASM
;Pure storage.
FLINK DS 256 ;FAILURE LINK STORAGE
STRING DS 256 ;STORAGE FOR THE STRING TO MATCH
LENGTH DB 0 ;LENGTH OF STRING
BUFPTR DW 0 ;POINTER INTO THE BUFFER
MULBUF DS 256 ;THE BUFFER
CTLTBL DB 35
DB 'ACK',6,254,'BEL',7,254,'BS',8,254
DB 'CAN',24,254,'CR',13,254,'DC1',17,254
DB 'DC2',18,254,'DC3',19,254,'DC4',20,254
DLY EQU 250
DB 'DEL',127,254,'DLE',16,254,'DLY*',DLY,254
DB 'EM',25,254,'ENQ',5,254,'EOT',4,254
DB 'ESC',27,254,'ETB',23,254,'ESC',27,254
DB 'FF',12,254,'FS',28,254,'GS',29,254
DB 'HT',9,254,'LF',10,254,'NAK',21,254
DB 'NUL',0,254,'RS',30,254,'SI',15,254
DB 'SO',14,254,'SOH',1,254,'SPA',32,254
DB 'STX',2,254,'SUB',26,254,'SYN',22,254
DB 'VS',31,254,'VT',31,254
DB 0
GTSTRG DS 6 ;String space for storing above ANSI strs
WLDBUF DS 6 ;Save wildcards here
ALRMAD DW ALARM ;Delay TCB
TIMER DW 0 ;Counter
RECTIME DW RECTIMOUT ;Receive timeout TCB
SVTIMER DW 0
TKNAME DB 'KERMIT/INI',13 ;Name of the initialization file
TKLEN EQU $-TKNAME ;Length of the name
; THE FOLLOWING FLAGS ARE STATE FLAGS FOR WHEN EOF OCCURS.
; IF ANY ARE SET WHEN EOF OCCURS THAN AN ERROR HAS OCCURED.
INBUF DS 102H ;FILE INPUT BUFFER
HSTCHR DB 0 ;TERMINATOR FROM THE HOST IN '*'
DLYFLG DB 0 ;WAS A DELAY INVOKED
CHRGOT DB 0 ;ACTUAL CHARACTER FROM THE FILE
; PARSING OPTION FLAGS
CSEFLG DB 0 ;IGNORE CASE FLAG
SPTFLG DB 0 ;ECHOING OF SET OPTIONS IS ON
ECHFLG DB 0 ;IS ECHO OF SENT STRINGS ON
EXTFLG DB 1 ;EXIT AT EOF FLAG
; EARLY EOF STATE FLAGS
ESFLG DB 0 ;ESCAPE CHARACTER SEQUENCE
CTLFLG DB 0 ;CONTROL CHARACTER SEQUENCE
SNDFLG DB 0 ;SEND STATE FLAG
RECFLG DB 0 ;RECEIVE SATE FLAG
MULFLG DB 0 ;MULTI-SEND STATE FLAG
OPTFLG DB 0 ;SET OPTIONS STATE FLAG
BUFFSIZE EQU 2048 ;Size of buffer
SRCPTR DW 0 ;Source string pointer
HASWILD DB 0 ;Wild cards present flag
SPAT DW 0 ;Pattern pointer
SSTR DW 0 ;String pointer
PSAVE DW 0 ;Saved pattern pointer
SSAVE DW 0 ;Saved string pointer
SDIRDRV DB '0' ;Saved current drive
DIRBUFF DS 256 ;Buffer for DIR/SYS record
COMPNAME DS 32 ;Complete file name
FNLEN DB 0 ;Length of pattern
MOREDRV DB 0 ;More drives to check flag
DIRFCB DB 'DIR/SYS:' ;Directory file control block
DIRDRV DB '0',CR ;Where to put the drive number
DC 23,0 ;Remaining, for 33 bytes total
TFBUF DS 256 ;Current pattern storage
FILEBUFF DS BUFFSIZE ;Place for file name list
FBPTR DW FILEBUFF ;Pointer to next available space
FILECNT DB 0 ;Number of file names in FILEBUFF
DIRSPEC DB 'DIR/SYS:' ;DIR/SYS pattern
DLEN EQU $-DIRSPEC ;Length of text to move
PARMS DB 80H ;@PARAM parse table
DB 56H
DB 'SYSTEM'
SYSRESP DB 0
DW SYSFLAG
DB 55H
DB 'INVIS'
INVRESP DB 0
DW INVFLAG
DB 0
SYSFLAG DW 0
INVFLAG DW 0
BADCD DB 13,'Bad code inside of <...>',39,'s',EOS
NOECHO DB 13,'Host did not echo last character sent',13,EOS
QUTMES DB 13,'Ignoring => ',EOS
STOBIG DB 13,'String too big for buffer!',13,EOS
LGFAIL DB 13,'Operation aborted!',13,EOS
PREESC DB 13,'Missing character following \',13,EOS
PRECTL DB 13,'Missing character following ^',13,EOS
PREOPT DB 13,'Missing > in <...> sequence',13,EOS
TXTHLP DB CR,16,'Enter a text string',17,CR,EOS
FILHLP DB CR,16,'Enter a file specification!',17,CR,EOS
NUMHLP DB CR,16,'Enter a Decimal number!',17,CR,EOS
FILESFND DB 'Sending files:',CR,EOS
NOFILES DB 16,'No files found',17,CR,EOS
OUTOFSTR DB 16,'Too many files, out of space',17,CR,EOS
NOTIMER DB CR,16,'No task slots available for timeout',17,CR,EOS
NODELAY DB CR,16,'No task slots available for delay, using 1 second'
DB 17,CR,EOS
NOMEM DB CR,16,'Can',39,'t move LOW$ to new value',17,CR,EOS
BADPARM DB CR,'Bad parameter list',CR,EOS
TRANABRT DB 'Transaction aborted',CR,EOS
TRANCANC DB 'Transaction canceled',CR,EOS
WRTPROT DB CR,'Drive is write protected',EOS
DSKOK DB CR,'Default drive changed',CR,EOS
REMOVSTR DB 'Removing: ',EOS
TIMEMES DB ' Time: ',EOS
LOGERROR DB 'Log file I/O error. '
ERMS20 DB 'Log file CLOSED!',CR,EOS
BLANKS DB ' ',EOS
INTRO DB CR,'TRS-80 Model 4(p) TRSDOS 6.2 - KERMIT - Version'
DB ' 5.2',CR,'By Gregg Wonderly',CR,CR
DB 'Type a ? for help at any time....',CR,EOS
CFCL DB CR,'No *CL DCB!',CR,EOS
CFSO DB CR,'No *SO DCB!',CR,EOS
CFSI DB CR,'No *SI DCB!',CR,EOS
NONDCB DB CR,'Can not find a DCB for the *FI or *FO devices!'
DB CR,EOS
NOSPACE DB CR,'Not enough space left for definition',CR,EOS
KPLUS DB 'K + ',EOS
BYTESMES DB ' bytes transfered.',EOS
KEYHELP DB CR,'Press keystroke you desire: ',EOS
STRHELP DB CR,'Enter definition string, end with <BREAK> '
DB '(255 characters MAX)',CR,EOS
SPACSTR DB CR,'Remaining key definition space: ',EOS
TOOLONG DB CR,'String too long for one packet!',CR,EOS
NPKTSTR DB CR,'Number of packets => ',EOS
NRTRSTR DB CR,'Number of retries => ',EOS
NCHRSTR DB CR,'Bytes transfered => ',EOS
NRECCH DB CR,'Kbytes received => ',EOS
NSNDCH DB CR,'Kbytes transmitted => ',EOS
CBATCH DB 32,16,'[Cancelling batch]',17,32,EOS
CFILE DB 32,16,'[Cancelling file]',17,32,EOS
UNKNOWN DB CR,'Unknown packet type',CR,EOS
HELPMSG DB CR,' CTRL-F => Cancel file '
DB 'CTRL-B => Cancel Batch'
DB CR,' CTRL-C => Quit protocol '
DB 'CTRL-A => Transfer status'
DB CR,' CTRL-D => Toggle debugging '
DB 'CTRL-H => This message'
DB CR,' CTRL-E => Send error, quit '
DB 'ENTER => Resend last packet',CR,EOS
RMMES DB BELL,32,16,'[Discarded]',17,32,EOS
DO62DR DB 'CAT '
DO61DR DB 'DIR '
DIRCMD DS 4
DIRBUF DS 256
DEFTRLOG DB 'TRANS/LOG',CR
DEFSESLOG DB 'SESSION/LOG',CR
DEFDEBLOG DB 'DEBUG/LOG',CR
DECBUF EQU $
NBUFF DS 6
VISIBLE DB 0
THEVAL DW 0
RMTPTR DW 0
OUTADDR DW 0
PREVCH DB 0
CURLEN DB 0
MAXLEN DB 0
CURCOL DB 0
MAXCOL DB 78
RPTFLG DB 0
NEXT DW 0
RPTCNT DB 0
RPTQ DB '~'
EBQFLG DB 1
EBQ DB '&'
MYCTLQ DB '#'
LEFTOVER DS 7
CH DW 0
DISCARD DB 0
LOGNAMES DB 1
INITRMT DW 0
INITCNT DW 0
PKTTYPE DB 0
FLDLEN DW 0
KTRANS DW 0
RTRANS DW 0,0
STRANS DW 0,0
CURTRANS DW 0,0
SOUPTR DW 0
XOFREC DB 0
TAKLOG DB 0
RECTYP DB 0
SNDTYP DB 0
INDSP DB 0
OTDSP DB 0
PREVLCHR DB 0 ;Previous character logged to session log
TRTAB DB 0,1,2,3,4,5,6,7,24,9,26,11,12,29,0,0,16,17,18,19,20
DB 21,22,23,24,25,26,27,28,29,30,31,32,33
KEYTABLE DC 512,0 ;Must be 256 words of zeroes
DW 0 ;A little padding for off by one errors
TOPADDR DW DEFTABLE
DEFTABLE DS 2048 ;Key definition space
DEFTLEN EQU $-DEFTABLE
KEYPOS DW ATNULL ;Initial buffered string pointer
ATNULL DB 0 ;A null byte to signal no characters
DIFFADDR DW 0
STRINGLEN DB 0
SAVEDKEY DB 0
KEYSTRING DW 0
KEYNUMBER DB 0
TABLEADDR DW 0
CMPADDR DW 0
MOVEDIFF DW 0
KEYNUM DB 0
KEYPTR DW 0
KEYLEN DB 0
OUTRNG DB CR,'Value out of range!!',CR,EOS
NODEF DB CR,'No definition exists',EOS
SOUFCB DS 40
TAKFLG DB 0
INCNT DB 0
XFFLG DB 0
FLOFLG DB 1
TFCB DS 32
OLDLOW DW 0
FLAGS DW 0
BEPLEN DB 0
BELFLG DB 1
CLDCB DW 0
TMIDCB DW 0
TMODCB DW 0
RFIDCB DW 0
MAXCNT DB 180
SVMAX DB 80
DISFLG DB 1
HLPMES DB 8,' One of the following...',CR,EOS
SORFLG DB 0
MAXTRY DB 7
GENTYPE DB 0
GENLEN DB 0
SORLOC DW 0
LOGOPN DB CR,16,'Logfile is already OPEN!',17,CR,EOS
NOLOGF DB CR,16,'Logfile is not OPEN!',17,CR,EOS
SNDREC DB EOS
KERREC DB 13,'Receiving => ',EOS
KERSND DB 13,'Sending => ',EOS
DSSOP EQU 1
DRSOP EQU 1
SWTBUF DS 2048
CONCRS DW 0
CMDCRS DW 0
FTIME DB 0
SNDST DB 0
TIME DB 30H
TBUF DS 256 ;TAKE COMMAND INPUT BUFFER.
;
; The next 512 bytes produce a 256 byte circular buffer for
; the communications input routine.
;
DS 256
CHRBUF DS 256
CURCHR DW CHRBUF ;Buffer is initially empty
NXTCHR DW CHRBUF
DB 'SETCOM '
CLBUF DS 256
KERM DB 14,16,17,'KERMIT 4(p)>',EOS ;cursor on at prompt
CRLF DB CR,EOS
ERMES1 DB CR,16,'Unrecognized command',17,CR,EOS
ERMES2 DB CR,16,'Illegal character',17,CR,EOS
ERMES3 DB CR,16,'Not confirmed',17,CR,EOS
ERMES4 DB 'Unable to receive initiate',CR,EOS
ERMES5 DB 'Unable to receive file name',CR,EOS
ERMES6 DB 'Unable to receive end of file',CR,EOS
ERMS10 DB 'Unable to receive data',CR,EOS
ERMS17 DB CR
ERMS11 DB 'System DOS error',CR,EOS
ERMS14 DB 'No acknowledgement from the host',CR,EOS
ERMS15 DB CR,'Unable to find file',CR,EOS
ERMS16 DB 'Unable to rename file',EOS
ERMS18 DB CR,'Unable to tell host that the session is finished',EOS
ERMS19 DB CR,'Unable to tell host to logout',EOS
INFMS3 DB BELL,CR,'Completed',EOS
INFMS4 DB BELL,'Failed',EOS
INFMS5 DB 'Renaming file => ',EOS
INFMS6 DB CR,'<Closing the log file>',EOS
INFMS7 DB CR,'<Connected to remote host, type ',EOS
INFMS8 DB 'C to return>',CR
DB '<CLEAR> is Control-',95,CR,EOS
INFMS9 DB CR,'<Connection closed, back at micro>',EOS
INMS10 DB 'Control-',EOS
INMS13 DB BELL,CR,'Interrupted',EOS
INMS18 DB CR,'File KILLED',EOS
CFRMES DB CR,16,'Confirm with <ENTER>, cancel with <BREAK>',17,CR
DB EOS
CMIN00 EQU CFRMES
ABRTMSG DB 'Transfer aborted...'
ABRTMSGLEN EQU $-ABRTMSG
ESCMES DB CR,'Type the new escape character: ',EOS
INTHLP DB 16,CR,17,CR,CR
DB ' ? = This message',CR
DB ' 0 = (zero) Transmit a NULL',CR
DB ' B = Send modem break',CR
DB ' C = Close the connection',CR
DB ' Q = Quit logging session',CR
DB ' R = Resume logging session',CR,CR
DB 'Type the escape character again to send it to the host.'
DB 16,CR,17,EOS
;
SENDRECV DB ' ',16,'Send',17,' ',16
DB 'Receive',17,' | ',EOS
INPUTSTR DB 16,'Input settings',17,' '
DB '| ',EOS
OUTPUTSTR DB 16,'Output settings',17,' '
DB '| ',EOS
SEPAR DB ' | ',EOS
ONSTR DB 16,'ON',17,EOS
OFFSTR DB 16,'OFF',17,EOS
XONSTR DB 16,'XON-XOFF',17,EOS
NONSTR DB 16,'NONE',17,EOS
NOESTR EQU NONSTR
ASCIIST DB 16,'ASCII',17,EOS
BINST DB 16,'BINARY',17,EOS
DMESTR DB 16,'DUMB',17,EOS
DSCRDST DB 16,'DISCARD',17,EOS
KEEPST DB 16,'KEEP',17,EOS
;
;
; Miscellaneous SET strings
;
BELSTR DB 'Bell: ',EOS
PNTSTR DB 'Printer: ',EOS
BUGST DB 'Debugging: ',EOS
TYPEST DB 'File type: ',EOS
LOCST DB 'Local echo: ',EOS
ESCST DB 'Escape char: ',EOS
FILST DB 'File warning: ',EOS
FLOWST DB 'Flow control: ',EOS
DSKDEF DB 'Default drive: ',EOS
EMSTR DB 'Emulation type: ',EOS
DISPST DB 'File disposition: ',EOS
BCKST DB 'Block check type: ',EOS
TAKST DB 'Display TAKE file: ',EOS
EIGHTSTR DB 'Eight bit quoting: ',EOS
;
; This value must be the length of the longest of the
; above strings (except the ending EOS).
;
SHSTRLEN EQU $-EIGHTSTR-1
;
; Send/Recv strings
;
EOLST DB 'End-of-line: ',EOS
RETST DB 'Turn around: ',EOS
PCHST DB 'Pad character: ',EOS
QTEST DB 'Control quote: ',EOS
TOST DB 'Time out value: ',EOS
PADST DB 'Padding Length: ',EOS
SOPST DB 'Start-of-packet: ',EOS
SRSTRLEN EQU $-SOPST+2
;
; Input strings (Length must fit within SRSTRLEN)
;
IDSPST DB 'Display input: ',EOS
CSEST DB 'Ignore case: ',EOS
;
; Output strings (Length must fit within SRSTRLEN)
;
ODSPST DB 'Display output: ',EOS
HSTEST DB 'Match echo: ',EOS
;
BCKST1 DB '-character',EOS
RPPOS DB 'RPack=>',EOS
SPPOS DB 'SPack=>',EOS
CLRTOP DB 1CH,1FH,EOS ;clear screen
;
; COMND tables
;
; Structure of command table
;
; 1) Number of entries.
; 2) Length of longest keyword + 2
; 3) Each entry is arranged as follows
; a) visibility byte, 1-command is visible, 2-invisible
; b) length of command in bytes.
; c) 'name of command and eos'
; d) offset into command table at KERMTB
; e) offset into command table at KERMTB
;
; ---> Note this command table is in alphabetic order.
;
COMTAB DB 30 ;Number of keywords in table
DB 9 ;LONGEST KEYWORD + 2
DB 1,3,'BYE',EOS,33,33
DB 0,1,'C',EOS,6,6
DB 1,5,'CLEAR',EOS,63,63
DB 1,5,'CLOSE',EOS,66,66
DB 1,7,'CONNECT',EOS,6,6
DB 1,3,'DIR',EOS,36,36
DB 0,1,'E',EOS,3,3
DB 1,4,'ECHO',EOS,69,69
DB 1,4,'EXIT',EOS,3,3
DB 1,6,'FINISH',EOS,27,27
DB 1,3,'GET',EOS,12,12
DB 1,5,'INPUT',EOS,51,51
DB 1,4,'KILL',EOS,39,39
DB 0,1,'L',EOS,42,42
DB 1,5,'LOCAL',EOS,42,42
DB 1,3,'LOG',EOS,9,9
DB 1,6,'LOGOUT',EOS,30,30
DB 1,6,'OUTPUT',EOS,54,54
DB 1,5,'PAUSE',EOS,57,57
DB 1,5,'PULSE',EOS,60,60
DB 0,1,'R',EOS,12,12
DB 1,7,'RECEIVE',EOS,12,12
DB 1,6,'REMOTE',EOS,0,0
DB 0,1,'S',EOS,15,15
DB 1,4,'SEND',EOS,15,15
DB 1,3,'SET',EOS,18,18
DB 1,6,'SETCOM',EOS,45,45
DB 1,4,'SHOW',EOS,21,21
DB 1,6,'STATUS',EOS,24,24
DB 1,4,'TAKE',EOS,48,48
MXSLEN EQU 19
SHOTAB DB SHLEN/3+1
DB MXSLEN ;LONGEST KEYWORD + 2
DB 1,3,'ALL',EOS ;THE OTHER TWO BYTES WILL BE SUBSTITUTED
SETTAB DB SHLEN/3 ;Number of entries in the jump table
DB MXSLEN ;LONGEST KEYWORD + 1
DB 1,4,'BELL',EOS,27,27
DB 1,16,'BLOCK-CHECK-TYPE',EOS,12,12
DB 1,9,'DEBUGGING',EOS,21,21
DB 1,12,'DEFAULT-DISK',EOS,24,24
DB 1,17,'EIGHT-BIT-QUOTING',EOS,6,6
DB 1,9,'EMULATION',EOS,15,15
DB 1,6,'ESCAPE',EOS,0,0
DB 1,4,'FILE',EOS,9,9
DB 1,12,'FLOW-CONTROL',EOS,39,39
DB 1,5,'INPUT',EOS,41,41
DB 1,3,'KEY',EOS,36,36
DB 1,10,'LOCAL-ECHO',EOS,3,3
DB 1,6,'OUTPUT',EOS,45,45
DB 1,7,'PRINTER',EOS,18,18
DB 1,7,'RECEIVE',EOS,30,30
DB 1,4,'SEND',EOS,33,33
DB 1,12,'TAKE-DISPLAY',EOS,48,48
;
; File options
;
FILETAB DB 3
DB 13
DB 1,11,'DISPOSITION',EOS,0,0
DB 1,4,'TYPE',EOS,3,3
DB 1,7,'WARNING',EOS,6,6
;
; File disposition options
;
DISPTAB DB 2
DB 9
DB 1,7,'DISCARD',EOS,1,1
DB 1,4,'KEEP',EOS,0,0
;
; Remote commands parse table
;
RMTTAB DB 21
DB 16
DB 1,9,'CLOSE-LOG',EOS,42,42
DB 1,4,'COPY',EOS,30,30
DB 1,3,'CWD',EOS,0,0
DB 1,6,'DELETE',EOS,3,3
DB 1,3,'DIR',EOS,6,6
DB 1,4,'DISK',EOS,9,9
DB 1,4,'HELP',EOS,12,12
DB 1,4,'HOST',EOS,15,15
DB 1,6,'KERMIT',EOS,18,18
DB 1,5,'LOGIN',EOS,54,54
DB 1,7,'MESSAGE',EOS,33,33
DB 1,7,'PROGRAM',EOS,57,57
DB 1,14,'QUERY-VARIABLE',EOS,39,39
DB 1,6,'RENAME',EOS,24,24
DB 1,8,'SEND-LOG',EOS,45,45
DB 1,13,'SERVER-STATUS',EOS,60,60
DB 1,12,'SET-VARIABLE',EOS,36,36
DB 1,9,'START-LOG',EOS,48,48
DB 1,8,'STOP-LOG',EOS,51,51
DB 1,4,'TYPE',EOS,27,27
DB 1,3,'WHO',EOS,21,21
;
; Emulation type parse table
;
EMLTAB DB 2
DB 6
DB 1,4,'DUMB',EOS,3,3
DB 1,4,'NONE',EOS,0,0
;
; Close options parse table
;
CLSTAB DB 3
DB 13
DB 1,5,'DEBUG',EOS,1,1
DB 1,7,'SESSION',EOS,0,0
DB 1,11,'TRANSACTION',EOS,2,2
;
; Clear command options parse table
;
CLRTAB DB 2
DB 12
DB 1,10,'INPUT-PORT',EOS,0,0
DB 1,6,'SCREEN',EOS,3,3
;
; Flow control options parse table
;
FLOTAB DB 2
DB 10
DB 1,4,'NONE',EOS,0,0
DB 1,8,'XON-XOFF',EOS,1,1
;
; SET SEND/RECEIVE options parse table
;
STSNTB DB 7
DB 17
DB 1,11,'END-OF-LINE',EOS,12,12
DB 1,8,'PAD-CHAR',EOS,0,0
DB 1,7,'PADDING',EOS,3,3
DB 1,15,'QUOTE-CHARACTER',EOS,15,15
DB 1,15,'START-OF-PACKET',EOS,6,6
DB 1,8,'TIME-OUT',EOS,9,9
DB 1,9,'TURN-CHAR',EOS,18,18
;
; SET OUTPUT options parse table
;
OUTTAB DB 2
DB 11
DB 1,9,'HOST-ECHO',EOS,0,0
DB 1,7,'DISPLAY',EOS,3,3
;
; SET INPUT options parse table
;
INPTAB DB 2
DB 13
DB 1,11,'CASE-IGNORE',EOS,0,0
DB 1,7,'DISPLAY',EOS,3,3
;
; SET FILE TYPE options parse table
;
TYPETAB DB 2
DB 8
DB 1,6,'BINARY',EOS,1,1
DB 1,5,'ASCII',EOS,0,0
;
; SET BLOCK-CHECK-TYPE options parse table
;
BLKTAB DB 3
DB 8
DB 1,1,'1',EOS,'11'
DB 1,1,'2',EOS,'22'
DB 1,1,'3',EOS,'33'
;
; OFF/ON parse table
;
ONTAB DB 4 ;Number of entries
DB 5 ;Max length + 2
DB 0,2,'NO',EOS,0,0 ;YES and NO are invisible
DB 1,2,'ON',EOS,1,1
DB 1,3,'OFF',EOS,0,0
DB 0,3,'YES',EOS,1,1
;
; Assorted error/informational messages
;
CMER00 DB CR,'Program error, Invalid COMND call',EOS
CMER01 DB CR,'Ambiguous',EOS
CMER02 DB CR,'Illegal input filespec',EOS
CMCRLF DB CR,EOS
;
; Storage for the parser, etc.
;
CMSTAT DB 0 ;What is presently being parsed.
CMAFLG DB 0 ;Non-zero when an action char has been found.
CMCCNT DB 0 ;Non-zero if a significant char is found.
CMSFLG DB 0 ;Non-zero when the last char was a space.
CMOSTP DW 0 ;Old stack pointer for reparse.
CMRPRS DW 0 ;Address to go to on reparse.
CMPRMP DW 0 ;Address of prompt.
CMPTAB DW 0 ;Address of present keyword table.
CMDBUF DS 100H ;Buffer for command parsing.
CMFCB DW 0 ;Pointer to FCB.
CMCPTR DW 0 ;Pointer for next char input.
CMDPTR DW 0 ;Pointer into the command buffer.
CMKPTR DW 0 ;Pointer to keyword.
CMSPTR DW 0 ;Place to save a pointer.
OLDSP DW 0 ;Room for old system stack.
DS 200H ;Room for lots of calls
STACK DW 0
EOFLAG DB 0 ;EOF flag; non-zero on EOF.
FILFLG DB 0 ;NON-ZERO WHEN FILE NOT OPEN
LSTCHR DB 0 ;Last character in disk i/o
DEFDSK DB '0' ;Default disk drive number
LOGFLG DB 0 ;Flag for session logging
DEBLOG DB 0 ;Flag for debug logging
TRANLOG DB 0 ;Flag for transaction logging
ECOFLG DB 0 ;Local echo flag (default off).
ESCFLG DB 0 ;Escape flag (start off).
EMULFLAG DB 0 ;Emulation flag, NONE is default
FLWFLG DB 0 ;file warning flag (default on)
FILTYPE DB 0 ;File type, default is ASCII
DBFLG DB 0 ;debugging flag (default off)
PRTFLG DB 0 ;printer flag (default off)
ESCCHR DB DEFESC ;Storage for the escape character.
CHRCNT DB 0 ;Number of chars in the file buffer.
FILCNT DB 0 ;Number of chars left to fill.
OUTPNT DW 0 ;Position in packet.
BUFPNT DW 0 ;Position in file buffer.
FCBPTR DW 0 ;Position in FCB.
FCBEXT DW 0
DATPTR DW 0 ;Position in packet data buffer.
LOGPTR DW LBUFF ;pointer into log file buffer
CBFPTR DW 0 ;Position in character buffer.
PKTPTR DW 0 ;Poistion in receive packet.
OSIZE DB 0 ;Old size of packet before overflow
SIZE DB 0 ;Size of data from gtchr.
SPSIZ DB DSPSIZ ;Send packet size.
RPSIZ DB DRPSIZ ;Receive packet size.
STIME DB DSTIME ;Send time out.
RTIME DB DRTIME ;Receive time out.
SPAD DB DSPAD ;Send padding.
RPAD DB DRPAD ;Receive padding.
SPADCH DB DSPADC ;Send padding char.
RPADCH DB DRPADC ;Receive padding char.
SEOL DB DSEOL ;Send EOL char.
REOL DB DREOL ;Receive EOL char.
SSOHCH DB DSSOP ;SEND START OF PACKET
RSOHCH DB DRSOP ;RECEIVE START OF PACKET
SQUOTE DB DSQUOT ;Send quote char.
RQUOTE DB DRQUOT ;Receive quote char.
STURN DB 0 ;Send turn around character
RTURN DB 0 ;Receive turn around character
CHKTYP DB DSCHKT ;Checksum type desired
CURCHK DB DSCHKT ;Current checksum type
INICHK DB DSCHKT ;Agreed upon checksum type
CZSEEN DB 0 ;Flag that control-Z was typed
MFNPTR DW MFNBUF ;multiple file processing buffer
PKTNUM DB 0 ;Packet number.
NUMPKT DW 0 ;Total number of packets sent.
NUMRTR DW 0 ;Total number of retries.
NUMTRY DB 0 ;Number of tries on this packet.
OLDTRY DB 0 ;Number of tries on previous packet.
TFILNAM DS 33 ;Space for saved file name printed during GETs
RMTDATA DS 101H ;Data for remote commands
STATE DB 0 ;Present state of the automaton.
PACKET DS 4 ;Packet (data is part of it).
DATA DS 101H ;Data and checksum field of packet.
RECPKT DS 70H ;Receive packet storage (use the following).
FILBUF DS 70H ;Character buffer.
;
;** Temp 1 & 2 must be in order
;
TEMP1 DB 0 ;Temporary storage.
TEMP2 DB 0
TEMP3 DB 0
TEMP4 DB 0
;
; Data storage for MFNAME (multi-file access)
;
MFREQ DS 40 ;Requested name
MFNBUF DS 100H ;filename buffer
;
FCB DS 40 ;file control block
LFCB DS 40 ;log file fcb
TRFCB DS 40 ;Transaction file fcb
DFCB DS 40 ;Debug fcb
KFCB DS 40 ;kill file fcb
BUFF DS 256 ;file buffer
LBUFF DS 256 ;log file buffer
TBUFF DS 256 ;Transaction log buffer
DBUFF DS 256 ;Debug log buffer
ARGBLK DS 20H ;Used
; end of file