home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / trs80model1and3 / trsstr.src < prev    next >
Text File  |  1984-05-27  |  11KB  |  337 lines

  1. ; Pure storage.
  2. OUTLN2:    DB    CR,'Number of packets:'
  3.     DB    CR,'Number of retries:'
  4.     DB    CR,'File name:$'
  5. KERM:    DB    'Kermit-TRS80'
  6. KERM1:    DB    '>$'
  7. ;DELPR:    DB    'Delete it? $'
  8. CRLF:    DB    CR,'$'
  9. ERMES1:    DB    CR,'?Unrecognized command$'
  10. ERMES2:    DB    CR,'?Illegal character$'
  11. ERMES3:    DB    CR,'?Not confirmed$'
  12. ERMES4:    DB    '?Unable to receive initiate',CR,'$'
  13. ERMES5:    DB    '?Unable to receive file name',CR,'$'
  14. ERMES6:    DB    '?Unable to receive end of file',CR,'$'
  15. ERMS10:    DB    '?Unable to receive data',CR,'$'
  16. ERMS11: DB    '?System DOS error',CR,'$'
  17. ERMS14:    DB    '?Unable to receive an acknowledgement from the host',CR,'$'
  18. ERMS15:    DB    CR,'?Unable to find file',CR,'$'
  19. ERMS16:    DB    '?Unable to rename file$'
  20. ERMS17: DB    CR,'?System DOS error$'
  21. ERMS18: DB    CR,'?Unable to tell host that the session is finished$'
  22. ERMS19: DB    CR,'?Unable to tell host to logout$'
  23. INFMS3:    DB    BELL,'Completed$'
  24. INFMS4:    DB    BELL,'Failed$'
  25. INFMS5:    DB    '%Renaming file to $'
  26. INFMS6:    DB    CR,'<Closing the log file>$'
  27. INFMS7:    DB    CR,'<Connected to remote host, type $'
  28. INFMS8:    DB    'C to return>',CR
  29.     DB    '<CLEAR> is Control-',95,CR,'$'
  30. INFMS9:    DB    CR,'<Connection closed, back at micro>$'
  31. INMS10:    DB    ' Control-$'
  32. INMS11:    DB    ' (Type Left Arrow to send CTRL-S)',CR,'$'
  33. INMS12:    DB    ' (Not implemented)',CR,'$'
  34. INMS13:    DB    BELL,'Interrupted$'
  35. DNAM14:    DB    'DIR  :'
  36. DIRSPEC    DB    '0',CR
  37. ;INMS15:    DB    CR,TAB,TAB,'Drive $'
  38. ;INMS16:    DB    '  has $';filled in by summary code with drive letter
  39. ;INMS17:    DB    'K bytes free',CR,'$'
  40. INMS18:    DB    CR,'File KILLED$',CR
  41. BADDRV:    DB    CR,'++ Bad drive name$',CR
  42. CFRMES:    DB    ' Confirm with <ENTER>, cancel with <BREAK> $'
  43. ;FILHLP:    DB    ' Input file spec $'
  44. ESCMES:    DB    CR,'Type the new escape character:  $'
  45. TOPHLP:    DB    CR,'BYE to host (LOGOUT) and exit to DOS'
  46.     DB    CR,'CONNECT to host on selected port'
  47.     DB    CR,'DIR of local disk'
  48.     DB    CR,'EXIT to DOS'
  49.     DB    CR,'FINISH running Kermit on the host'
  50.     DB    CR,'HELP by giving this message'
  51.     DB    CR,'KILL a file'
  52.     DB    CR,'LOG the terminal session to a file'
  53.     DB    CR,'LOGOUT the host'
  54.     DB    CR,'RECEIVE file from host'
  55.     DB    CR,'SEND file to host'
  56.     DB    CR,'SET a parameter'
  57.     DB    CR,'SHOW the parameters'
  58.     DB    CR,'STATUS of Kermit$'
  59. SETHLP:    DB    CR,'BAud (rate)'
  60.     DB    CR,'BLock-check-type (for error detection'
  61.     DB    CR,'DEBugging mode (to display packets)'
  62. ;    DB    CR,'DEFault-disk (to receive data)'
  63.     DB    CR,'Escape (character during CONNECT)'
  64.     DB    CR,'File-mode (for outgoing files)'
  65.     DB    CR,'Ibm (parity and turn around handling)'
  66.     DB    CR,'Local-echo (half/duplex)'
  67.     DB    CR,'PArity (for communication line)'
  68.     DB    CR,'POrt (to communicate on)'
  69.     DB    CR,'PRinter (to print terminal session)'
  70. ;*    DB      CR,LF,'RECEIVE (parameter)'    ; Not currently i}plemented
  71. ;*    DB      CR,LF,'SEND (parameter)'    ; Ditto
  72.     DB    CR,'Vt52-emulation'
  73.     DB    CR,'Warning (for filename conflicts)'
  74.     DB    '$'
  75. STSHLP:    DB    CR,'PAD-CHAR'
  76.     DB    CR,'PADDING$'
  77. BLKHLP:    DB    CR,'1-CHARACTER-CHECKSUM'
  78.     DB    CR,'2-CHARACTER-CHECKSUM'
  79.     DB    CR,'3-CHARACTER-CRC-CCITT$'
  80. PARHLP:    DB    CR,'EVEN   MARK  NONE   ODD   SPACE$'
  81. ONHLP:    DB    CR,'OFF  ON$'
  82. YESHLP:    DB    CR,'NO   YES$'
  83. PRTHLP    DB    CR,'STANDARD RS232 port$'
  84. INTHLP:    DB    CR,'?  This message'
  85.     DB    CR,'C  Close the connection'
  86.     DB    CR,'0  (zero) Transmit a NULL'
  87.     DB    CR,'S  Status of the connection'
  88.     DB    CR,'Type the escape character again to send it to the host'
  89.     DB    CR,CR,'Command>$'
  90. ONSTR:    DB    ' on$'
  91. OFFSTR:    DB    ' off$'
  92. LOCST:    DB    CR,'Local echo$'
  93. DEFSTR: DB    ' default$'
  94. ASCSTR: DB    ' ASCII$'
  95. BINSTR:    DB    ' binary$'
  96. TYPHLP: DB    CR,'ASCII     BINARY     DEFAULT$'
  97. SPDHLP    DB    CR,'     50     75     110   134.5    150   300   600    1200'
  98.     DB    CR,'   1800   2000    2400    3600   4800  7200  9600   19200$'
  99. VTEMST:    DB    CR,'VT52 emulation$'
  100. CPMST:    DB    CR,'File Mode$'
  101. IBMST:    DB    CR,'IBM flag$'
  102. FILST:    DB    CR,'File warning$'
  103. PNTSTR:    DB    CR,'Printer$'
  104. ESCST:    DB    CR,'Escape char: $'
  105. BUGST:    DB    CR,'Debugging mode$'
  106. PARST:    DB    CR,'Parity: $'
  107. BCKST:    DB    CR,'Block check type: $'
  108. BCKST1:    DB    '-character$'
  109. PNONST:    DB    'none$'
  110. PMRKST:    DB    'mark$'
  111. PSPCST:    DB    'space$'
  112. PODDST:    DB    'odd$'
  113. PEVNST:    DB    'even$'
  114. SPEDST    DB    'Line Speed: $'
  115. BAUST    DB    ' Baud',CR,'$'
  116. OUTLIN    DB    28,31,CR,'$'
  117. VERSIO    DM    'Kermit-80 V 3.5 (TRS-80 Model 1/3)',CR,'$'
  118. DELSTR    DB    10O,' ',10O,'$'
  119. CLRSPC    DB    ' ',8,'$'
  120. CLRLIN    DB    29,30,'$'
  121. SCRNP    DB    28,26,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,'$'    ;place for packets
  122. SCRNRT    DB    28,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,'$'    ;place for retries
  123. SCRST    DB    28,'$'    ;place for complete
  124. SCRFLN    DB    28,26,26,26,26,25,25,25,25,25,25,25,25,25,25,25,'$'    ;place for filename
  125. SCRERR    DB    28,26,26,26,26,26,26,'$'        ;location for errors
  126. SCREND    DB    28,26,26,26,26,26,26,26,26,26,26,26,26,'$'    ;location of last line
  127. RPPOS:    DB    28,26,26,26,26,26,26,26,31,'RPack: $'
  128. SPPOS:    DB    28,26,26,26,26,26,26,26,26,26,26,31,'SPack: $'
  129. TA    DB    1BH,'$',0,0        ;cursor up
  130. TB    DB    1AH,'$',0,0        ;cursor down
  131. TC    DB    19H,'$',0,0        ;cursor right
  132. TD    DB    18H,'$',0,0        ;cursor left
  133. CLRTOP    DB    1CH,1FH,'$',0        ;clear screen
  134. TF    DB    '$',0,0,'$'
  135. TG    DB    '$',0,0,'$'
  136. TH    DB    1CH,'$',0,0        ;cursor home
  137. TI    DB    1BH,'$',0,0        ;reverse line feed
  138. TJ    DB    1FH,'$',0,0        ;clear to end  of screen
  139. TK    DB    1EH,'$'            ;clear  to end of line
  140. ;
  141. ;     COMND tables
  142. ;
  143. ;    Structure of command table:    [UTK008]
  144. ;
  145. ;    1) Number of entries.
  146. ;    2) Each entry is arranged as follows:
  147. ;        a) length of command in bytes.
  148. ;        b) 'name of command and $-sign'
  149. ;        c) offset into command table at KERMTB:
  150. ;        d) offset into command table at KERMTB:
  151. ;
  152. ;    ---> Note this command table is in alphabetic order.
  153. ;
  154. COMTAB:    DB    10H            ; Number of entries (currently 16.)
  155.     DB    03H,'BYE$',21H,21H
  156.     DB    07H,'CONNECT$',00H,00H
  157.     DB    03H,'DIR$',24H,24H
  158.     DB    03H,'ERA$',27H,27H
  159.     DB    04H,'EXIT$',03H,03H
  160.     DB    06H,'FINISH$',1BH,1BH
  161.     DB    03H,'GET$',0CH,0CH    ; Same as RECEIVE
  162.     DB    04H,'HELP$',06H,06H
  163.     DB    04H,'KILL$',27H,27H    ;SAME AS ERA
  164.     DB    03H,'LOG$',09H,09H
  165.     DB    06H,'LOGOUT$',1EH,1EH
  166.     DB    07H,'RECEIVE$',0CH,0CH
  167.     DB    04H,'SEND$',0FH,0FH
  168.     DB    03H,'SET$',12H,12H
  169.     DB    04H,'SHOW$',15H,15H
  170.     DB    06H,'STATUS$',18H,18H
  171. SETTAB:    DB    0CH        ; Number of entries (currently 12.)
  172.     DB    04H,'BAUD$',21H,21H    ; Data keys to SETJTB positions.
  173.     DB    10H,'BLOCK-CHECK-TYPE$',18H,18H
  174.     DB    09H,'DEBUGGING$',27H,27H
  175. ;*    DB    0CH,'DEFAULT-DISK$',24H,24H
  176.     DB    06H,'ESCAPE$',00H,00H
  177.     DB    09H,'FILE-MODE$',12H,12H
  178.     DB    03H,'IBM$',03H,03H
  179.     DB    0AH,'LOCAL-ECHO$',06H,06H
  180.     DB    06H,'PARITY$',15H,15H
  181.     DB    04H,'PORT$',1EH,1EH
  182.     DB    07H,'PRINTER$',24H,24H
  183. ;*    DB    07H,'RECEIVE$',09H,09H    ; Not implemented yet.
  184. ;*    DB    04H,'SEND$',0CH,0CH    ; Ditto
  185.     DB    0EH,'VT52-EMULATION$',1BH,1BH
  186.     DB    07H,'WARNING$',0FH,0FH
  187.  
  188. STSNTB:    DB    02H
  189.     DB    08H,'PAD-CHAR$',00H,00H
  190.     DB    07H,'PADDING$',03H,03H
  191.  
  192. BLKTAB:    DB    03H
  193.     DB    14H,'1-CHARACTER-CHECKSUM$','1','1'
  194.     DB    14H,'2-CHARACTER-CHECKSUM$','2','2'
  195.     DB    15H,'3-CHARACTER-CRC-CCITT$','3','3'
  196.  
  197. PARTAB:    DB    05H        ; Five entries.
  198.     DB    04H,'EVEN$',PAREVN,PAREVN
  199.     DB    04H,'MARK$',PARMRK,PARMRK
  200.     DB    04H,'NONE$',PARNON,PARNON
  201.     DB    03H,'ODD$',PARODD,PARODD
  202.     DB    05H,'SPACE$',PARSPC,PARSPC
  203.  
  204. ONTAB:    DB    02H        ; Two entries.
  205.     DB    02H,'ON$',01H,01H
  206.     DB    03H,'OFF$',00H,00H
  207.  
  208. TYPTAB:    DB    03H        ;Three entries
  209.     DB    05H,'ASCII$',01H,01H
  210.     DB    06H,'BINARY$',02H,02H
  211.     DB    07H,'DEFAULT$',00H,00H
  212.  
  213. PRTTAB:    DB    01H        ; Only one port known at this point
  214.     DB    08H,'STANDARD$'
  215.     DW    MNPORT,MNPORT
  216.  
  217. YESTAB:    DB    02H        ; Two entries.
  218.     DB    02H,'NO$',00H,00H
  219.     DB    03H,'YES$',01H,01H
  220.  
  221. CMER00:    DB    CR,'?Program error:  Invalid COMND call$'
  222. CMER01:    DB    CR,'?Ambiguous$'
  223. CMER02:    DB    CR,'?Illegal input file spec$'
  224. CMIN00:    DB    ' Confirm with <ENTER>, Cancel with <BREAK>$'
  225. CMCRLF:    DB    CR,'$'
  226. SPDTAB:    DB    10H            ;16 entries
  227.     DB    2,'50$',0,0
  228.     DB    02H,'75$',11H,11H
  229.     DB    03H,'110$',22H,22H
  230.     DB    05H,'134.5$',33H,33H
  231.     DB    03H,'150$',44H,44H
  232.     DB    03H,'300$',55H,55H
  233.     DB    03H,'600$',66H,66H
  234.     DB    04H,'1200$',77H,77H
  235.     DB    04H,'1800$',88H,88H
  236.     DB    04H,'2000$',99H,99H
  237.     DB    04H,'2400$',0AAH,0AAH
  238.     DB    04H,'3600$',0BBH,0BBH
  239.     DB    04H,'4800$',0CCH,0CCH
  240.     DB    04H,'7200$',0DDH,0DDH
  241.     DB    04H,'9600$',0EEH,0EEH
  242.     DB    05H,'19200$',0FFH,0FFH
  243.     ; Impure data
  244.  
  245. ; COMND storage
  246.  
  247. CMSTAT:    DS    1        ; What is presently being parsed.
  248. CMAFLG:    DS    1        ; Non-zero when an action char has been found.
  249. CMCCNT:    DS    1        ; Non-zero if a significant char is found.
  250. CMSFLG:    DS    1        ; Non-zero when the last char was a space.
  251. CMOSTP:    DS    2        ; Old stack pointer for reparse.
  252. CMRPRS:    DS    2        ; Address to go to on reparse.
  253. CMPRMP:    DS    2        ; Address of prompt.
  254. CMPTAB:    DS    2        ; Address of present keyword table.
  255. CMHLP:    DS    2        ; Address of present help.
  256. CMDBUF:    DS    80H        ; Buffer for command parsing.
  257. CMFCB:    DS    2        ; Pointer to FCB.
  258. ;CMFCB2:    DS    2        ; Pointer to position in FCB.
  259. CMCPTR:    DS    2        ; Pointer for next char input.
  260. CMDPTR:    DS    2        ; Pointer into the command buffer.
  261. CMKPTR:    DS    2        ; Pointer to keyword.
  262. CMSPTR:    DS    2        ; Place to save a pointer.
  263. OLDSP:    DS    2        ; Room for old system stack.
  264.     DS    100H        ; Room for lots of calls
  265. STACK:    DS    2
  266. EOFLAG:    DS    1        ; EOF flag; non-zero on EOF.
  267. FILFLG:    DS    1        ; NON-ZERO WHEN FILE NOT OPEN
  268. LSTCHR:    DB    0        ;Last character in disk i/o
  269. ;CURDSK:    DB    0        ; holds "logged" disk
  270. LOGFLG:    DB    0        ; Flag for a log file.
  271. ECOFLG:    DB    0        ; Local echo flag (default off).
  272. ESCFLG:    DB    0        ; Escape flag (start off).
  273. VTFLG:    DB    1        ; VT52 emulation flag (default on).
  274. FLWFLG:    DB    1        ;file warning flag (default on)
  275.  
  276. IBMFLG:    DB    0        ; IBM flag (default off).
  277. CPMFLG:    DB    0        ; File was created by DOS
  278. DBFLG:    DB    0        ;debugging flag (default off)
  279. PRTFLG:    DB    0        ;printer flag (default off)
  280. PARITY:    DB    DEFPAR        ; Parity.
  281. ESCCHR:    DB    DEFESC        ; Storage for the escape character.
  282. CHRCNT:    DS    1        ; Number of chars in the file buffer.
  283. FILCNT:    DS    1        ; Number of chars left to fill.
  284. PORT    DS    1        ;port for commuications
  285. OUTPNT:    DS    2        ; Position in packet.
  286. BUFPNT:    DS    2        ; Position in file buffer.
  287. FCBPTR:    DS    2        ; Position in FCB.
  288. ;FCBEXT    DS    2
  289. DATPTR:    DS    2        ; Position in packet data buffer.
  290. LOGPTR:    DW    LBUFF        ;pointer into log file buffer
  291. CBFPTR:    DS    2        ; Position in character buffer.
  292. PKTPTR:    DS    2        ; Poistion in receive packet.
  293. SIZE:    DS    1        ; Size of data from gtchr.
  294. SPEED:    DB    DBAUD        ;baud rate
  295. SPSIZ:    DB    DSPSIZ        ; Send packet size.
  296. RPSIZ:    DB    DRPSIZ        ; Receive packet size.
  297. STIME:    DB    DSTIME        ; Send time out.
  298. RTIME:    DB    DRTIME        ; Receive time out.
  299. SPAD:    DB    DSPAD        ; Send padding.
  300. RPAD:    DB    DRPAD        ; Receive padding.
  301. SPADCH:    DB    DSPADC        ; Send padding char.
  302. RPADCH:    DB    DRPADC        ; Receive padding char.
  303. SEOL:    DB    DSEOL        ; Send EOL char.
  304. REOL:    DB    DREOL        ; Receive EOL char.
  305. SQUOTE:    DB    DSQUOT        ; Send quote char.
  306. RQUOTE:    DB    DRQUOT        ; Receive quote char.
  307. CHKTYP:    DB    DSCHKT        ; Checksum type desired
  308. CURCHK:    DB    DSCHKT        ; Current checksum type
  309. INICHK:    DB    DSCHKT        ; Agreed upon checksum type
  310. CZSEEN:    DS    1        ; Flag that control-Z was typed
  311. MFNPTR:    DW    MFNBUF        ;multiple file processing buffer
  312. PKTNUM:    DS    1        ; Packet number.
  313. NUMPKT:    DS    2        ; Total number of packets sent.
  314. NUMRTR:    DS    2        ; Total number of retries.
  315. NUMTRY:    DS    1        ; Number of tries on this packet.
  316. OLDTRY:    DS    1        ; Number of tries on previous packet.
  317. STATE:    DS    1        ; Present state of the automaton.
  318. PACKET:    DS    4        ; Packet (data is part of it).
  319. DATA:    DS    5AH        ; Data and checksum field of packet.
  320. RECPKT:    DS    60H        ; Receive packet storage (use the following).
  321. FILBUF:    DS    60H        ; Character buffer.
  322. ;** Temp 1 & 2 must be in order
  323. TEMP1:    DS    1        ; Temporary storage.
  324. TEMP2:    DS    1
  325. TEMP3:    DS    1
  326. TEMP4:    DS    1
  327. ;    Data storage for MFNAME (multi-file access)
  328. MFREQ:    DS    32        ;Requested name
  329. MFNBUF    DS    7AH        ;filename buffer
  330. ;
  331. FCB    DS    50        ;file control block
  332. LFCB    DS    50        ;log file fcb
  333. KFCB    DS    50        ;kill file fcb
  334. BUFF    DS    256        ;file buffer
  335. LBUFF    DS    256        ;log file buffer
  336. ARGBLK:    DS    20H        ; Used for subroutine arguments.
  337.