home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / b / krtcmd.mac < prev    next >
Text File  |  2020-01-01  |  90KB  |  2,086 lines

  1.     .title    KRTCMD    Kermit-11 main loop, commands calling O:1 or APR4
  2.  
  3.     .macro    krt.id    RLS=V03    ,VER=63    ,PAT=0    ,LASTED=<27-Sep-97>
  4.     .ident    "'RLS'.'VER'"
  5.  
  6.     .ASECT
  7. .=110
  8.     .rad50    "'RLS'"
  9.     .word    'VER'.
  10.     .iif ne    'PAT'.    .word    'PAT'.
  11.     .word    -1
  12.     .psect    $pdata
  13. sho.ve:    .ascii    "'RLS'.'VER'"    ; /62/ added to keep the parity memory vector
  14.     .iif ne    'PAT'.    .ascii    "-'PAT'" ; /62/ from blowing up SHOW VERSION
  15.     .asciz    "  Last edit: 'LASTED'"<cr><lf>    ; max string length = ln$max
  16.     .even
  17.     .endm    krt.id
  18.  
  19.     krt.id            ; /62/ stuff the above in..
  20.  
  21.  
  22. ;    Brian Nelson  01-Dec-83  13:19:14
  23. ;
  24. ;    Change Software, Toledo, Ohio
  25. ;    University of Toledo, Toledo, Ohio
  26. ;
  27. ;    Copyright 1983 Change Software, Inc.
  28. ;
  29. ;    Edits:
  30.  
  31. ; /63/    V03.63  27-Sep-1997  by Billy Youdelman
  32. ;
  33. ;  KRTCDF - modify optional prompt arg to use address of prompt string
  34. ;        allows longer strings to be used and eliminates redundancy
  35. ;        drop $CMGLOBAL
  36. ;
  37. ;  KRTCMD - convert "-" to "_" in getcm0
  38. ;        move most of SHO VER here so the server can call it too..
  39. ;        call INCSTA on ^C abort of file xfr so stats don't blow up
  40. ;
  41. ;  KRTCM1 - moved sph$xmode after set$modem so it will prevail..
  42. ;        fixed problem caused by using errtxt buffer to store desired xmode
  43. ;        where a "?" in a error message acted like SET PHONE XMODE ?
  44. ;
  45. ;  KRTCOM - consolidate local data..
  46. ;        add DAYTIME
  47. ;        allow CD, CWD and REMOTE CD, CWD to operate without an argument
  48. ;
  49. ;  KRTCON - marktime (scheduler) completion routines are now more efficient
  50. ;        fix SET CON 8 test for emulator command chars
  51. ;
  52. ;  KRTCVT - fixfil now fixes unix leading dot ".file" names, also ".x.", etc.
  53. ;        cleaned up chkext
  54. ;        move unfmts to KRTSUB so KRTMDM can use this overlay ...
  55. ;
  56. ;  KRTDAT - add rem.ack
  57. ;        dpmumber conformed to its current 16-bit max value
  58. ;
  59. ;  KRTDIA - use opentt in place of ttyini to set linksts flag
  60. ;        move the modem definitions to a separate module KRTMDM.MAC
  61. ;        SET$DTR and SET$MODEM back here from KRTDSP
  62. ;
  63. ;  KRTDIR - buffil back to root (KRTPAK), for speed and room now available
  64. ;        add support for SET WILDCARDS
  65. ;
  66. ;  KRTEDI - fixed all possible sign extension problems now the LN$MAX > 127.
  67. ;        but keep it under 255. or you'll have to fix some other stuff!
  68. ;
  69. ;  KRTERM - use hi-efficiency print emt in T.BINWRITE under TSX
  70. ;
  71. ;  KRTERR - strip trailing blank from prompt string when making error message
  72. ;        add er$wpe, er$dna
  73. ;
  74. ;  KRTHLP - translate "_" to "-" which searching for topics
  75. ;        move index data to separate file KRTIDX.MAC solving a size problem
  76. ;        increase text line and terminal input buffers to 132. bytes
  77. ;
  78. ;  KRTIDX - moved this into a module of its own as KRTHLP was > 4096. words
  79. ;
  80. ;  KRTKM  - add SPFUNs to support Xmodem compatibly with the TSX CL handler:
  81. ;
  82. ;        CLSET    <250>    Set CL options (binin and binout only)
  83. ;        CLRSET    <251>    Clear CL options (binin and binout only)
  84. ;        CLIPND    <261>    Get number of input chars pending
  85. ;        CLWBYT    <263>    Write with byte count
  86. ;        CLCHAR    <266>    Get CL characteristics (options flags only)
  87. ;
  88. ;        added .br macro for clarity.
  89. ;
  90. ;  KRTMAC - add support for SET ATTRIBUTES
  91. ;        add flag to suspend logging to a disk file
  92. ;        make $LN$MAX 132. bytes for EIS assembly
  93. ;        pulled message macro, no longer used..
  94. ;
  95. ;  KRTMDM - created this module as KRTDIA had become too large
  96. ;        there are now 1793. words free in which more modems may be defined
  97. ;        defined T3000X.42 modem (it's T3000V.42 but with XOFF restraint)
  98. ;        convert T3000 (DTE falls back to DCE) def to XOFF flow control
  99. ;
  100. ;  KRTOSI - fix test for running LTC to accomodate QED's fast PDP-11s
  101. ;
  102. ;  KRTPAK - make .TOGO = 16, fixing a (harmless) typo (was 26)..
  103. ;        dump ^A = restart a packet for SET CONTROL UNPREFIX 1 operation
  104. ;        BUFFIL back to root (KRTPAK), for speed and room now available
  105. ;        ERROR: now sends error packet when link's open and xfr in progress
  106. ;        modify BUFFIL to do BUFPAK too, for repeated char encoding
  107. ;
  108. ;  KRTREC - support gets to LP
  109. ;        display file size in "created file" messages
  110. ;        fix unpopped stack on error exit from bufemp
  111. ;        display file type in file create message
  112. ;        display file name sent back by remote Kermit
  113. ;
  114. ;  KRTSEN - sdat$$ now rewinds to get back to top of file
  115. ;        undo repeated char encoding before dispaying remote ACK packet
  116. ;        display file size and type in "sending file" messages
  117. ;        display contents of SEND FILE ACK packet, if any..
  118. ;        redo data packet at sdat$$ when resizing due to first one failing
  119. ;        so the next retry is actually done with the smaller sized packet
  120. ;
  121. ;  KRTSER - disallow gets to TT
  122. ;        gen.h now displays the real version data ala SHO VER
  123. ;        clean up remote command response code, display reasons for retries
  124. ;        move C$BYE and REMFIN into now improved REMOTE command processor
  125. ;        on error resend REMOTE command packet before listening again
  126. ;        dump BUFPAK, use BUFFIL instead for repeated char encoding
  127. ;
  128. ;  KRTSHO - enhanced SHOW CL
  129. ;        individually display attributes, ala C-Kermit
  130. ;        add SHOW CONTROL-CHARACTER
  131. ;        add SHOW WILDCARDS
  132. ;        moved SHO VERSION to KRTCMD so the server can also call it..
  133. ;        add SHO DAYTIME
  134. ;        SHO ALL now shows all, moved to KRTCMD so it can call everything
  135. ;
  136. ;  KRTSTD - consolidate local data..
  137. ;        add SET WILDCARDS
  138. ;
  139. ;  KRTST0 - add SET CONTROL-CHARACTER
  140. ;        consolidate local data..
  141. ;        add file name to when logging to LP so later OS versions are happy
  142. ;
  143. ;  KRTST1 - allow attributes to be individually set, ala C-Kermit
  144. ;        modify SET FLOW XON to force quoting of XOFF and XON chars
  145. ;        consolidate local data..
  146. ;        add SET FILE WILDCARDS
  147. ;        cd with no arg defaults to home dir, shows default after executing
  148. ;
  149. ;        /E64/    05-May-96  John Santos
  150. ;
  151. ;        Fix bug in SET TERM which always set NOSCOPE
  152. ;
  153. ;  KRTSUB - move unfmts here so KRTMDM can live in KRTCVT's overlay ...
  154. ;
  155. ;  KRTXMO - disallow sends from TT (not supported, makes Kermit hang)..
  156. ;
  157. ;  All other modules are unmodified except for possible corrections to
  158. ;  typographical errors in the comments or such that their object code
  159. ;  remains essentially unchanged.
  160.  
  161.  
  162. ; /62/    V03.62-8  27-Jul-1993  by Billy Youdelman
  163. ;
  164. ;  This edit is mostly bug fixes for V03.61, and some enhancements, as below:
  165. ;
  166. ;  KRTAIL - add automatic 50Hz clock rate detection and support for watching
  167. ;        more than 34. lines, just in case..
  168. ;
  169. ;  KRTATR - add 25% to rec'd length for text files from non RT-11/TSX systems
  170. ;
  171. ;  KRTCM1 - make type append a LF to CR if CR not followed by one
  172. ;        hose hi bit and type anyway for VT100 and below in c$type
  173. ;
  174. ;  KRTCON - correct comments to indicate r3 is not preserved between tasks
  175. ;        fixed error handling for suspend/enable CONSOLE logging
  176. ;        added handling for logfile errors
  177. ;        move senbrk here
  178. ;        speed up keyboard input processing at high data rates
  179. ;
  180. ;  KRTCVT - increase size of fixfil stack buffer to SVID limit
  181. ;
  182. ;  KRTDAT - use erbfsiz to size errtxt buffer
  183. ;        add pkrate buffer
  184. ;
  185. ;  KRTDEB - use erbfsiz to size errtxt buffer
  186. ;
  187. ;  KRTDIA - add support for call back modems, SET DIAL/PHONE [NO]ANSWER
  188. ;
  189. ;        add a one-tick pacing delay in DODIAL's loop at 50$ (when modem
  190. ;        doesn't echo commands) to match what was done for echoing modems
  191. ;
  192. ;        fix SHO MODEM for changes to SET DIAL [NO]ECHO and [NO]INIT-ONCE
  193. ;        add initiate-prompt, dial-ack, confirm-ack, [no]binary-response
  194. ;
  195. ;        added x.result (default "Hayes" xmode) and time.settle defaults,
  196. ;        and in "Hayes" and Telebit modem definitions
  197. ;
  198. ;        if DCD is high when exiting program, hang up modem
  199. ;        add support for 38.4kb
  200. ;        add Telebit T3000 modem definitions
  201. ;
  202. ;        double the settle-time value for the wait after dropping DTR,
  203. ;        as some modems (like the T3000) need more time to recover
  204. ;
  205. ;  KRTDIR - reorganized and substantially sped up
  206. ;        added .csispc comma delimiter parsing
  207. ;        fixed wildcard "%" match to no longer match on blanks
  208. ;        moved buffil here, has to be if not in root for getcr0 @sdodir..
  209. ;        make hd$fir=:6 so badly initted disks don't crash DIR
  210. ;
  211. ;  KRTDSP - leave comm handler chans open after assigning it as the link dev
  212. ;
  213. ;  KRTEDI - add bells: up arrow when nothing saved yet, down arrow at end
  214. ;
  215. ;  KRTERR - add error message for logfile problems
  216. ;
  217. ;  KRTHLP - fix a few very small typos and errors
  218. ;        expand and enhance help text for SET DIAL, particularly commands
  219. ;        add dummy file name for HPRINT via RT-11 V5.2/TSX V6.0 LP/LS
  220. ;        display all subtopic text when wildcarding through nested text
  221. ;
  222. ;  KRTINI - dump FILLOG, as PRINTM now does this
  223. ;        provide for logfile errors
  224. ;        add current-block-pointer/size-of file to ^A stats display
  225. ;
  226. ;        check packet length in dskdmp, don't trap to 4 writing past end
  227. ;        of buffer due to line noise and/or modems retraining
  228. ;
  229. ;        major cleanup and maintenance update
  230. ;
  231. ;  KRTLNK - move krtstd back to apr6 as apr1 was over the edge..
  232. ;        fixed virtual segment 1 size in non-EIS version
  233. ;
  234. ;  KRTMAC - move dispatch macro to KRTSER
  235. ;        move erbfsiz here from KRTPAK
  236. ;        condense logging (debug) modes
  237. ;        increase efficiency of incm64 macro
  238. ;        increase MAXLNG (long-packet size) to 1920.
  239. ;        reduce MAXLNG to 520. for NONEIS assembly, so pgm loads under FB..
  240. ;        ditto for ALSIZE (phone # buffer) and LN$CNT (SL # of lines saved)
  241. ;
  242. ;  KRTOSI - test for indirect command file running program, for error handling
  243. ;        dump unused BUFDEF stuff
  244. ;        add Jim Whitlock's VBGEXE fetch pointer fixes
  245. ;
  246. ;  KRTPAK - move erbfsiz to KRTMAC
  247. ;        patch PRINTM to also write to a logfile, when same is in use
  248. ;        add logfile error handler and provide for logfile errors
  249. ;        write error messages to logfile
  250. ;        include file spec in getnxt error messages
  251. ;        add individual packet exchange duration timer, for debugging
  252. ;        make BUFFIL limit test max-0 (was max-4), allows bigger packets
  253. ;        don't log bogus data for timout
  254. ;        make ERROR send an error packet, use PRINTM elsewhere
  255. ;        don't modify SET time-out value
  256. ;        add/enforce SET SEND PACKET-LEN limit
  257. ;        move bufpak to KRTSER, no one else uses it
  258. ;        move buffil to KRTSEN, ditto..
  259. ;        move bufemp to KRTREC
  260. ;        add passed buffer length to rpack$
  261. ;
  262. ;  KRTREC - dump FILLOG, as PRINTM now does this
  263. ;        use log$packets for state logging
  264. ;        provide for logfile errors
  265. ;        modify to not NAK unknown packets (noise)
  266. ;        display any possible contents of "X" packet, for Unix and C-Kermit
  267. ;
  268. ;  KRTRMS - save created (.enter) file size in sizeof entry in data table
  269. ;        make filtyp entry in same global
  270. ;        reset SET FILE CREATE-SIZE on successful file open
  271. ;        moved LOGFIL name buffer here
  272. ;        dropped NONAME.TMP for a nfs .enter, return "bad file name" error
  273. ;        move most of ccast to mainline code in KRTCMD.MAC
  274. ;        moved GETREC here, so HELP via PF2 can't ever crash..
  275. ;
  276. ;  KRTSEN - dump FILLOG, as PRINTM now does this
  277. ;        use log$packets for state logging
  278. ;        provide for logfile errors
  279. ;        modified to wait thru bad ack packets, noise, etc..
  280. ;        recpkt buffer back to normal size, now passes same to rpack
  281. ;
  282. ;  KRTSER - allow server to talk through the comm handler too..
  283. ;        move dispatch macro here
  284. ;        add newline in log file at each new process
  285. ;
  286. ;  KRTSHO - added SHO BAUD, DTR, DUPLEX, END-OF-LINE, FLOW-CONTROL, HOME, LD:,
  287. ;        LOCAL-ECHO, LOGF, LONG-PACKETS, RANDOM, RECEIVE, SEED, SEND, SPEED
  288. ;        cleanup, condense logging (debug) modes display
  289. ;        display current-block-number and size-of logfile in SHO DEBUG
  290. ;        conform to major sinit stuff update in KRTINI.MAC
  291. ;        include last number dialed in SH PHONE
  292. ;        add SHOW CL, EOF
  293. ;
  294. ;  KRTST0 - add support for call back modems, SET DIAL/PHONE [NO]ANSWER
  295. ;        report file size (blocks free) when opening a log file
  296. ;        set binary flag instead of close/reopen file for raw I/O debug
  297. ;        fix typo causing a new logfile of same name not to get opened
  298. ;        combine FILE, STATE and PACKET into one DEBUG mode (ON)
  299. ;        redo SET DIAL ECHO and INIT-ONCE as [NO]ECHO and [NO]INIT-ONCE
  300. ;        SET SETTLE-TIME is now SET DIAL SETTLE-TIME
  301. ;        drop SET HAND XON, as RT-11 and TSX eat same..
  302. ;        drop SET DIAL INFO, as any undefined message defaults to it
  303. ;
  304. ;        rename SET DIAL PROMPT to WAKE-ACK, add BLIND, PULSE, TONE,
  305. ;        DIAL-ACK, INITIATE-PROMPT, CONFIRM-ACK, [NO]BINARY-RESPONSE
  306. ;
  307. ;  KRTST1 - moved BREAK, CREATE-SIZE and [NO]VOLUME-VERIFY here ..
  308. ;        conform sinit-related SETs to major update of KRTINI.MAC
  309. ;        move SET TIME-OUT to SET RECEIVE TIME-OUT and SET SEND TIME-OUT
  310. ;        add SET CONSOLE PRIORITY for KM/XC/XL under TSX
  311. ;        add SET FLOW-CONTROL to support RTS/CTS and KM handler
  312. ;
  313. ;  KRTUTL - modify asctim to output ticks
  314. ;        restored optional time value pointer
  315. ;        move various items here from root to save space
  316. ;
  317. ;  KRTXL  - corrected suggested XL BUFSIZ to 256.
  318. ;        keep XL open even for XM, to accommodate RT-11 V5.6
  319. ;        add support for KM handler
  320. ;        add version testing to support RT-11 V4
  321. ;        add DCDTST for status during file transfers
  322. ;        skip .ABTIO for XC/XL under ALL RT-11 V5.6 monitors
  323. ;        to avoid hang/race/?
  324. ;
  325. ;  All other modules are unmodified except for possible corrections to
  326. ;  typographical errors in the comments or such that their object code
  327. ;  remains essentially unchanged.
  328.  
  329.  
  330. ;  /BBS/  V03.61  3-Dec-1991  by Billy Youdelman
  331. ;
  332. ;  The following work was done primarily to support the use of Kermit-11 on
  333. ;  a public bulletin board system under TSX-Plus, and then expanded to make
  334. ;  a reliable, general purpose comm program.  Numerous bugs have been fixed
  335. ;  and several new routines added.  Some are RT-11/TSX-Plus specific, all are
  336. ;  described below.  For a more in-depth discussion of what's been done, see
  337. ;  KRT.DOC Appendix A.  Modifications are slugged /BBS/ in the source files.
  338. ;
  339. ;  NOTE that all files previously named K11*.* have been renamed KRT*.* and
  340. ;  in some cases names have been slightly altered, ie: K11TSX.DOC = KRT.DOC,
  341. ;  to avoid any conflict with the existing Kermit-11.  These files are NOT
  342. ;  interchangeable with those of Kermit-11 T3.60 et.al.
  343. ;
  344. ;  RT-11 multi-term support and some other things are pulled to keep the size
  345. ;  reasonable.  You must use a handler, or the controlling terminal line, to
  346. ;  talk to the outside world.  This version is for use with TSX-Plus V6.2 or
  347. ;  above, though most of it runs under TSX V6.0.  It shouldn't be any worse
  348. ;  than the "stock" Kermit-11 T3.60 with RT-11.  Debugging was done on TSX
  349. ;  V6.4, under which it has been thoroughly tested and is extremely reliable.
  350. ;
  351. ;  IMPORTANT NOTE:  While effort has been made to follow the style and format
  352. ;  in which Kermit was written, as in the case of modifying TYPE by the use of
  353. ;  standard calls (getc, putc) available across all operating systems, there
  354. ;  are other instances (such as MOUNT) using emts existing only in TSX+ which
  355. ;  will not be available elsewhere, even under RT-11.  A few new calls have
  356. ;  been added to the op system independent modules, & supporting routines to
  357. ;  the RT-11 modules.  Using some of these mods under other operating systems
  358. ;  will require similar additions to their specific support modules.
  359. ;
  360. ;  Please refer to KRT.DOC for installation instructions, then to Kermit's
  361. ;  on-line help (which is quite extensive) for operational details.
  362. ;
  363. ;
  364. ;            S p e c i f i c   M o d i f i c a t i o n s
  365. ;            ---------------   -------------------------
  366. ;
  367. ;  KRTASM - Created KRTASM.NON, assembles Kermit modules for a non-EIS CPU
  368. ;
  369. ;  KRTATR - modified rx.cdt,sn.cdt to do the "#" date/time attribute
  370. ;        hosed unused stuff, added rx.pro,sn.pro for protected file attr
  371. ;
  372. ;        added support for date/time/prot file attributes
  373. ;        patched open, close, I/O data table to support it..
  374. ;
  375. ;        modified w$attr to send all attributes in a single packet
  376. ;        rx.xle result in at$len no longer overwritten by rx.len
  377. ;        added send exact file length in bytes
  378. ;        call binary files "BINARY" not "IMAGE" so MS-Kermit is happy
  379. ;
  380. ;  KRTCM1 - c$type defaults to .LST, error handling improved, does wildcards
  381. ;        also sped up, types any size record, binary file filtering added
  382. ;
  383. ;        c$set - error handling fixed
  384. ;        c$who, c$pwd, c$cls, c$clx, c$xmodem added..
  385. ;        c$take parses file name, checks for/disallows wildcards, etc.
  386. ;        c$conn - disallow connect to TT (since one is there already..)
  387. ;        mount/dismount logical disks command interface, calls TSX emts
  388. ;        added RT-11 style assign default device, for DK only
  389. ;        remote disk_usage passes optional device argument
  390. ;        made default take file type ".COM"
  391. ;        reinit modem when exiting if DTR dropped during CONNECT
  392. ;        added SET CLn LINE x support for TSX-Plus, see HELP SET CL
  393. ;        added search path for take files
  394. ;        move sho$line here, added modem type, TSX line # and DCD status
  395. ;        added call to c$idle in c$exit to reset modem on exit to monitor
  396. ;        c$set now does multiple args, separated by commas
  397. ;
  398. ;  KRTCMD - dumped ttysav/ttyset from opentt - these killed single char
  399. ;        input under TSX, thus things like the ^A stats didn't work.
  400. ;        t.ttysav is now part of the init at start-up, then ttyrst is
  401. ;        called as needed.  ttyini no longer turns things on which
  402. ;        ttysav would have to turn off.  also, with 6 char labels,
  403. ;        %.ttysav = %.ttyset = the same thing under the present system
  404. ;        of dispatching I/O with "%." prefixing routine names..
  405. ;
  406. ;        xmode flag used to clean up xreply display by suppressing packet
  407. ;        log display when either side's blo <>1 forces a send file init
  408. ;
  409. ;        send file asfile error handling improved, get file asfile now
  410. ;        shares some of the above code.  one may GET/SEND [DEV:]FILE DEV:
  411. ;        to send/receive a single file to/on a device other than the
  412. ;        default.  wildcards are otherwise not allowed whilst renaming.
  413. ;
  414. ;        readcmd now displays prompt and input strings for getmcr
  415. ;        also enables take file echo if/after krt.ini has run
  416. ;        and will allow ";" and "!" comment delimiters anywhere in
  417. ;        a line in a command file, not just the first column..
  418. ;
  419. ;        modified getcm0's response to "?" argument to dump commands
  420. ;        in 4 columns across the screen ala VMS help
  421. ;
  422. ;        ^C handler in KRTRMS modified, thus cctrap here is unneeded..
  423. ;        CONNECT automatically if FINISH succeeds..
  424. ;        ring the bell at the end of RECEIVE, so one will know it's done.
  425. ;        fixed GET/SEND file asfile to handle node names
  426. ;        patched to accept "@COMMAND" for take file, ala RT-11
  427. ;        fixed init/take file error handling in readcmd
  428. ;        add a "BUG" command ala C-Kermit
  429. ;        GET/SEND now handle multiple file names delimited by commas
  430. ;        use DEC method of version numbering
  431. ;
  432. ;  KRTCON - this module has been extensively modified and will now run fine
  433. ;        under any monitor including SJ if it's built with timer support
  434. ;
  435. ;        pulled RT-11 multi-terminal and sj monitor w/o twait stuff..
  436. ;
  437. ;        set/reset a list of "activation" chars under TSX which
  438. ;        allows non-printing chars input at the terminal, such as ^O,
  439. ;        to be passed to the remote system during the connect mode
  440. ;
  441. ;        display handler speed (fixed for 19.2k too) when connecting
  442. ;        display escape sequence when entering CONNECT
  443. ;        disallow typing TSX lead-in char to TT when running under TSX
  444. ;        allow suppression of sign-on text, for use with krttra
  445. ;        skip TT input routine once done flag is set
  446. ;        TT input now uses con8bit ala TT output
  447. ;        added MILNET option to wakeup (XON) MILNET TACs
  448. ;        added send a control char via esc_char "^x" ala VTCOM
  449. ;        added esc_char "Z" command to hose/refresh handler
  450. ;
  451. ;  KRTCVT - added useful RT-11/TSX+ binary file types
  452. ;        modified chkext to handle file types of less than 3 chars
  453. ;        fixfil - parse a device name in filespec, fixed termination bug
  454. ;        namcvt now catches unix "/" and pc "\" directory delimiters
  455. ;        fixed namcvt to not output a "." on a null file name input
  456. ;
  457. ;  KRTDAT - added a general use buffer, some flags and variables
  458. ;        SL editor insert mode default is set on here in edists
  459. ;
  460. ;  KRTDEB - added new variables to data displayable with EXAMINE
  461. ;        display ascii chars when dumping byte values
  462. ;        fixed error handling
  463. ;        fixed addressing bug in pint (displays word values)
  464. ;
  465. ;  KRTDIA - set$mo now won't write bad modem name into modem: and will try
  466. ;        to init (killing auto-answer) when set if a line and speed have
  467. ;        been set first
  468. ;
  469. ;        if DIAL/REDIAL succeeds jump to CONNECT automatically
  470. ;        set linksts when dialing so ^C abort will catch correct ttname
  471. ;        findmodem now does not try to process an empty string in modem:
  472. ;        added c$idle, call to reset modem to idle (answer) mode
  473. ;        findmodem/findnumber will match on partial input string
  474. ;        added %X format effector for Hayes extended response modes
  475. ;        added Telebit T2500 modem definitions
  476. ;
  477. ;        redial loop moved to c$dial, runs faster without initializing
  478. ;        the modem's lun every pass thru the loop, reduces cpu usage too
  479. ;
  480. ;        load buffer with defmsg after displaying RING, to not overwrite
  481. ;        the default message with call status stuff
  482. ;
  483. ;        if DIAL can't translate an alias, say so then die (instead of
  484. ;        prompting to continue with an empty number buffer)
  485. ;
  486. ;        added xredial flag word, for keeping return path straight when
  487. ;        connecting after a successful REDIAL. flag also used to speed up
  488. ;        redial process for modems which define init.once by not initting
  489. ;        before every retry.  init.once was added to support all this..
  490. ;
  491. ;        while waiting for a response after dialing modem, check for
  492. ;        input from keyboard, allowing an easy abort
  493. ;
  494. ;        .default patched to get/set handler speed from modem response,
  495. ;        old speed is saved and restored, unless set different after..
  496. ;        Hayes definition completed and moved to it.  this also renders
  497. ;        Hayes responses displayable via SHO MODEM.
  498. ;
  499. ;        diatmo from SET DIAL TIME-OUT gets written into dial.time(r4)
  500. ;        when either c$dial or sho$dial is called.  it's now usable with
  501. ;        any modem type (not just user-defined) by setting the modem's
  502. ;        internal timer to the max (ATS7=255 etc) then letting Kermit's
  503. ;        timer take action first.
  504. ;
  505. ;        modified waitfor to test for keyboard input, allowing a "strike
  506. ;        any char" abort during dialing, now including the init string.
  507. ;        DTR is dropped to ensure the modem will actually abort the call.
  508. ;
  509. ;        SHO MODEM expanded to display everything
  510. ;        result msgs must match from 1st byte to avoid embedded strings
  511. ;        save modem init status to drop unnecessary inits
  512. ;        SET MODEM now inits same, if a line (and speed) have been set
  513. ;        echo everything from modem (if it echoes) during DIAL
  514. ;        add CONNECT/nnnn for Hayes to alter DTE speed w/TSX and CL
  515. ;
  516. ;        add Concord Data Systems 224 Auto-dial modem and make dialer echo
  517. ;        modem output byte by byte so "..." call progress stuff is echo'd
  518. ;
  519. ;        moved SET DTR code here, and reinit modem after DTR drop if one
  520. ;        was on-line before it
  521. ;
  522. ;  KRTDIR - this module has been extensively modified, please refer to it..
  523. ;        add TSX+ create time, date slug, prot status, summary lines, etc
  524. ;        corrected bugs in error handling
  525. ;        added d$cvtnum for file sizes/sums larger than 32767.
  526. ;        "DK" now uses defdir, not op system DK, needs fparse in krtrms
  527. ;        ascdat patched for RT-11 V5.5, now also used for cvtdat
  528. ;        add dirflg to control embedded blanks in file name
  529. ;        getnth used to reread until context=diridx, now context saves it
  530. ;        added summary only flag, for use with SPACE and REM SPACE
  531. ;        force USR to re-read dir segment, allowing one to swap floppies
  532. ;
  533. ;  KRTDSP - this module has been extensively modified
  534. ;
  535. ;        moved kbread here, one copy is sufficient, cleaned up also
  536. ;        streamlined jsw/nowait/single_char modes/setting/resetting/etc
  537. ;        added writ1char routine - writes a single character to TT
  538. ;        add entry for inqdtr, only works with CL handler
  539. ;        assdev patched for new mapxl in krtxl
  540. ;        made packet buffer length = $ALLSIZ to match checkpacket buffer
  541. ;        ttyrst - resume TSX window processing, as after packets, connect
  542. ;        added cl.dump to clean up when exiting/modifying a CL line
  543. ;        inqbuf patched to use MAXLNG for TSX+, MAXPAK for RT-11
  544. ;        added inqcd
  545. ;
  546. ;        moved binread here so CONNECT can share it and XL can be left
  547. ;        open under TSX and RT-11SJ where there is no hope of closing it
  548. ;
  549. ;        I/O is now dispatched this way:
  550. ;         1) if via the controlling terminal line, use routines in KRTERM
  551. ;        regardless of operating system.  that is, the t.tty... calls
  552. ;         2) if via a handler, use routines in KRTXL.  that is, the
  553. ;         x.tty... calls for CL, XC or XL
  554. ;         3) RT-11 multi-terminal I/O has been pulled
  555. ;
  556. ;        moved set$line here, patched to reset modem to idle state and
  557. ;        release a TSX CL line after SET LINE TT if same was acquired
  558. ;        within Kermit
  559. ;
  560. ;        set$line won't write bad device to ttname
  561. ;        SET LINE TT now reverts to the remote mode
  562. ;
  563. ;  KRTEDI - up/dn arrow command scrolling fixed
  564. ;        command dispatch table patched for VT-100 keypad (KED equivs)
  565. ;        dup cmds now not saved even when < max cmds are currently stored
  566. ;        extend keypad for adv, bkup, word, char, line, delete, undelete
  567. ;        added check for SS3 for VT-220 keypad
  568. ;        cleaned up various odds and ends..
  569. ;        WARNING:  If LN$MAX is made greater than 127. fix sxt stuff here
  570. ;
  571. ;  KRTERM - this module has been extensively modified, please refer to it
  572. ;        added SET TT XON (TSX) emt to t.ttxon, uses tsxsav for lnum
  573. ;        add dummy routines for inqdtr, inqcd
  574. ;        ttyini - suspend TSX window processing, as in connect, packets
  575. ;        added support for vlflag under TSX+ to ttyini
  576. ;
  577. ;        drop TSX hi eff term mode and declare a list of activation chars
  578. ;        instead, allowing single char input (so packets can be longer
  579. ;        than TSX's internal I/O buffers) whilst offing ^B, ^T, ^W, etc
  580. ;        so line noise doesn't trigger various annoying things as when
  581. ;        using the server via TT, also allows passing to remote when in
  582. ;        the connect mode
  583. ;
  584. ;  KRTERR - moved error message prefix routine here from KRTPAK
  585. ;        moved all system error messages here, from various modules
  586. ;
  587. ;  KRTHLP - kill extra LF after listing subtopics
  588. ;        hfind - fixed wildcarding when no subtopics exist for a topic
  589. ;        help text file updated to reflect mods/additions/omissions
  590. ;        hindex - display sped up, prompting after it now uses full text,
  591. ;        also handles topic names greater than 18 bytes ala VMS help
  592. ;        added fake RMS stuff for RT-11/TSX, and did a general cleanup..
  593. ;        path for KRTHLP.HLP is now HLP, KRT, SY and DK
  594. ;        modified to check for correct copy of KRTHLP.HLP
  595. ;        on topic error nest in as far as possible instead of to the top
  596. ;        added HPRINT, dumps help text to LP
  597. ;
  598. ;  KRTINI - prompt set to KRT
  599. ;
  600. ;        call to an .INI file now tries INI, KRT then DK and finally
  601. ;        SY.  take file echo is disabled if krt.ini is found, then
  602. ;        enabled when the init file is closed (in readcmd, in krtcmd)
  603. ;        name of init file (if found) is displayed while reading same..
  604. ;
  605. ;        recdsp table fixed to call recvt1 (instead of senvt1 .. ) for
  606. ;        terminals >VT100
  607. ;
  608. ;        added warning message when 8-bit quoting is first forced on and
  609. ;        init stuff in fixchk so the need for 8-bit quoting is tested on
  610. ;        each xfr, thus one need not exit/restart Kermit to turn it off
  611. ;
  612. ;        packet length display in log files now accommodates four digit
  613. ;        numbers, as the max. packet is now 1024. bytes
  614. ;
  615. ;        allow debugging to TT even with no disk file open..
  616. ;        reset parity found tho set NONE warning before each transaction
  617. ;        fixed warning messages for unsupported/disabled long packets
  618. ;        dkname used to home, here it's init'd to physical DK at start-up
  619. ;
  620. ;  KRTLNK - segments have been combined where possible to reduce memory and
  621. ;        mapping requirements
  622. ;
  623. ;  KRTMAC - modified message macro to call .newline instead of saving CR/LF
  624. ;        and null for each new line, knocking 1042. bytes off the size
  625. ;        of this version..  also changed ".print" emulation to wrtall,
  626. ;        for a similar savings in compiled program size.
  627. ;
  628. ;        dump raw I/O logging from log$al (SET DEB ALL) - too confusing
  629. ;        also pulled log$rp out and made it a completely separate item..
  630. ;
  631. ;        added a couple upper case macros
  632. ;
  633. ;  KRTNHD - made divide macro double precision
  634. ;
  635. ;  KRTPAK - added lun.ld == 12 for TSX logical disk support
  636. ;        added lun.at == 5 for file attributes support
  637. ;        prefixing error messages with the prompt string moved to KRTERR
  638. ;        waitsoh - ^Z abort changed to ^C abort, thus not killing the pgm
  639. ;
  640. ;        spack$ packet length test fixed to determine the true length of
  641. ;        a packet near or equal to 94 bytes when long packets are used.
  642. ;        it was possible to generate a "normal" packet with an out-of-
  643. ;        range LENGTH character (using all eight bits) when reaching the
  644. ;        the EOF produced a last packet in a long packet series close to
  645. ;        94 bytes, as the routine filling the packet data input buffer
  646. ;        is still looking for enough to make a long packet, with no
  647. ;        consideration for the added SEQ and TYP bytes nor the checksum
  648. ;        size (up to three more bytes with CRC block checking)..
  649. ;
  650. ;        rpakst patched to hose link device whenever the "T" (time-out)
  651. ;        packet count is incremented, or when a NAK xxx NAK series
  652. ;        (indicating resonating packets) occurs.  this is very helpful
  653. ;        when telephone line noise crashes/hangs the handler..
  654. ;
  655. ;        space padding between elements of an error message moved from
  656. ;        error: to the err msgs themselves as printm doesn't do it, and
  657. ;        it's too confusing otherwise..
  658. ;
  659. ;        incsta patched to compensate for crossing midnight, as long as
  660. ;        there's less than 24 hours between calls to it, thus 32-bit
  661. ;        time data from incsta are thought to be sufficient here
  662. ;        note: the display routine in krtsho limits max to 18.2 hours..
  663. ;
  664. ;        patched bufemp to not output the lead-in char to TT under TSX
  665. ;
  666. ;        moved RPACK debug stuff to rawio: as when it was in rpakrd: it
  667. ;        missed the SOH, which is handled by waitsoh: (both call rawio)..
  668. ;        also cleaned up display at the EOL and added display of TIMOUTs
  669. ;
  670. ;        fixed non-init'd repeat count reg bug in bufunpack
  671. ;
  672. ;  KRTREC - rfil.x: put "Remote server response:" here so it displays even
  673. ;        when blo <>1.  also set image=binary here so typing 8-bit
  674. ;        files doesn't die on checksum error when clrpar hoses hi bits
  675. ;
  676. ;        rfil.f: check asname here (instead of rfil.d), also fixed so
  677. ;        VMS filespecs longer than 66. bytes don't write past end of the
  678. ;        scratch buffer.  also namcvt strips VMS node::dev:[dir] here..
  679. ;
  680. ;        kill debug to TT if not running as a local Kermit
  681. ;        add support for INCOMPLETE-FILE-DISPOSITION
  682. ;
  683. ;  KRTRMS - iswild modified to catch implicit wildcarding
  684. ;        error mapping tables augmented to accommodate new routines
  685. ;        .rctrlo added to file close routine
  686. ;        chkdev added, used for bbs device access restriction
  687. ;        limits: (activation char list for TSX) lives here, also vlflag
  688. ;        added prewind routine to fake RMS stuff when reading help text
  689. ;        add er$dev at end of faterr: table to catch non-init'd lookup
  690. ;
  691. ;        suspend: patched to wait in one tick increments, allowing ^C to
  692. ;        abort - also now uses clkflg to accommodate 50 or 60 Hz..
  693. ;
  694. ;        fixed fparse handling of device name, also disallow a leading
  695. ;        comma in the arg string, as this will do a nfs lookup..
  696. ;
  697. ;        ccast - now does trouble-free aborts from anywhere you'd need it
  698. ;        when talking to the handler or when something is running which
  699. ;        if aborted would leave virtual addressing in a mess, the bell
  700. ;        will be rung acknowledging the abort, at which point it's best
  701. ;        to wait for the program to do it, which it will as soon as it
  702. ;        can.  further ^C's will ring the bell up to CC$MAX times, then
  703. ;        a complete abort and return to the main command line via .spcps
  704. ;        occurs.  if necessary an error packet will be sent, however this
  705. ;        may not be as effective as using ^E, which waits for the packet
  706. ;        in progress to complete first..
  707. ;
  708. ;        added getmcr routine to get arg(s) from KMON passed to chain
  709. ;        area when Kermit is started.  owing to the way RT-11/TSX+ parse
  710. ;        the "@" (causes KMON to try to open the file and read the
  711. ;        first line of it into the command buffer, including the chain
  712. ;        area) the syntax "KERMIT @TAKEFILE" is not usable under RT/TSX.
  713. ;        "KERMIT TAKE TAKEFILE" is a poor but functional substitute..
  714. ;        any other command and args may be passed, ie; .kermit dial tommy
  715. ;
  716. ;        add fixwild, translates "?" to "%" in file names
  717. ;        fixed error handling in file close routine
  718. ;        added getdk, gets physical name of "DK"
  719. ;
  720. ;        moved direr$ here, moved error messages from various modules to
  721. ;        krterr, and added calls to them via direrr..
  722. ;
  723. ;  KRTSJ  - link command file to build minimum memory version of this
  724. ;        program.  KRT.SAV is disk overlaid, uses 51kb..
  725. ;
  726. ;  KRTOSI - "pic" code dumped
  727. ;        if TSX, line number saved in tsxsav during init, for t.ttxon
  728. ;        store clock rate (50/60 Hz) in clkflg, use elsewhere for timers
  729. ;        add init for TSX activation char list
  730. ;        call assdev when PRO-350 tries to automatically assign CL or XC
  731. ;        .SERR is set here and then left on forever..
  732. ;        VT200 now sets con8bit
  733. ;        cleaned up init code
  734. ;        increase ALSIZE to 1024. (user-defined modem and ph numb buffer)
  735. ;        under RT-11 display memory free for handlers at sign-on
  736. ;
  737. ;  KRTSEN - increased size of recpkt buffer to $allsiz to avoid writing past
  738. ;        eob (causing trap to 4 in rpack$ which crashes the program) when
  739. ;        packets are out of sync and a long packet arrives where an ack
  740. ;        is expected, or line noise "extends" otherwise ok data..
  741. ;
  742. ;        kill debug to TT if not running as a local Kermit
  743. ;        modified to (w/KRTATR) send all attributes in a single packet
  744. ;        ensure directory search channel is closed on errors/aborts
  745. ;
  746. ;        display abort message when file skipped due to SET FILE PROTECT
  747. ;        (by an "X" or "Z" in the ACK packet) on the other Kermit
  748. ;
  749. ;  KRTSER - gen.t filespec more carefully tested, defaults to .LST type
  750. ;        double prompt on server exit killed by hosing ^M in FIN packet
  751. ;        remget - now uses srcnam for input file
  752. ;        no args to server command allowed under RT/TSX
  753. ;        input file name to serv.r checked by fparse
  754. ;        gen.c inserts colon after device name if necessary
  755. ;        gen.w - remote who via xreply added
  756. ;        upcase incoming remote command args, so mskerm is happy
  757. ;        gen.d checks for valid device before initiating any output,
  758. ;        defaults to DK if no arg given, as from MSKermit
  759. ;        modified gen.u to use krtdir
  760. ;        remspa accepts optional device argument, gen.u passes to krtdir
  761. ;        remfin returns error status in r0, to CONNECT if FINISH succeeds
  762. ;        disallow running server unless link device is TT
  763. ;
  764. ;  KRTSHO - SHOW command with no args displays assigns ala RT-11
  765. ;        sho$all - shortened up
  766. ;        added sho$attributes
  767. ;        added sho$devices - displays the bbs access permission list only
  768. ;        added sho$submounts, using TSX emts
  769. ;        added sho$vl - displays status of vlswch under TSX+
  770. ;        add DEC-Multinational type to sho$file
  771. ;        moved release notes to the help text file
  772. ;        sho$packet - display "^A" notation in addition to octal numbers
  773. ;        also lists long-packets max length, set length, rec'd length
  774. ;        add xtime for spiffier transfer time display, other small fixes
  775. ;        sho$fi: indicate if file name conversion disabled, lower case on
  776. ;        added home directory to sho$default
  777. ;        fixed display formatting for sho$phone_numbers
  778. ;        sho$params indicates if SET LONG OFF or SET NOLONG
  779. ;        added MILNET to SHO CONSOLE
  780. ;        added c$print
  781. ;        moved sho$line to krtcm1
  782. ;        added SHO TERMINAL
  783. ;        add SHOW INCOMPLETE-FILE-DISPOSITION
  784. ;        add SHO MEMORY, display remaining handler free space under RT-11
  785. ;        add SHO SL, SHO UPDATE, added LOCAL-ECHO, BREAK to SHO CONSOLE
  786. ;        add SHO REPEAT-CHAR, SERVER
  787. ;        pass file date/time/prot to COPY output file
  788. ;        added SHOW commands for everything else possible..
  789. ;        SHO VERSION uses DEC method of version numbering
  790. ;
  791. ;  KRTST0 - set$pa - fixed display bug with "?" arg
  792. ;        enhanced set$speed error handling
  793. ;        added SET PHONE XMODE n for Hayes extended response mode support
  794. ;        cleaned up all debug code, allowing debug to TT w/o a disk file
  795. ;        moved set$line to KRTDSP, so it can call c$idle in adj. overlay
  796. ;        make SET DEBUG NONE off ALL debugging, including TT
  797. ;        add separate parameter for initial-connect retry ala VMS Kermit
  798. ;        add SET INCOMPLETE-FILE-DISPOSITION
  799. ;        add SET SL
  800. ;        move [SET] LOGFILE here, integrate with SET DEBUG..
  801. ;        make logfile default type .LOG, ask before zapping existing file
  802. ;        allow LP as the logfile, please SPOOL this in the op system!
  803. ;        add optional debug mode to LOGFILE, file name to SET DEBUG mode
  804. ;        LOGFILE sans args closes an open logfile
  805. ;        add SET SETTLE-TIME to allow for modem's reset processing time
  806. ;        add SET SL ON,OFF,[NO]KED
  807. ;
  808. ;        added SET DIAL RINGING, CONnnnn for supported speeds, ABORT
  809. ;        COMMENT, IDLE, PROMPT and INIT.ONCE for user-defined modem
  810. ;
  811. ;  KRTST1 - HOME uses dkname:
  812. ;        set$df - now calls c$cwd
  813. ;        set$sn - clear r0 after printing error message, avoid dupe msg
  814. ;        sts$pl - corrected packet length max test to 94. (maxpak)
  815. ;        set$attributes - fixed so "?" arg doesn't set to last displayed
  816. ;        added set ld empty, using TSX emts
  817. ;        sf$typ - patched to pass proper arg to any routine it calls ..
  818. ;        str$pl re-enables long packets if set >94., warns if CRC not on
  819. ;        set$file - added SET FILE NAMING [NO]LOWER-CASE, for Unix
  820. ;        SET LONG ON now also does SET REC PAC 1204 and SET BLO 3
  821. ;        con8bit set/cleared as appropriate by set$tt
  822. ;        time-out may now be set as low as 1 second
  823. ;        SET REC PAC >94 now enables long-packets, if set off prior to it
  824. ;        added SET CL PORTS, UNITS for auto line assign under TSX+
  825. ;        added SET CONSOLE [NO]MILNET to force 2 XONs when CONNECTing
  826. ;        cleaned up SET FILE code, see HELP SET FILE for details
  827. ;
  828. ;        set$bi - modified to be augmented by new entries, not trashed,
  829. ;        to allow dependence on it for selection of filtering for the
  830. ;        new improved type routine in KRTCM1, supports types <3 chars
  831. ;
  832. ;        st$nlp - clr senlng, which is now used to ensure a packet of
  833. ;        almost or equal to 94 bytes in a long-packet xfr will get the
  834. ;        correct header.  command dispatch table also patched for this
  835. ;
  836. ;        added set$vl - sets action on vlswch char ^W and print window
  837. ;        char ^B in the CONNECT mode under TSX+  see HELP SET VLSWCH
  838. ;
  839. ;        moved SET [NO]QUIET here, made it SET TT [NO]QUIET, added tests
  840. ;        for it where missing..
  841. ;
  842. ;  KRTSUB - added upper case subroutine
  843. ;        moved itoa here
  844. ;        add support for non-EIS CPUs
  845. ;
  846. ;  KRTTRA - after each byte sent the response from the receiver is echo'd
  847. ;        this makes it handy for reading text files into a called
  848. ;        system's message editor, etc..  speed is locked at 1 byte/tick,
  849. ;        which is 600 baud in 60Hz land
  850. ;
  851. ;        added code to echo last char(s) from remote after EOF is reached
  852. ;        modified action on EOF to reconnect to remote system, suppressing
  853. ;        CONNECT's sign-on for a cleaner (cursor+display intact) return
  854. ;
  855. ;  KRTUTL - added logical disk mount using TSX+ emts
  856. ;        getrec patched to accept passed buffer-length
  857. ;        50/60Hz test added to asctim
  858. ;        ascdat now uses copy in krtdir
  859. ;        cleaned up the delete, rename and copy subroutines..
  860. ;        move copy file name checking to c$copy, now shared with PRINT
  861. ;        try to mount .DEV logical disk if .DSK default fails
  862. ;        fixed COPY error handling when out file is too small
  863. ;
  864. ;  KRTXL  - DTR drop sped up to a 0.5 second interval..
  865. ;        dumped waitti as multiple byte reads accomplish the same thing
  866. ;        CLHOSE defined for use in clearing CL handler, uses spfun 265
  867. ;        CLSTAT defined and inqdtr added, for CL lines only..
  868. ;        enhanced set$speed error handling
  869. ;        mapxl now allocates the handler under TSX
  870. ;        added inqcd
  871. ;        SET SPEED reinits modem if one was on-line
  872. ;
  873. ;        mapxl now uses .cstat to get physical name from logical name
  874. ;        one may ASS CL0 PHN then run Kermit and SET LINE PHN within it
  875. ;
  876. ;        dropped TSX hi-eff term mode when data are going thru a handler
  877. ;        allowing use of ^A and etc during transfers under TSX
  878. ;
  879. ;        allow LFOUT operation of CL handler.  under TSX return is made
  880. ;        an activation character, thus no LF is appended..
  881. ;
  882. ;  KRTXM  - added equiv. of SETSIZ KRTTSX/T:64., helps on some TSX systems..
  883. ;
  884. ;  KRTXMO - added xmodem..  this is currently send only from here via the
  885. ;        connected terminal line (no handler support)
  886.  
  887.  
  888. ; /BBS/    Non-relevant edits (other operating systems) have been pulled below..
  889.  
  890. ; 60 21-Mar-89    00:00:00  K11DIA.MAC    Completed definition of DF224 modem
  891. ; 59 17-Sep-87    15:28:36  K11SER.MAC    Fix processing of server cwd cmd
  892. ; 56 23-Jun-87    07:41:18  K11PRT.MAC    Fix sending break for XL on RT-11
  893. ; 56 19-Feb-87    15:58:58  All sources    Use teco macro to change all the
  894. ;                    .includeS to be conditional, this
  895. ;                    was done to allow assembly on RT-11
  896. ;                    version 4 and P/OS
  897. ; 56 09-Dec-86    14:15:23  K11INI.MAC    Control A stats support
  898. ;              K11REC.MAC
  899. ;              K11SEN.MAC
  900. ; 56 06-Nov-86    08:27:54  K11SHO.MAC    Fix command macro list (SHO ?)
  901. ; 55 23-Oct-86    11:00:59  K11CMD.MAC    Prompting bug for RT-11 XM overlay
  902. ; 54 30-Sep-86    13:24:07        SHOW DIAL
  903. ; 54 29-Sep-86    10:23:49  Numerous    Fix sources for possible I/D space
  904. ;                    linking under RSTS/E and RSX11M+
  905. ; 54 23-Sep-86    16:28:14  K11DIA.MAC    Support VADIC 4224 .v22bis modem
  906. ; 54 23-Sep-86    16:28:46  K11ST0.MAC    SET PHONE TONE/PULSE and SET PHONE
  907. ;                    BLIND, added for VA4224 support
  908. ; 54 09-Sep-86    16:01:27  K11ST1.MAC    SET FILE NAMING/NAMES option
  909. ;              K11CVT.MAC    Options are: LITERAL, CONVERTED
  910. ;              K11DAT.MAC             FULL, UNTRANSLATED
  911. ; 53 13-Aug-86    09:38:04  K11PAK.MAC    Add SET SEN [NO]XON so one can force
  912. ;              K11ST1.MAC    every packet sent to be prefixed with
  913. ;              K11DAT.MAC    an XON.  Perhaps this will help for
  914. ;                    the DHV/U problems with flow control.
  915. ; 53 12-Aug-86    16:28:14  K11PAK.MAC    Fix BUFUNP to process repeat counts
  916. ;              K11SER.MAC    It would seem the 2.29 of MS Kermit
  917. ;              K11REC.MAC    is prefixing file name in F packets
  918. ; 53 12-Aug-86    11:05:03  K11CMD.MAC    Allow ; and ! to delimit comments
  919. ; 53 07-Aug-86    08:40:36  K11RCO.MAC    Minor changes to connect under RT-11
  920. ;              K11PRT.MAC    SJ without timer support. This was
  921. ;                    done AGAINST my better judgement.
  922. ; 53 05-Aug-86    19:35:19  Many        Make CMDBUF and ARGBUF pointers to
  923. ;                    the actual data in order to reduce
  924. ;                    the K11XM and K11RT4 sizes to help
  925. ;                    in SRUN or FRUN. Add code to re-
  926. ;                    locate some PIC code into dynamic
  927. ;                    region based from APR7 for RT-11.
  928. ; 53 29-Jul-86    13:10:34  K11ST1.MAC    Add SET FIL TYP DEC_MULTINATIONAL
  929. ;                    to allow 8-bit text files. The mod
  930. ;                    to K11ATR was to add support for
  931. ;                    this between two 3.53 or later K11
  932. ;                    systems.
  933. ; 52 28-Jul-86    17:10:00  K11RTI.MAC    More TSX+ features, also for PRO
  934. ;                    (I now have a TSX+ system on my
  935. ;                    PRO/350)
  936. ; 52 2X-Jul-86          Numerous    Command line editing and recall,
  937. ;                    use arrow keys to control. Created
  938. ;                    K11EDI.MAC from CLEEDI.MAC
  939. ; 52 2x-Jul-86          K11RT*.MAC    Root size reductions for XM, via
  940. ;                    moving more things into dynamic
  941. ;                    region.  Some things in K11DAT were
  942. ;                    changed to pointers.
  943. ; 51 07-Jul-86    12:31:17  K11PRT.MAC    .TWAIT for packet reads to reduce
  944. ;                    overhead on XM and TSX+
  945. ; 51 13-Jun-86    13:53:05  K11CVT.MAC    Truncate file names for RT-11
  946. ; 51 06-Jun-86    09:52:29  K11RTI.MAC    Alter TSX+ memory allocation
  947. ; 51 06-Jun-86    09:52:57  K11PRT.MAC    Get rid of .HRESET for XC handler
  948. ; 51 04-Jun-86    11:16:07  Misc.        More changes to get K11XM.SAV to run
  949. ;                    in the Foreground on RT-11 V5
  950. ; 51 29-May-86    13:50:00  K11CMD.MAC    Remove first (unneeded) call to SETCC
  951. ;                    so we can wait for XINIT to do a .QSET
  952. ;                    as we need extra one for the control
  953. ;                    C watcher on RT-11.
  954. ; 51 29-May-86    13:46:07  K11RT4.MAC    Add a real control C trap. IE, start a
  955. ;                    watchdog timer to check the terminal
  956. ;                    status word.
  957. ; 51 27-May-86    11:33:23  K11RCO.MAC    Kludge for bug in RT 5.1 XL handler
  958. ; 51 25-May-86    09:33:12  K11RT4.MAC    Move XINIT out into K11RTI.MAC and put
  959. ;              K11RTI.MAC    into an overlay. Also redo the overlay
  960. ;              K11XM.COM    to cut down autoload vectors on RT XM.
  961. ; 51 23-May-86    11:49:44  A few        Allocate ALBUFF at run time
  962. ; 51 23-May-86    10:50:16  K11RCO.MAC    Check for SJ exec having a clock
  963. ; 51 08-May-86    15:54:56  K11RCO.MAC    Rewrote RT-11 connect code
  964. ; 51 08-May-86    13:20:33  K11CM1.MAC    Fix TYPE command for large recordsize
  965. ;                    files
  966. ; 49 28-Mar-86    09:25:10  K11HLP.MAC    Rewrote help routine
  967. ; 49 24-Mar-86    12:16:33  K11ATR.MAC    Fix protocol error for attribute
  968. ;                    packets. See K11INS.DOC and K11.BWR,
  969. ;                    also see K11ATR.MAC
  970. ; 48 13-Mar-86    14:28:10  K11SHO.MAC    SHOW PHONE
  971. ; 47 05-Mar-86    12:48:19  K11PCO.MAC    Trash K11CON, K11RTC is for RT-11
  972. ; 45 20-Feb-86    15:28:56  K11DIA.MAC    Added SET PHONE NUMBER
  973. ;              K11ST0.MAC
  974. ; 45 18-Feb-86    11:14:04  K11ST0.MAC    Added SET DIAL
  975. ; 45 11-Feb-86    12:17:09  K11RT4.MAC    Pass KMON command BYE for server
  976. ;                    logout on TSX+
  977. ; 45 11-Feb-86    12:27:42  K11RTD.MAC    Skip volume verify for LDn:
  978. ; 45 11-Feb-86    12:28:06  K11PRT.MAC    Do a SET CLn LFOUT when closing line
  979. ; 45 10-Feb-86    11:52:21  K11CON.MAC    Removed RT-11 code
  980. ; 45 10-Feb-86    11:30:41  Misc        Final MODS from Steve Heflin
  981. ; 44 07-Feb-86    15:48:45  K11PAK.MAC    Change Steve Heflin's exiting Kermit
  982. ;                    if the wait for SOH reads a contrl Z
  983. ;                    to require TWO ^Zs in a row
  984. ; 44 07-Feb-86    13:58:09  K11DAT.MAC    Data for displaying TIMEOUT count
  985. ;              K11INI.MAC    Display TIMEOUT count
  986. ; 44 04-Feb-86    09:00:12  K11PRT.MAC    Implicit SET CL NOLFOUT for TSX+
  987. ;                    Write SET SPEED code for CL (TSX+)
  988. ; 44 03-Feb-86    12:46:50  K11PRT.MAC    Allow CLn: for TSX+, where N is 0..7
  989. ;              K11DSP.MAC
  990. ; 43 24-Jan-86    16:30:22  K11PRT.MAC    Added SET RT-11 BREAK [SHORT][LONG]
  991. ;              K11DAT.MAC    Short is 275 MS, long is 3 Sec
  992. ;              K11ST0.MAC
  993. ; 43 23-Jan-86    15:58:51  Misc        Added stats for packet and file data
  994. ;                    Also compute data rate in STAT and
  995. ;                    SHO PAC commands
  996. ; 43 17-Jan-86    13:39:50  K11INI.MAC    Clean up SET SEND/RECEIVE and also
  997. ;              K11ST1.MAC    use LONG PACKETS only if the user
  998. ;                    did SET REC PAC > 94
  999. ; 43 17-Jan-86    11:26:01  K11PAK.MAC    Change packet stats into 32. bits
  1000. ;              K11INI.MAC    to avoid overflow. Run DOB on SYSLIB
  1001. ;              K11DAT.MAC    modules CDDMG, CBTA and SAVRG and
  1002. ;              K11SHO.MAC    put them into K11RT4.MAC
  1003. ;              K11REC.MAC
  1004. ;              K11SEN.MAC
  1005. ;              K11RT4.MAC
  1006. ; 42 14-Jan-86    13:03:38  K11DIA.MAC    Rixon R212A modem support added
  1007. ;                    by Robin Miller of Northern Telecom
  1008. ; 42 10-Jan-86    11:43:37  several    LONG packet support
  1009. ; 41 31-Dec-85    12:23:53  K11ST1.MAC    Added SET SERVER [NO]TIME_OUT [value]
  1010. ;              K11PAK.MAC
  1011. ;              K11INI.MAC
  1012. ;              K11DAT.MAC
  1013. ;              K11SER.MAC
  1014. ;              K11DEB.MAC
  1015. ; 41 31-Dec-85    04:23:27  K11PRT.MAC    Added support for RT-11 5.2 and DTR
  1016. ;                    control
  1017. ; 41 28-Dec-85    11:43:52  Numerous    Added Steve Heflin's mods in for AtoZ
  1018. ;
  1019. ; The following things (edit 40) came up from comments received at F85 Decus
  1020. ;
  1021. ; 40 18-Dec-85    10:03:57  K11DSP.MAC    Added dummy EP for INQDTR:
  1022. ; 40 18-Dec-85    10:03:02  K11ST0.MAC    Print DTR status on SET LINE
  1023. ; 40 17-Dec-85    13:20:12  K11DIA.MAC    Added REDIAL ntimes command
  1024. ;              K11DAT.MAC    Added global PHNUM for REDIAL command
  1025. ; 40 16-Dec-85    15:14:23  K11CVT.MAC    Remove .COM from default binary types
  1026. ;
  1027. ; 2.39 is the Fall Decus version
  1028. ;
  1029. ; 39 04-Dec-85    17:58:37  K11DIA.MAC    Modem type data structure mods, see
  1030. ;                    K11DIA.MAC for more info
  1031. ; 39 03-Dec-85    13:00:14  K11TSX.MAC    More mods to use CONSOLE port on RT-11
  1032. ;              K11DSP.MAC    Also, SET LIN TT will override the
  1033. ;                    use of XL or MT service
  1034. ; 39 30-Nov-85    12:35:44  K11INI.MAC    Send ESC> to force ANSI mode if VT-100
  1035. ; 39 14-Nov-85    10:17:15  K11RT4.MAC    Check for XC, XL and MT service.  If
  1036. ;                    not present, warn and fake using TSX
  1037. ;                    TT code.
  1038. ; 38 07-Nov-85    15:13:06  K11RTD.MAC    Rewrite handling for REMOTE DIR server
  1039. ;              K11SER.MAC    processing so that we do not fill up
  1040. ;                    a file with the directory listing and
  1041. ;                    then send the file.  Instead stuff
  1042. ;                    GETROUTINE: with &SDODIR.
  1043. ; 38 06-Nov-85    16:20:33  K11SER.MAC    Change REM HELP to use asciz sender
  1044. ;                    instead of dumping to file and sending
  1045. ;                    the file for the extended response
  1046. ; 38 06-Nov-85    15:17:36  K11RT4.MAC    Change EPT name GETCR0 to FGETCR0
  1047. ; 38 06-Nov-85    15:13:59  K11PAK.MAC    Moved GETCR0 to call actual next_char
  1048. ;                    routine via CALL @GETROUTINE so we can
  1049. ;                    support the use of alternate routines.
  1050. ;                    This allows extended server responses
  1051. ;                    to use memory or whatever instead of
  1052. ;                    temporary files.
  1053. ; 37 05-Nov-85    10:19:47  K11PRT.MAC    Added .TWAIT for 1/3 second in TTYFIN
  1054. ;                    to avoid turning the XC/XL driver off
  1055. ;                    before all I/O has been sent to host
  1056. ; 37 04-Nov-85    17:23:30  K11PRT.MAC    Put back  in the kludges for the lack
  1057. ;                    of a clock, which somehow got lost in
  1058. ;                    subspace somewhere (RT-11 specific)
  1059. ; 37 04-Nov-85    15:25:08  K11PRT.MAC    Various mods for CL handler for TSX+
  1060. ;              K11RT4.MAC    to allow the use of 8-BIT mode on the
  1061. ;              K11TSX.MAC    handler, also avoid dropping DTR when
  1062. ;              K11DSP.MAC    we close CL line. Dummy EPTs stuffed
  1063. ;                    in K11TSX for reset @ exit code.
  1064. ; 37 04-Nov-85    13:23:52  K11REC.MAC    ensure call to FPARSE for case where
  1065. ;                    user says GET remote_name local_name
  1066. ; 37 01-Nov-85    10:51:33  K11INI.MAC    Get defensive in RPAR so we can catch
  1067. ;                    short SINIT packets better and fix(?)
  1068. ;                    them.  Needed for FIDO Kermit.
  1069. ; 37 19-Oct-85    17:17:49  K11DIA.MAC    Add DIAL command
  1070. ; 37 19-Oct-85    17:00:01  K11ST0.MAC    Added SET MODEM command
  1071. ; 36 13-Oct-85    15:27:45  K11SEN.MAC    Fix up control C aborts. Add new state
  1072. ;              K11REC.MAC    called STA.CCABORT for processng ctl C
  1073. ;                    aborts.
  1074. ; 36 10-Oct-85    14:51:33  K11PAK.MAC    Fix call from M$RETRY to ERROR()
  1075. ; 36 24-Sep-85    12:29:53  K11SER.MAC    Added REMOTE LOGIN and support for it
  1076. ;              K11COM.MAC    in the server
  1077. ;              K11CMD.MAC
  1078. ;              K11CMD.MAC    Disabled for SEND if wildcarded file
  1079. ;              K11SEN.MAC    name and GET filename asfilename
  1080. ; 36 17-Sep-85    10:55:06  K11REC.MAC    Allow SEND file asfile
  1081. ; 36 17-Sep-85    10:54:11  K11ST0.MAC    Added SET RT-11 CREATE_SIZE value to
  1082. ;                    for allocation for small disks on file
  1083. ;                    creates, sometimes needed in Kermit-11
  1084. ;                    to non Kermit-11 transfers
  1085. ; 36 13-Sep-85    12:30:12  K11ST1.MAC    Added SET REC START-OF-PACKET, SET
  1086. ;              K11PAK.MAC    SEND START, SET START-OF-PACKET which
  1087. ;                    forces both SOPs to same value
  1088. ; 36 10-Sep-85    13:38:31  K11ST0.MAC    Added SET RT-11 command, currently as
  1089. ;              K11RTD.MAC    SET RT-11 [NO]VOLUME_VERIFY, to skip
  1090. ;              K11DAT.MAC    checking systype at offset 760 in the
  1091. ;              K11RT4.MAC    directory header for disks. Also added
  1092. ;              K11COM.MAC    SET RT-11 [NO]FLOW_CONTROL same as the
  1093. ;                    old SET RTFLOW [ON][OFF]
  1094. ; 35 01-Sep-85    14:45:33  K11SEN.MAC    Added messages for retry aborts
  1095. ; 35 01-Sep-85    14:30:22  K11PAK.MAC    Modified insertion of prompt into
  1096. ;                    error messages
  1097. ; 35 01-Aug-85    14:15:10  K11CVT.MAC    Fix file names with fubar characters
  1098. ;              K11REC.MAC    to be legit (insert "X" into name),
  1099. ;                    as in GET abcde_f.dat --> abcdexf.dat
  1100. ; 34 29-Jul-85    14:22:28        Mod REM CWD to accept password if
  1101. ;                    present, no prompts though
  1102. ; 32 02-Jul-85    22:29:34  K11HLP.RNO    Add Doc for modems
  1103. ; 32 02-Jul-85    13:44:50  K11CMD.MAC    Added support for CWD and REM CWD
  1104. ;              K11SER.MAC    Support for GN$CONNECT (rem cwd)
  1105. ;              K11COM.MAC    Added CWD and REM CWD to command lists
  1106. ; 32 02-Jul-85    13:14:22  K11INI.MAC    Set pro/350 to 7-bit to avoid multinat
  1107. ;                    char sets, use SET CONS 8 to override
  1108. ; 32 02-Jul-85    13:02:04  K11PAK.MAC    Insert current prompt into error text
  1109. ;                    sent to other system
  1110. ;
  1111. ; New tape to Columbia      V2.31
  1112. ;
  1113. ; 31 20-Jun-85    18:42:39  K11SEN.MAC    Update SDATA to not abort on "unknown"
  1114. ;                    packet type
  1115. ; 31 20-Jun-85    18:42:27  K11SHO.MAC    Updated SHOW command
  1116. ; 31 17-Jun-85    15:29:36  K11RT4.MAC    Add .HRESET if device was X?: at exit
  1117. ; 30 01-Jun-85    11:03:30  K11INI.MAC    Mods for SET UPDATE, also set do a SET
  1118. ;                    TERM VT100 for PRO/3xx systems
  1119. ; 30 01-Jun-85    11:02:28  K11ST1.MAC    Added LOGFILE filnam.typ so we can
  1120. ;                    be more compatible (calls SET LOGFILE)
  1121. ; 30 01-Jun-85    11:01:45  K11DAT.MAC    Added BLIP:: for packet logging ala
  1122. ;                    SET UPDATE n.  SET UPD 0 will disable
  1123. ;                    all packet counts to the terminal.
  1124. ; 29 18-May-85    14:17:39  K11SER.MAC    Update packet types to symbolic names
  1125. ; 29 17-May-85    05:08:47  K11ST1.MAC    Add SET FILE [NO]SUPERSEDE to protect
  1126. ;              K11REC.MAC    files that already exists
  1127. ; 29 14-MAY-85    10:26:33  K11INI.MAC    Fix bug for setting 8-bit prefixing
  1128. ;                    Quite noticeable on PRO/RT version
  1129. ; 28 09-May-85    07:40:41  K11RTD.MAC    Add support for server REM DIR command
  1130. ;                    for RT and TSX+
  1131. ; 28 07-May-85    17:40:06  K11TSX.MAC    Final mods by Ned Rhodes for TSX+
  1132. ;              K11PRT.MAC
  1133. ; 28 01-May-85    16:00:01  K11ST1.MAC    Ignore TYPE in SET FILE [TYPE] arg
  1134. ; 28 22-Apr-85    10:34:56  K11RT4.MAC    Kludge if RT system does not have a
  1135. ;                    clock
  1136. ; 28 20-Apr-85    09:22:01  K11ST1.MAC    Added SET BINARY-TYPE .typ for
  1137. ;              K11CVT.MAC    overriding the built-in binary file
  1138. ;                    type list
  1139. ; 27 19-Mar-85    15:59:06  K11SEN.MAC    Fix losing attribute packets in case
  1140. ;                    we timed out or were NAKed
  1141. ; 26 28-Feb-85    14:00:30  K11RT4.MAC    Fixes for TSX+
  1142. ;              K11DSP.MAC
  1143. ;              K11TSX.MAC
  1144. ; 25 29-Jan-85    09:40:22  K11SEN.MAC    Fix things up for ^E,^X and ^Z inter-
  1145. ;              K11REC.MAC    upts on getting and sending files
  1146. ; 25 28-Jan-85    15:30:01  K11SER.MAC    Get rid of embedded CR/LFs in short
  1147. ;                    server reply string
  1148. ; 25 17-Jan-85    10:56:03  K11HLP.HLP    More explanation about BINARY files as
  1149. ;                    there seems to be a lot of confusion
  1150. ;                    about binary file transfer
  1151. ; 25 17-Jan-85    10:52:38  K11DSP  BDN    Clear PROFLG in ASSDEV if SET LINE is
  1152. ;                    done and device is not X?: for RT-11
  1153. ; 25 17-Jan-85    10:51:58  K11SEN  BDN    Added abort (^E,^X & ^Z) for SENDing
  1154. ; 24 09-Nov-84    15:35:17  K11TSX  BDN    Creation from NED RHODE'S mods for TSX
  1155. ; 24 09-Nov-84    15:35:05  K11DSP  BDN    Creation
  1156. ; 24 09-Nov-84    15:32:36  K11RT?  BDN    Virtual overlays for XM, K11DSP to
  1157. ;                    call the correct terminal I/O overlay
  1158. ;                    based on the exec and line type (ie,
  1159. ;                    TSX+ and XC/XL).  We can now AVOID
  1160. ;                    generating a different save image for
  1161. ;                    each config.
  1162. ; 23 25-Oct-84    16:47:20  K11XXX  BDN    This is getting to be a drag having to
  1163. ;                    generate six different versions of the
  1164. ;                    Kermit-11 each time I change something
  1165. ; 23 25-Oct-84    16:46:01  K11CON  BDN    Removed break sending code to specific
  1166. ;                    executive support modules
  1167. ; 23 25-Oct-84    16:45:36  K11PRT  BDN    Real break sending for the PRO/RT-11
  1168. ; 23 25-Oct-84    16:45:11  K11ST1  BDN    SET REPEAT ON/OFF
  1169. ; 23 25-Oct-84    16:44:52  K11PAK  BDN    Repeat count prefixing added
  1170. ; 23 21-Oct-84    16:37:57  K11???  BDN    Got sick of working on PRO/RT-11
  1171. ; 23 21-Oct-84    16:38:36  K11CMD  BDN    Moved printing of banner
  1172. ; 23 21-Oct-84    16:37:16  K11REC  BDN    Added error logging and got all state
  1173. ;                    switches parameterized
  1174. ; 23 21-Oct-84    16:36:51  K11CVT  BDN    Added new file types for binary mode
  1175. ; 23 16-Oct-84    15:32:31  K11CM1  BDN    Removed number of commands from K11CMD
  1176. ;                    to save space for PRO/RT-11 version
  1177. ; 23 15-Oct-84    13:52:09  K11RT?  BDN    Fixed all the .FETCH stuff
  1178. ; 23 15-Oct-84    13:39:22  K11ST1  BDN    Creation-split K11STT in 1/2 for RT-11
  1179. ; 23 15-Oct-84    13:39:22  K11ST0  BDN    Creation-split K11STT in 1/2 for RT-11
  1180. ; 23 15-Oct-84    13:39:05  K11CMD  BDN    Moved C$SET back in
  1181. ; 23 14-Oct-84    16:01:22  K11PRT  BDN    New  module for XC port communications
  1182. ;                    with PRO/RT-11 version 5.1
  1183. ; 23 14-Oct-84    15:20:13  K11SEN  BDN    Creation, split receive and send state
  1184. ;              K11REC    out from K11PAK to save space for  the
  1185. ;                    PRO/RT-11 version of Kermit
  1186. ; 22 14-Aug-84    10:24:23  K11RTU  BDN    Added code for ASCTIM for RT-11 Kermit
  1187. ; 22 14-Aug-84    10:21:51  K11ATR  BDN    Add attribute packet type 41 (8) so we
  1188. ;              K11RT4    send  the receiving Kermit the size of
  1189. ;                    the file.  Need for RT-11 Kermit since
  1190. ;                    RT-11 has to preallocate files.  Could
  1191. ;                    not create file larger than 243 blocks
  1192. ;                    on the PDT150 until this was put in.
  1193. ; 22 10-Aug-84    13:20:31  K11RT4  BDN    Moved ERROR text and error lookup code
  1194. ;              K11RTU    to K11RTE, also moved RT-11 COPY to
  1195. ;                    K11RTU overlay
  1196. ; 22 08-Aug-84    15:50:33  K11RTD  BDN    Change check for RT-11 volume valid
  1197. ;                    from home block offset 730 to 760
  1198. ; 22 03-Aug-84    10:28:54  K11PAK  BDN    Finish code for talking to half duplex
  1199. ;              K11COM    IBM 370 compatible systems.  Added SET
  1200. ;              K11STT    IBM ON/OFF, SET LOCAL ON/OFF.  SET LOC
  1201. ;                    is equivalent to SET DUPLEX FULL/HALF.
  1202. ; 21 30-Jul-84    16:07:44  K11CVT  BDN    Add .EXE and .RTS to binary file list
  1203. ; 21 30-Jul-84    11:17:24  K11PAK  BDN    More work for IBM mode
  1204. ; 21 24-Jul-84    11:35:15  K11RTD  BDN    Extended directory lookup for RT-11 to
  1205. ;                    allow "%" in the file name or type
  1206. ; 21 23-Jul-84    12:47:03  K11DEF  BDN    New module, an .include file to
  1207. ;                    define all the packet types
  1208. ; 21 23-Jul-84    12:32:11  K11SER  BDN    Stuff the default dev into the server
  1209. ;                    extended reply temp file name (needed
  1210. ;                    for RT-11 Kermit)
  1211. ; 21 23-Jul-84    12:31:47  K11RT4  BDN    ensure that we are NOT running under
  1212. ;                    the SJ monitor
  1213. ; 21 19-Jul-84    15:35:00  K11PAK  BDN    Added 8-bit prefixing
  1214. ; 20 19-Jul-84    10:26:57  K11RTU  BDN    Add support for REN, DEL for RT-11 V5
  1215. ; 18 06-Jul-84    15:20:34        Update sent to Frank Da Cruz for fubar
  1216. ;                    RT-11 code with .FETCH and .DSTAT
  1217. ; 18 03-Jul-84    10:16:03  K11INI  BDN    Moved INIT + KERINI from K11CMD.MAC to
  1218. ;                    module (K11INI). Also moved SPAR,RPAR,
  1219. ;                    DSKDMP,FILLOG from K11PAK to here to
  1220. ;                    save space in the root for RT-11
  1221. ; 18 06-Jul-84    12:45:27  K11RT4  BDN    Finally found out that I had the
  1222. ;                    arguments for .DSTAT swapped, which
  1223. ;                    explain why the RT-11 file opens and
  1224. ;                    creates were being so flakey
  1225. ;
  1226. ; 17 22-Jun-84    12:33:15  !!! finally ship new version out to Columbia !!!
  1227. ;
  1228. ; 17 21-Jun-84    19:33:48  K11RT4  BDN    Final RT-11 code modifications
  1229. ; 17 21-Jun-84    16:22:12  K11CMD  BDN    Fix open for takefile (no type arg)
  1230. ; 17 19-Jun-84    18:08:56  misc      BDN    Add wildcard support for RT-11 version
  1231. ; 17 11-Jun-84    11:21:51  K11CVT  BDN    Add code to decide if a file is binary
  1232. ;                    based on the file type (ala .SAV)
  1233. ; 17 10-Jun-84    16:44:50  K11RT4  BDN    Timing bug in file open routine (?)
  1234. ;                    Fix overlay error (K11ATR with K11SUB)
  1235. ; 16 28-May-84    15:55:08  K11PAK  BDN    ensure that BUFEMP does not try to
  1236. ;                    CTL chars that could not have been set
  1237. ;                    Defensive response to CPM Kermit 3.9
  1238. ;                    which ALWAYS sends &s over with the
  1239. ;                    CTL quote, "#".  Note: 20KERMIT does
  1240. ;                    this also. Fix should be in CPM Kermit
  1241. ;                    but it's simple to fix at this end.
  1242. ; 16 28-May-84    09:10:19  K11CMD  BDN    Fix call to TTYRST for Kermit-11/RT
  1243. ; 16 25-May-84    15:39:26  K11STT  BDN    Moved command definitions for the SET
  1244. ;                    command to K11COM.MAC to save space
  1245. ; 16 25-May-84    12:18:08  K11DEB  BDN    Added DISPLAY globalsym command
  1246. ;                    Prints out values in module
  1247. ;                    K11DAT.MAC for debugging purposes
  1248. ; 16 21-May-84    17:01:56  K11PAK  BDN    Don't retry until MAXTRY the SINFO
  1249. ;                    packet since older Kermits will not be
  1250. ;                    able to understand "I" packets.  Old
  1251. ;                    Kermits ALWAYS send NAKS for SINFO.
  1252. ; 16 18-May-84    10:29:02  K11SER  BDN    The code for response to an "R" packet
  1253. ;                    was sending the RMS error text after
  1254. ;                    routine GETNXT already sent err packet
  1255. ; 15 08-May-84    11:15:35  K11PAK  BDN    ensure R0 cleared in BUFEMP in case
  1256. ;                    the data packet was null
  1257. ; 15 06-May-84    11:33:56  K11PAK  BDN    Moved the ACK for the EOF packet to be
  1258. ;                    send AFTER output file is closed.  An
  1259. ;                    occasional RSX problem in the BREAK
  1260. ;                    packet lost due to timing required
  1261. ;                    this mod, though if the line is set up
  1262. ;                    properly this would not be a problem.
  1263. ; 15 01-May-84    11:41:49  K11ATR  BDN    Added support for attribute packets
  1264. ;                    Auto determination of binary mode
  1265. ;                    Support for getting the IFAB data will
  1266. ;                    only work between like Kermits
  1267. ;                    Added SET ATTRIB OFF command to dis-
  1268. ;                    able any attribute sending even if the
  1269. ;                    other Kermit's CAPAS field indicates
  1270. ;                    support of it (ie, handle incompatible
  1271. ;                    protocol versions or bugs)
  1272. ; 14 18-Apr-84    10:40:01  K11PAK  BDN    Mods for deferred file creates to
  1273. ;                    handle attribute packets
  1274. ; 13 04-Apr-84    18:39:38  K11SER  BDN    Calls to SINFO if we expect extended
  1275. ;                    reply from a remote server, required
  1276. ;                    if block checks are type 2 or 3
  1277. ; 13 04-Apr-84    18:37:58  K11CON  BDN    Have X cmd cancel link being XOFF'd
  1278. ;                    by the remote as well as send the
  1279. ;                    remote an XON
  1280. ; 13 04-Apr-84    10:13:32  K11PAK  BDN    Debug logging mods. Added TTXON calls
  1281. ;                    to fix XOFF'd line.  Added SINFO
  1282. ;                    to handle init for expected server
  1283. ;                    reply.
  1284. ; 13 02-Apr-84    11:14:36  K11CON  BDN    Added support for half duplex link
  1285. ;                    added global "duplex" to K11DAT.MAC
  1286. ; 13 30-Mar-84    10:40:35  K11MAC  BDN    Defined a macro for XOR which does not
  1287. ;                    require "XOR reg,dst" format.  It uses
  1288. ;                    4 instructions and will    be needed
  1289. ;                    anyway for the RT-11 version.
  1290. ; 13 30-Mar-84    10:34:02  K11PAK  BDN    Fix extended server replies to work
  1291. ;                    when the checksum is type 2 (12bit
  1292. ;                    arith sum) or type 3 (16 bit CRC)
  1293. ; 13 30-Mar-84    10:31:46  K11PAK  BDN    Added software parity generation. Will
  1294. ;                    be mainly used when connecting out to
  1295. ;                    a remote system that requires parity
  1296. ; 12 20-Mar-84    19:55:15  K11CVT  BDN    New module.  Do executive independent
  1297. ;                    parsing of file specs to return only
  1298. ;                    filename.type.  This will help users
  1299. ;                    who need DAP support.  It's also
  1300. ;                    overlaid into the ERRDVR region.
  1301. ; 12 08-Mar-84    12:33:59  K11CMD  BDN    Added default of ".CMD" for TAKE
  1302. ; 12 08-Mar-84    11:56:14  K11CMD  BDN    Move "remlst" and "cmdlst" into K11COM
  1303. ;                    which is overlaid in the ERROR seg.
  1304. ;                    Added calls to LOACMD + LOAREM to get
  1305. ;                    the overlay with K11COM resident + to
  1306. ;                    return a pointer to the command list.
  1307. ;                    It saves about 3000 (8) bytes in task
  1308. ;                    size.
  1309. ; 12 07-Mar-84    12:28:16  K11TRA  BDN    Added routine to "brute force" a file
  1310. ;                    to a remote line. Needed it to get the
  1311. ;                    new (and not yet done) RT-11 version
  1312. ;                    on RT-11 system being used for test
  1313. ;                    which is, would you believe, a real
  1314. ;                    PDT150
  1315. ; 11 05-Mar-84    10:22:48        Sent version 2.11 to Columbia and DEC
  1316. ; 11 02-Mar-84    11:27:22  K11CMD  BDN    Modified init stuff to look for init
  1317. ;                    file KERMIT.INI in SY: then
  1318. ;                    to try    LB:[1,2], SY:[1,2] and KERMIT:
  1319. ; 10 17-Feb-84    15:08:05  K11CMD  BDN    Did some trial stuff on talking to IBM
  1320. ;                    mainframes, but the CMS Kermit makes
  1321. ;                    things difficult as it can't time out.
  1322. ;                    Added Set Handshake and show for it
  1323. ;                    Not yet done with handshake garbage
  1324. ; 10 17-Feb-84    15:07:14  K11PAK  BDN    Mods for doing ^X and ^Z things
  1325. ; 07 08-Feb-84    15:19:58  K11SER  BDN    Force mode to be remote if to run as a
  1326. ;                    server. Not really needed, but what
  1327. ;                    about doing a SET LINE + then SERVER ?
  1328. ; 06 06-Feb-84    10:34:04  K11PAK  BDN    Added SETTMO to decide receive time
  1329. ;                    out to use based on server timeout,
  1330. ;                    the other Kermit's desired timeout +
  1331. ;                    any timeout set via SET TIMEOUT value
  1332. ; 06 04-Feb-84    11:55:22  K11CMD  BDN    Added local and remote copy, rename
  1333. ; 06 04-Feb-84    11:54:59  K11SER  BDN    Added remote copy and rename support
  1334. ; 06 01-Feb-84    13:07:26  K11CMD  BDN    Local and remote WHO commands
  1335. ; 06 01-Feb-84    13:07:10  K11SER  BDN    Add support for remote WHO command
  1336. ; 06 01-Feb-84    10:37:49  K11SER  BDN    Support remote type in server
  1337. ; 06 01-Feb-84    10:36:27  K11CMD  BDN    Add REMOTE TYPE and added DISK to be
  1338. ;                    same as SPACE
  1339. ; 06 01-Feb-84    10:21:19  K11CMD  BDN    Moved type and rename cmds to K11SHO
  1340. ;                    to space space in the root
  1341. ; 05 31-Jan-84    08:41:03  K11CMD  BDN    Moved SHOW command to K11SHO.MAC, also
  1342. ;                    moved $NAME + COMMAND macros to K11CDF
  1343. ; 05 30-Jan-84    16:38:01  K11SER  BDN    Consolidated remote server command
  1344. ;                    packet sending and creation
  1345. ; 05 30-Jan-84    12:01:41  K11CMD  BDN    Add ERASE, DELETE
  1346. ; 04 27-Jan-84    21:33:21  K11CMD  BDN    Added REM ERASE, also add synonym
  1347. ;                    for SET LOGFILE as LOG_FILE
  1348. ; 04 27-Jan-84    20:02:34  K11HLP  BDN    Fix keyword match to match @ pos 1
  1349. ; 04 27-Jan-84    18:55:44  K11PAK  BDN    If datafield.len < 0 reset checksum
  1350. ;                    type to type "1" in RPACK$
  1351. ; 04 27-Jan-84    18:45:08  K11SER  BDN    Redo support for remote commands
  1352. ; 04 27-Jan-84    18:30:07  K11PAK  BDN    Redo support - extended server replies
  1353. ;
  1354. ; Version 2
  1355. ;
  1356. ; I decided that I would like to have the normal TED timestamp on the edit.
  1357. ;
  1358. ;    03 25-Jan-84  K11HLP    BDN    Finished subtopics for HELP command
  1359. ;    02 18-Jan-84  K11CMD    BDN    Added REMOTE, SPACE and REMOTE SPACE
  1360. ;    02 17-Jan-84  K11CMD    BDN    Added commands NOTE and COMMENT for
  1361. ;                    echoing text from indirect files
  1362. ;    02 17-Jan-84  K11CMD    BDN    Allow open for KERMIT.INI
  1363. ;    02 17-Jan-84  K11PAK    BDN    Allow 12 bit and CRC-CCITT Checksums
  1364. ;                    User should always set the checksum
  1365. ;                    type for both KERMITS
  1366. ;    02 16-Jan-84  K11CMD    BDN    Allow underscore and digits in command
  1367. ;                    names
  1368. ;    02 16-Jan-84  K11PAK    BDN    Redo checksum processing to
  1369. ;                    accommodate 12 bit and CRC types
  1370. ;    02 16-Jan-84  K11CMD    BDN    Add Set Block-Check-Type + SHOW BLOCK
  1371. ;    02 13-Jan-84  K11CMD    BDN    Moved C$HELP to module K11HLP
  1372. ;    02 13-Jan-84  K11CMD    BDN    Added showing speed for SHOW LINE
  1373. ;    02 13-Jan-84  K11CMD    BDN    Added TAKE and @ commands
  1374. ;    02 12-Jan-84  K11PAK    BDN    Fix checking for X, Z in ACK for Sdata
  1375. ;    02 11-Jan-84  K11CMD    BDN    Added RENAME command
  1376. ;    01 08-Jan-84  K11PAK    BDN    Fix .asciz for ERROR: SPACK
  1377. ;    01 08-Jan-84  K11CMD    BDN    Added call to XINIT for initialization
  1378. ;                    based on the operating system
  1379. ;    01 08-Jan-84  K11PAK    BDN    Change timeout to MYTIME from MAXTIME
  1380. ;                    if remote's SINIT packet had a value
  1381. ;                    of zero for the timeout (CMS Kermit?)
  1382. ;    01 08-Jan-84  K11CMD    BDN    fix SET PARITY
  1383.  
  1384.  
  1385.     .include "IN:KRTMAC.MAC"
  1386.     .iif ndf  KRTINC  .error    <; .include for IN:KRTMAC.MAC failed>
  1387.     .include "IN:KRTDEF.MAC"
  1388.     .iif ndf  MSG$DA  .error    <; .include for IN:KRTDEF.MAC failed>
  1389.  
  1390.     .mcall    .CMKT    ,.PURGE    ,.RCTRLO,.TWAIT    ; /62/
  1391.  
  1392.  
  1393.     .sbttl    Local data        ; /63/
  1394.  
  1395.     .psect    $pdata
  1396. fifteen:.word    0 ,15            ; /62/ 15 ticks for .twait
  1397. ;nosub:    .byte    0 ,152            ; /BBS/ disable subprocess access
  1398. ;    .word    'H
  1399. ;    .word    0
  1400. caratc:    .asciz    "^C"<cr><lf>        ; /62/ something to echo
  1401. cmd.01:    .ascii    "Kermit-11 for "    ; for SHOW VERSION
  1402.     .if df    NONEIS            ; include which
  1403.     .ascii    "NON"            ; instruction set
  1404.     .endc                ; Kermit is using
  1405.     .asciz    "EIS RT-11"
  1406. cmd.02:    .asciz    "XB,XM,ZB,ZM"
  1407. cmd.03:    .asciz    "FB,SB,SJ"
  1408. cmd.04:    .asciz    "/TSX-Plus  "
  1409. cmd.05:    .asciz    " failed at line #"    ; error message
  1410. cmd.06:    .asciz    ':'<cr><lf>'  "'    ; line number tag & top of next line
  1411. cmd.07:    .asciz    '"'<cr><lf>'  '        ; end of line & top of following line
  1412. cmd.08:    .asciz    " closed"<cr><lf>    ; take file is closed
  1413. cmdch:    .asciz    "_ABCDEFGHIJKLMNOPQRSTUVWXYZ-@0123456789." ; /63/ legal chars
  1414. comment:.byte    scolon ,'! ,0        ; /63/ comment delimiters list
  1415.     .even
  1416.  
  1417.  
  1418.     .psect    $code
  1419.     .sbttl    Init the program
  1420.  
  1421. kermit::mov    #stack    ,sp        ; initialize a large stack
  1422. ;    mov    #nosub    ,r0        ; /BBS/ do this for this bbs to
  1423. ;    emt    375            ; /BBS/ prevent leaving until done
  1424.     call    sho$version        ; print version and edit number
  1425.     call    kerini            ; init program, look for KRT.INI
  1426.     tst    sy.ini            ; /BBS/ init file going to run?
  1427.     bne    10$            ; /62/ ya, wait until after it's done
  1428.     call    sho$line        ; /BBS/ no, display default now
  1429. 10$:    call    binini            ; load binary-types list into buffer
  1430.     br    NEW10$            ; /BBS/ skip over ^C's newline
  1431.  
  1432.  
  1433.     .sbttl    CCAST returns here    ; /62/ moved all this to mainline
  1434.  
  1435. cmdloop::.cmkt    #rtwork    ,#40        ; in case not coming from ccast
  1436.     mov    #stack    ,sp        ; reset the stack
  1437.     .rctrlo                ; ensure TT output is enabled
  1438.     tst    sl.on            ; is SL on?
  1439.     beq    10$            ; no, monitor will echo "^C"
  1440.     wrtall    #caratc            ; ya, print "^C"
  1441. 10$:    clr    xprint            ; kill the print the world facility
  1442.     call    clrcns            ; hose any pending terminal input
  1443.  
  1444.     tst    linksts            ; was link running?
  1445.     beq    30$            ; nope..
  1446.     tst    inprogress        ; packet exchange in progress?
  1447.     beq    20$            ; nope..
  1448.     spack    #msg$error,paknum    ; yes, try to break out of it all
  1449.     .twait    #rtwork    ,#fifteen    ; wait 15 ticks for output completion
  1450.     call    incsta            ; /63/ finish up transfer stats
  1451.     movb    #defchk    ,chktyp        ; reset the checksum type
  1452.     mov    #1    ,chksiz        ; and the size of the checksum
  1453. 20$:    call    clostt            ; close it up
  1454. 30$:    clr    inserv            ; not a server now
  1455.     clr    sertim            ; not waiting for a server command
  1456.     clr    xmode            ; just in case..
  1457.  
  1458.     clr    bufp+0            ; hose TT channel, pointer := 0
  1459.     mov    buflst+0,r4        ; get the buffer address
  1460.     mov    bufsiz+0,r0        ; and size
  1461. 40$:    clrb    (r4)+            ; for i := 1 to bufsiz
  1462.     sob    r0    ,40$        ;   do buffer[i] := chr(0)
  1463.     calls    close    ,<#lun.in>    ; hose input channel
  1464.     clr    inopn            ; reset its flag
  1465.     calls    close    ,<#lun.ou>    ; hose output channel
  1466.     .purge    #lun.ou            ; /62/ in case close chokes..
  1467.     clr    outopn            ; reset its flag
  1468. ; /BBS/    note the log file (lun.log) remains open..
  1469.     calls    close    ,<#lun.ta>    ; hose command file channel
  1470.     clr    cmdlun            ; reset its flag
  1471.     clr    tk.err            ; done with this now
  1472.     clr    sy.ini            ; ditto
  1473.     mov    qu.ini    ,infomsg    ; restore SET TT [NO]QUIET
  1474.     .purge    #lun.sr            ; dump dir search channel
  1475.     clr    dirflg            ; /62/ reset embedded blanks flag
  1476.     .br    NEW10$            ; /63/ fall through to NEW10$
  1477.  
  1478.  
  1479.     .sbttl    Kermit main_program_loop
  1480.  
  1481. NEW10$:    clr    cccnt            ; no ^Cs typed yet
  1482.     call    setcc            ; /BBS/ enable ^C test's mark timer
  1483.     mov    argbuf    ,argpnt        ; ensure arg pointer is reset
  1484.     call    fixchk            ; restore the SET block check type
  1485.     textsrc                ; /62/ ensure reset to file I/O
  1486.     clr    inprogress        ; /63/ packet xfr no longer active
  1487.     clr    rem.ack            ; /63/ no ACK rec'd for REMOTE cmd
  1488.     clr    xredial            ; /BBS/ hose redial options word
  1489.     clr    status            ; /BBS/ reset take file error status
  1490.     clr    summary            ; /BBS/ reset summary only flag
  1491.     clr    logini            ; /BBS/ reset packet log display flag
  1492.     clr    at$len            ; /BBS/ used to pass file size locally
  1493.     clr    pf2$ok            ; /BBS/ PF2 can overlay help from here
  1494.     call    getcmd            ; read and parse the command
  1495.     mov    sp    ,pf2$ok        ; /BBS/ so PF2 doesn't eat overlays
  1496.     tst    r0            ; get a valid command?
  1497.     blt    40$            ; no, goto command error handler
  1498.     jsr    pc    ,@cmdadr    ; ya, dispatch to the command
  1499.  
  1500. 10$:    tst    jobtype            ; /62/ command file or detatched job?
  1501.     beq    30$            ; /62/ no
  1502.     bmi    20$            ; /62/ detached, always bail on error
  1503.     tst    exieof            ; /62/ cmd file, does user want out?
  1504.     beq    30$            ; /62/ no, keep Kermit alive..
  1505. 20$:    tst    status            ; /45/ error status ok so far?
  1506.     beq    NEW10$            ; /BBS/ ya
  1507.     tst    cmdlun            ; /62/ no, reading from indirect file?
  1508.     bne    NEW10$            ; ya, do one more loop to dump err msg
  1509.     bisb    #fatal$    ,@#userrb    ; /62/ no, inform rest of the world
  1510.     jmp    c$exit            ; /BBS/ an error occured and exit..
  1511.  
  1512. 30$:    cmp    r0    ,#cmd$ab    ; /62/ ^C typed?
  1513.     bne    NEW10$            ; /62/ no
  1514.     jmp    cmdloop            ; /62/ ya
  1515.  
  1516.  
  1517.     .sbttl    Parse errors or EOF come here
  1518.  
  1519. 40$:    save    <r0>            ; /BBS/ save error from above
  1520.     cmp    r0    ,#cmd$bad    ; /BBS/ come here on ^C/^Z abort?
  1521.     bhi    60$            ; /62/ ya, don't run a take file!
  1522.     mov    cmdbuf    ,r4        ; /BBS/ pointer to command buffer
  1523.     cmpb    #'@    ,(r4)+        ; /BBS/ is it RT-11 style "@COMMAND" ?
  1524.     bne    60$            ; /BBS/ nope
  1525.     tst    (sp)+            ; /BBS/ ya, pop saved error off stack
  1526.     mov    argbuf    ,r0        ; /BBS/ pointer to argument buffer
  1527. 50$:    movb    (r4)+    ,(r0)+        ; /BBS/ copy it in like a command arg
  1528.     bne    50$            ; /BBS/ until the null
  1529.     call    c$take            ; /BBS/ attempt to take it
  1530.     br    10$            ; /BBS/ done..
  1531.  
  1532. ; /BBS/ allow changing default device ala CP/M by entering device name
  1533. ;    requires enabling access control from which names are tested
  1534.  
  1535. 60$: ;    scan    #':    ,cmdbuf        ; /BBS/ find first colon in string
  1536. ;    mov    r0    ,r1        ; /BBS/ save its offset
  1537. ;    strlen    cmdbuf            ; /BBS/ get string length
  1538. ;    tst    r0            ; /BBS/ anybody there?
  1539. ;    beq    90$            ; /BBS/ nope..
  1540. ;    cmp    r0    ,#4        ; /BBS/ more than 4 bytes?
  1541. ;    bgt    90$            ; /BBS/ ya, bail out
  1542. ;    tst    r1            ; /BBS/ is there a colon in cmdbuf?
  1543. ;    beq    70$            ; /BBS/ no, go pop one in..
  1544. ;    cmp    r0    ,r1        ; /BBS/ is first colon also last one?
  1545. ;    bne    90$            ; /BBS/ nope, :: is not allowed..
  1546.  
  1547. ;70$:    add    cmdbuf    ,r0        ; /BBS/ point to end
  1548. ;    cmpb    #':    ,-(r0)        ; /BBS/ is last byte a colon?
  1549. ;    beq    80$            ; /BBS/ ya
  1550. ;    tstb    (r0)+            ; /BBS/ no, back to end of string
  1551. ;    movb    #':    ,(r0)+        ; /BBS/ tag it with a colon
  1552. ;    clrb    @r0            ; /BBS/ reterminate
  1553.  
  1554. ;80$:    calls    fparse    ,<cmdbuf,#errtxt> ; /BBS/ this lets "LD" become "LD0"
  1555. ;    tst    r0            ; /BBS ..is it an authorized dev?
  1556. ;    bne    90$            ; /BBS/ nope..
  1557. ;    tst    (sp)+            ; /BBS/ dump now meaningless error reg
  1558. ;    copyz    #errtxt    ,#defdir,#5    ; /BBS/ modify default dir
  1559. ;    call    sho$yy            ; /BBS/ and display the change
  1560. ;    br    NEW10$            ; /BBS/ back for more..
  1561.  
  1562. 90$:    unsave    <r0>            ; /BBS/ pop err reg from getcmd, etc..
  1563.     cmp    r0    ,#cmd$ex    ; ^Z typed?
  1564.     bne    100$            ; no
  1565.     jmp    c$exit            ; yes, exit normally
  1566.  
  1567. 100$:    cmp    r0    ,#cmd$bad    ; invalid command?
  1568.     bne    110$            ; no
  1569.     direrr    #er$unr            ; /BBS/ ya, print out an error message
  1570.     br    140$            ; /62/ check exit status
  1571.  
  1572. 110$:    cmp    r0    ,#cmd$ab    ; /BBS/ ^C abort?
  1573.     bne    120$            ; /39/ no
  1574.     jmp    cmdloop            ; /BBS/ ya, return to ^C entry point
  1575.  
  1576. 120$:    cmp    r0    ,#cmd$un    ; /39/ not unique?
  1577.     bne    130$            ; /62/ no
  1578.     direrr    #er$amb            ; /BBS/ yes, say so
  1579.     br    140$            ; /62/ check exit status
  1580.  
  1581. 130$:    cmp    r0    ,#cmd$nx    ; /62/ ^Z but don't exit to monitor?
  1582.     beq    NEW10$            ; /62/ ya
  1583.  
  1584. 140$:    tst    jobtype            ; /62/ command file or detatched job?
  1585.     beq    NEW10$            ; /62/ no
  1586.     bmi    150$            ; /62/ detached, always bail on error
  1587.     tst    exieof            ; /62/ cmd file, does user want out?
  1588.     beq    NEW10$            ; /62/ no, keep Kermit alive..
  1589. 150$:    bisb    #fatal$    ,@#userrb    ; /62/ no, inform rest of the world
  1590.     jmp    c$exit            ; /62/ an error occured and exit..
  1591.  
  1592.  
  1593.     .sbttl    SHOW ALL        ; /63/ here to call different overlays
  1594.  
  1595. sho$all::.newline            ; /63/ format display for readability
  1596.     call    sho$a0            ; /63/ this is all to place the modem
  1597.     tst    modtype            ; /63/ (has a modem type been set?)
  1598.     beq    10$            ; /63/ in a good place for SHOW ALL..
  1599.     call    shodia            ; /63/ (ya)
  1600.     .newline            ; /63/ format display
  1601. 10$:    call    sho$a1            ; /63/ do remaining parameters
  1602.     return
  1603.  
  1604.  
  1605.     .sbttl    Kludge to put new code in caller's overlay
  1606.  
  1607. xxsdia::jmp    shodia            ; /62/ SHOW DIAL
  1608.  
  1609.  
  1610.     .sbttl    The FINISH command
  1611.  
  1612. c$fin::    call    ckremote
  1613.     bcs    10$            ; we are remote, abort this
  1614.     call    remfin            ; tell remote server to exit
  1615.     tst    rem.ack            ; /63/ did it work?
  1616.     beq    10$            ; /63/ nope..
  1617.     jmp    c$conn            ; /BBS/ ya, go CONNECT
  1618. 10$:    clr    r0            ; /62/ error already handled
  1619.     return
  1620.  
  1621.  
  1622.     .sbttl    The REMOTE command
  1623.  
  1624. c$rem::    call    ckremote        ; running as remote?
  1625.     bcs    40$            ; nope..
  1626.     call    loarem            ; get the remote command overlay in
  1627.     calls    getcm0    ,<argbuf,r0>    ; and try it please
  1628.     mov    r0    ,r3        ; /BBS/ save the index (can't use r1)
  1629.     bmi    10$            ; /BBS/ didn't find the remote command
  1630.     tst    wasnul            ; /BBS/ were commands listed via "?"
  1631.     bne    40$            ; /BBS/ ya
  1632.     call    loarem            ; get the overlay resident
  1633.     calls    getcm1    ,<argbuf,r0,r3>    ; get any required args for command
  1634.     tst    r0            ; now could we get command arguments?
  1635.     bmi    10$            ; /BBS/ no
  1636.     call    lower            ; /62/ SET FILE NAMING LOWER-CASE?
  1637.     jsr    pc    ,@r1        ; dispatch on it now please
  1638.     jmp    clrcns            ; /62/ flush TT input, clear r0
  1639.  
  1640. 10$:    cmp    r0    ,#cmd$un    ; /BBS/ ambiguous?
  1641.     bne    20$            ; /BBS/ nope..
  1642.     mov    #er$ram    ,r0        ; /62/ really ambiguous REMOTE command
  1643.     br    30$            ; /62/ done
  1644. 20$:    cmp    r0    ,#cmd$bad    ; /BBS/ bad command?
  1645.     bne    40$            ; /62/ no
  1646.     mov    #er$run    ,r0        ; /62/ unrecognizable REMOTE command
  1647. 30$:    direrr    r0            ; /62/ report the error
  1648. 40$:    return
  1649.  
  1650.  
  1651.     .sbttl    REMOTE command sub-routines
  1652.  
  1653. rmtcop::call    gettwo            ; ensure both arguments are here
  1654.     tst    r0            ; are they?
  1655.     bne    10$            ; no, just exit then please
  1656.     call    lower            ; /62/ in case 2d arg came from gettwo
  1657.     call    remcop            ; /62/ attempt the copy operation
  1658. 10$:    return
  1659.  
  1660. rmtren::call    gettwo            ; ensure both arguments are here
  1661.     tst    r0            ; are they?
  1662.     bne    10$            ; no, just exit then please
  1663.     call    lower            ; /62/ in case 2d arg came from gettwo
  1664.     call    remren            ; /62/ attempt the rename operation
  1665. 10$:    return
  1666.  
  1667. ckremo::tst    remote            ; local or remote?  also clears carry
  1668.     beq    10$            ; /63/ 0 means local, carry is clear
  1669.     direrr    #er$not            ; /BBS/ not running as a local Kermit
  1670.     sec                ; which is not ok
  1671. 10$:    return
  1672.  
  1673. lower:    tst    locase            ; /BBS/ SET FIL NAM LOWER-CASE?
  1674.     bne    10$            ; /BBS/ ya, leave it alone
  1675.     upcase    argbuf            ; /BBS/ no, make it upper case
  1676. 10$:    return
  1677.  
  1678.  
  1679.     .sbttl    Shared parse routine    ; /BBS/ almost all new
  1680.  
  1681. isitas::mov    csi.fake,nextone    ; /62/ use fake csi comma parsing?
  1682.     beq    20$            ; /62/ no (also clears nextone..)
  1683.     scan    #comma    ,r1        ; more than one set args supplied?
  1684.     mov    r0    ,nextone    ; save its position in the arg buffer
  1685.     beq    20$            ; no comma found
  1686.     add    r1    ,nextone    ; save pointer to next argument(s)
  1687.     mov    nextone    ,r0        ; copy to
  1688.     clrb    -(r0)            ; put a null where the comma was..
  1689.     tstb    (r1)            ; anything left?
  1690.     bne    10$            ; ya
  1691.     mov    #er$fnm    ,r0        ; no, emit an
  1692.     br    50$            ; error message
  1693. 10$:    mov    sp    ,wasmore    ; for display formatting
  1694. 20$:    calls    fixwild    ,<r1>        ; make "?" into "%"
  1695.     mov    #srcnam    ,r2        ; destination address
  1696.     clrb    asname            ; not renaming yet..
  1697. 30$:    tstb    @r1            ; end of the line today?
  1698.     beq    80$            ; yes, exit this loop
  1699.     cmpb    @r1    ,#space        ; if a space they may have typed
  1700.     beq    40$            ; SEND file asfile
  1701.     movb    (r1)+    ,(r2)+        ; ok so far, copy the name over
  1702.     br    30$            ; next please
  1703. 40$:    clrb    @r2            ; ensure source name .asciz
  1704.     inc    r1            ; found a space in the command line
  1705.     tstb    @r1            ; anything left?
  1706.     beq    80$            ; no
  1707.     calls    iswild    ,<#srcnam>    ; check for wildcarding in name
  1708.     tst    r0            ; can't rename outfile if wildcarded
  1709.     beq    60$            ; no wildcard found
  1710. 50$:    direrr    r0            ; display error..
  1711.     return                ; and return with r0 intact
  1712.  
  1713. 60$:    strcpy    #asname    ,r1        ; 1st arg not wildcard, copy 2nd arg
  1714.     mov    rawfil    ,-(sp)        ; save current setting
  1715.     clr    rawfil            ; enable namcvt
  1716.     calls    namcvt    ,<r1,#spare1>    ; dump everything but "file.typ"
  1717.     tstb    spare1            ; anything left?
  1718.     bne    70$            ; ya, continue
  1719.     calls    namcvt    ,<#srcnam,#spare1> ; no, get inp "file.typ" only
  1720.     calls    fixfil    ,<#spare1,#errtxt> ; truncate rec'd names, send is ok
  1721.     strcat    #asname    ,#errtxt    ; concat in_file_name to out_dev
  1722.  
  1723. 70$:    mov    (sp)+    ,rawfil        ; back to where it wuz..
  1724.     calls    iswild    ,<#asname>    ; ensure file name is ok
  1725.     tst    r0            ; is it?
  1726.     bne    50$            ; no
  1727. 80$:    clrb    @r2            ; ensure source name .asciz
  1728.     return                ; note r0 is cleared by chk.tt, above
  1729.  
  1730. chk.tt::strcpy    #errtxt    ,(r5)        ; /63/ make a temp copy of file name
  1731.     upcase    r0            ; /63/ so it can be upper cased
  1732.     cmpb    #'T&137    ,(r0)+        ; /63/ is first byte an "T" ?
  1733.     bne    10$            ; /63/ nope..
  1734.     cmpb    #'T&137    ,(r0)+        ; /63/ is second byte a "T" ?
  1735.     bne    10$            ; /63/ nope..
  1736.     cmpb    #':    ,(r0)        ; /63/ is "TT" followed by a colon?
  1737.     bne    10$            ; /63/ no
  1738.     mov    #er$ttx    ,r0        ; /63/ ya, must REM TY to do this..
  1739.     return
  1740. 10$:    clr    r0            ; /63/ not TT, thus no problem
  1741.     return
  1742.  
  1743.  
  1744.     .sbttl    Get command from the attached terminal
  1745.  
  1746. ;    G E T C M D
  1747. ;
  1748. ;    input:        written into cmdbuf
  1749. ;    output:     r0    = command index in dispatch table
  1750. ;         r0    = -1 (cmd$bad) for invalid command
  1751. ;              -2 (cmd$ex)  for exit
  1752.  
  1753.     CVTARG    = C.CRLF ! C.LSPA ! C.SSPA ! C.TSPA ; /BBS/ don't upper case
  1754.  
  1755.     ; offsets into command dispatch data table
  1756.     .NAME    =    0    ; command name
  1757.     .MINLE    =    2    ; minimum length of string to match
  1758.     .CMDAD    =    4    ; the command's address
  1759.     .CMDAR    =    6    ; address of prompting string, or 0 if none
  1760.  
  1761. getcmd:    clrb    @argbuf            ; ensure argument buffer is cleared
  1762. 10$:    clr    cmdnum            ; init command index number
  1763.     .rctrlo                ; /BBS/ be sure one can see what's up
  1764.     mov    cmdbuf    ,r4        ; point to the command buffer
  1765.     calls    readcmd    ,<r4,#prompt>    ; get from current input stream
  1766.     tst    r0            ; and exit if it failed for whatever
  1767.     bne    20$            ; /BBS/ preserve r0, check for ^C, ^Z
  1768.     calls    cvt$$    ,<r4,r1,#cvtarg> ; remove junk
  1769.     tst    r0            ; anything left?
  1770.     beq    10$            ; no, reprompt and try again
  1771.     add    cmdbuf    ,r0        ; ya, point to the end of it all
  1772.     clrb    @r0            ; and make it .asciz
  1773.     mov    sp    ,pf2$ok        ; /BBS/ so PF2 can't eat overlays
  1774.     call    loacmd            ; get the command list overlay
  1775.     calls    getcm0    ,<r4,r0>    ; search for the command
  1776.     mov    r1    ,cmdadr        ; store address of routine away
  1777.     mov    r0    ,cmdnum        ; store index of command away
  1778.     mov    r0    ,r3        ; did we actually find a command?
  1779.     bmi    20$            ; no
  1780.     tst    wasnul            ; /BBS/ were commands listed via "?"
  1781.     bne    20$            ; /BBS/ ya
  1782.     call    loacmd            ; get the command list overlay
  1783.     calls    getcm1    ,<r4,r0,r3>    ; now get the rest of the command line
  1784.     tst    r0            ; or prompt for extra
  1785.     bmi    20$            ; it didn't work
  1786.     mov    cmdnum    ,r0        ; return command number
  1787. 20$:    return
  1788.  
  1789.  
  1790.     .sbttl    Get the next command    ; /BBS/ heavily modified..
  1791.  
  1792. ;    R E A D C M D
  1793. ;
  1794. ;    input:     (r5)    = buffer address
  1795. ;        2(r5)    = prompt address
  1796. ;    output:      r0    = error
  1797. ;          r1    = byte count
  1798.  
  1799. readcmd::mov    r2    ,-(sp)
  1800. 10$:    tst    cmdlun            ; reading from indirect file?
  1801.     bne    20$            ; ya
  1802.     jmp    170$            ; no
  1803. 20$:    tst    tk.err            ; successful last take command?
  1804.     bne    30$            ; nope
  1805.     tst    status            ; check this one too..
  1806.     beq    40$            ; it was ok
  1807. 30$:    tst    infomsg            ; /62/ if TT is not set quiet, the bad
  1808.     bne    110$            ; /62/ cmd line is already displayed
  1809.     br    100$            ; /62/ go do error message(s)
  1810.  
  1811. 40$:    clr    r2            ; /62/ init temp KRT.INI running flag
  1812.     inc    exstal            ; increment command file line number
  1813.     calls    getrec    ,<@r5,#lun.ta,#ln$max> ; /62/ read the record in
  1814.     tst    r0            ; did it work?
  1815.     bne    90$            ; nope..
  1816.     mov    r1    ,r0        ; copy of length
  1817.     add    @r5    ,r0        ; end of record just read
  1818.     clrb    @r0            ; null terminate
  1819.     tst    infomsg            ; echo this?
  1820.     beq    50$            ; no
  1821.     wrtall    2(r5)            ; yes, print the passed prompt
  1822.     wrtall    @r5            ; and also echo the command
  1823.     .newline
  1824.  
  1825. 50$:    tst    r1            ; was anything there?
  1826.     beq    10$            ; no, on to the next one..
  1827.     mov    @r5    ,r2        ; ya, pointer to buffer
  1828. 60$:    scan    (r2)+    ,#comment    ; look for a comment delimiter
  1829.     tst    r0            ; well?
  1830.     bne    70$            ; found one..
  1831.     tstb    @r2            ; anything left to check?
  1832.     bne    60$            ; ya, go try the next char
  1833.     br    80$            ; no, no comments found
  1834.  
  1835. 70$:    clrb    -(r2)            ; zap starting at comment char
  1836.     strlen    @r5            ; get remaining length
  1837.     mov    r0    ,r1        ; save copy
  1838.     beq    10$            ; /62/ nothing remains
  1839. 80$:    clr    r0            ; clear error register and
  1840.     jmp    190$            ; /62/ exit with a successful read
  1841.  
  1842. 90$:    cmp    r0    ,#er$eof    ; hopefully, it's end of file
  1843.     beq    120$            ; yes
  1844.     direrr    r0            ; no, get error message text to errtxt
  1845. 100$:    wrtall    #indnam            ; dump offending file's name
  1846.     wrtall    #cmd.05            ; /63/ " failed at line #"
  1847.     mov    exstal    ,r0        ; load line number
  1848.     call    L10266            ; dump it to TT
  1849.     wrtall    #cmd.06            ; /63/ ':'<cr><lf>'  "'
  1850.     wrtall    @r5            ; append the offending string
  1851.     wrtall    #cmd.07            ; /63/ '"'<cr><lf>'  '
  1852. 110$:    wrtall    #errtxt            ; now dump the error message
  1853.     call    incsts            ; /62/ flag the error here too..
  1854.     .newline
  1855.  
  1856. 120$:    mov    sy.ini    ,r2        ; /62/ from KRT.INI?
  1857.     beq    130$            ; no
  1858.     call    defterm            ; display default, set up TT
  1859.     br    140$            ; and continue
  1860. 130$:    tst    infomsg            ; really print the message?
  1861.     beq    140$            ; no
  1862.     wrtall    #indnam            ; use file name
  1863.     wrtall    #cmd.08            ; /63/ " closed"<cr><lf>
  1864. 140$:    calls    close    ,<#lun.ta>    ; close the file on any errors
  1865.     clr    tk.err            ; /62/ reset the take file error flag
  1866.     clr    cmdlun            ; /62/ next command is comming from TT
  1867.     tst    status            ; /62/ did an error occur?
  1868.     bne    150$            ; /62/ ya
  1869.     tst    r2            ; /62/ no, closing KRT.INI?
  1870.     bne    170$            ; /62/ EOF exit is only for TAKE files
  1871.     tst    exieof            ; /62/ exit at EOF?
  1872.     beq    170$            ; /62/ no
  1873.     mov    #cmd$ex    ,r0        ; /62/ yes, pass a ^Z back to exit
  1874.     br    190$            ; /62/
  1875.  
  1876. 150$:    tst    jobtype            ; /62/ detatched job?
  1877.     bmi    160$            ; /62/ ya, always bail on an error
  1878.     tst    exieof            ; /62/ does user want out?
  1879.     beq    170$            ; /62/ no, keep Kermit alive..
  1880. 160$:    bisb    #fatal$    ,@#userrb    ; /62/ ya, inform rest of the world
  1881.     jmp    c$exit            ; /62/ and exit..
  1882.  
  1883. 170$:    tst    mcrcmd            ; did we ever look for a MCR> command?
  1884.     bne    180$            ; ya, just do a terminal read
  1885.     calls    getmcr    ,<@r5>        ; no MCR> command yet, check for it
  1886.     mov    r0    ,r1        ; did we get any characters there?
  1887.     beq    180$            ; no
  1888.     wrtall    2(r5)            ; print the prompt
  1889.     wrtall    @r5            ; and echo the passed command
  1890.     .newline
  1891.     clr    r0            ; no error
  1892.     br    190$
  1893.  
  1894. 180$:    calls    kbredi    ,<2(r5),@r5>    ; read a record from the terminal
  1895. 190$:    mov    (sp)+    ,r2
  1896.     return
  1897.  
  1898.  
  1899.     .sbttl    Find the command in the table
  1900.  
  1901. ;    G E T C M 0
  1902. ;
  1903. ;    input:     (r5)    = command buffer
  1904. ;        2(r5)    = first command descriptor block
  1905. ;    output:      r0    = command index
  1906. ;          r1    = dispatch address
  1907. ;    errors:      r0    = -1 (cmd$bad)    unrecognized command
  1908. ;              -4 (cmd$un)    command not unique
  1909. ;
  1910. ;    descriptor block:
  1911. ;        .word    address of command name text
  1912. ;        .word    minimum number of name chars to make a match
  1913. ;        .word    address of command subroutine itself
  1914. ;        .word    address of optional argument prompt (null if unused)
  1915.  
  1916. getcm0::save    <r2,r3,r4>
  1917.     clr    wasnul            ; /45/ not null (ie, ?) anymore
  1918.     mov    #4    ,-(sp)        ; /BBS/ number of names per line
  1919.     mov    @r5    ,r1        ; the passed command buffer
  1920.     strlen    r1            ; get the command length
  1921.     mov    r0    ,r3        ; error if nothing is there
  1922.     beq    170$            ; oops
  1923.     cmpb    @r1    ,#'?        ; /45/ help desired today?
  1924.     bne    90$            ; /45/ no
  1925.     mov    2(r5)    ,r4        ; /45/ yes, get start of list
  1926.  
  1927. 10$:    mov    .name(r4),r1        ; /45/ anything to dump?
  1928.     beq    70$            ; /BBS/ no, exit
  1929.  
  1930.     ; /BBS/ this does 4 columns across the screen, ala VMS help..
  1931. 20$:    strlen    r1            ; compute the padding to next column
  1932.     mov    r0    ,r3        ; get copy of length
  1933. 30$:    sub    #18.    ,r3        ; assume worst case 18. spaces needed
  1934.     neg    r3            ; we now have the number of spaces
  1935.     bgt    40$            ; that is, if it's a positive number
  1936.     inc    r3            ; add in leading blank missed at 40$
  1937.     neg    r3            ; preset for looping into next column
  1938.     dec    (sp)            ; is there a next column to overwrite?
  1939.     bne    30$            ; yes, pad to end of it
  1940.     .newline            ; no, goto a new line
  1941.     mov    #4    ,(sp)        ; reset the counter now
  1942.     br    20$            ; and start fresh again..
  1943. 40$:    mov    #space    ,r0        ; load a space
  1944.     call    writ1ch            ; dump it to TT
  1945.     wrtall    r1            ; add on the current name
  1946.     add    #$listl*2,r4        ; bump to the next entry
  1947.     dec    (sp)            ; is there room left for the next one?
  1948.     beq    60$            ; nope
  1949.     mov    #space    ,r0        ; load a space
  1950. 50$:    call    writ1ch            ; dump it to TT
  1951.     sob    r3    ,50$        ; until padded to length of 18. bytes
  1952.     br    10$            ; then back for more
  1953. 60$:    .newline
  1954.     mov    #4    ,(sp)        ; reset the counter now
  1955.     br    10$            ; back for more
  1956. 70$:    cmp    #4    ,(sp)        ; is the current line blank?
  1957.     beq    80$            ; ya, skip the extra blank line
  1958.     .newline            ; no, do a newline
  1959.  
  1960. 80$:    mov    #nulcmd    ,r1        ; /45/ no, return nulcmd
  1961.     mov    sp    ,wasnul        ; /45/ flag as having been null
  1962.     clr    r0            ; /45/ no errors from getcm0
  1963.     br    180$            ; that's it
  1964.  
  1965. 90$:    clr    r2            ; length := 0
  1966.     upone    r1            ; /BBS/ upcase for the search..
  1967. 100$:    scan    (r1)    ,#cmdch        ; /63/ is this character ok in name?
  1968.     dec    r0            ; /63/ find it in the list?
  1969.     blt    120$            ; /63/ no, it must be a delimiter
  1970.     bgt    110$            ; /63/ ya, and it's not a "_"
  1971.     movb    #'-    ,(r1)        ; /63/ convert "_" to "-"
  1972. 110$:    inc    r1            ; /63/ next time check the next char
  1973.     inc    r2            ; command name length so far
  1974.     sob    r3    ,100$        ; next
  1975.  
  1976. 120$:    tst    r2            ; anything useful in command line?
  1977.     ble    170$            ; no
  1978.     mov    2(r5)    ,r4        ; the list of edit commands
  1979.     clr    r3            ; r3 will have the command number
  1980.  
  1981. 130$:    tst    .name(r4)        ; anything left in the command list?
  1982.     beq    170$            ; no
  1983.     strlen    .name(r4)        ; get the length of the command name
  1984.     calls    instr, <.name(r4),r0,@r5,r2> ; the next command?
  1985.     cmp    r0    ,#1        ; /39/ find anything?
  1986.     bne    140$            ; /39/ no
  1987.     mov    r0    ,@sp        ; /39/ save it
  1988. 140$:    cmpb    r2    ,.minle(r4)    ; check if command length is ok
  1989.     blo    150$            ; no, not enough for the command
  1990.      dec    r0            ; if match = position 1 we have
  1991.      beq    160$            ; found the command
  1992. 150$:    inc    r3            ; commandnum := commandnum + 1
  1993.     add    #$listl*2,r4        ; cmdsaddr   := succ(cmdsaddr)
  1994.     br    130$            ; try again..
  1995.  
  1996. 160$:    mov    r3    ,r0        ; return command index and
  1997.     mov    .cmdad(r4),r1        ; the command address
  1998.     br    180$
  1999.  
  2000. 170$:    mov    #cmd$ba    ,r0        ; bad command
  2001.     dec    @sp            ; /39/ command not unique?
  2002.     bne    180$            ; /39/ no
  2003.     mov    #cmd$un    ,r0        ; /39/ yes, say so
  2004. 180$:    tst    (sp)+
  2005.     unsave    <r4,r3,r2>
  2006.     return
  2007.  
  2008.  
  2009.     .sbttl    Check for additional input needed
  2010.  
  2011. ;    G E T C M 1
  2012. ;
  2013. ;    input:     (r5)    = current command buffer
  2014. ;        2(r5)    = command table address
  2015. ;        4(r5)    = index of the current command
  2016. ;
  2017. ;    output:      r0    = index of current command or < 0 for error
  2018. ;        argbuf    = any additional input or rest of the command line
  2019.  
  2020. getcm1::save    <r1,r2,r3>
  2021.     sub    #ln$max+2,sp        ; /BBS/ allocate a small buffer for
  2022.     mov    sp    ,r2        ; /55/ saving the command prompt
  2023.     tst    wasnul            ; /45/ was the command for ?
  2024.     beq    10$            ; /45/ no
  2025.     clr    wasnul            ; /45/ not null anymore
  2026.     clr    r0            ; /45/ yes, return index 0
  2027.     br    60$            ; /45/ exit
  2028. 10$:    mov    @r5    ,r1        ; get command line address
  2029.     scan    #space    ,r1        ; look for a delimiter between
  2030.     tst    r0            ; the command name and its argument
  2031.     beq    20$            ; nothing there
  2032.     add    r1    ,r0        ; point to the string after the space
  2033.     copyz    r0 ,argbuf ,#ln$max    ; /BBS/ copy the command arg over
  2034.     br    40$            ; done
  2035.  
  2036. 20$:    clrb    @argbuf            ; /BBS/ don't mistake arg0 for arg1 !
  2037.     mov    4(r5)      ,r3        ; get the command index
  2038.     mul    #$listl*2 ,r3        ; if no arg given see if one is needed
  2039.     add    2(r5)      ,r3        ; add in base address of command table
  2040.     mov    .cmdar(r3),r3        ; get the argument prompt now
  2041.     beq    40$            ; /63/ no arg prompt for this command
  2042.     strcpy    r2    ,r3        ; /55/ copy the prompt over now
  2043. 30$:    calls    kbredi    ,<r2,argbuf>    ; /55/ read a command from keyboard
  2044.     tst    r0            ; get anything?
  2045.     bne    50$            ; read failed or ^C or ^Z typed
  2046.     calls    cvt$$,<argbuf,r1,#cvtarg> ; remove junk
  2047.     tst    r0            ; is there anything left?
  2048.     beq    30$            ; no, reprompt and try again
  2049.     mov    r0    ,r1        ; something is left, point to the
  2050.     add    argbuf    ,r1        ; end of the line
  2051.     clrb    @r1            ; null terminate
  2052. 40$:    mov    4(r5)    ,r0        ; /62/ return command index
  2053.     br    60$
  2054.  
  2055. 50$:    cmp    r0    ,#cmd$ex    ; /62/ was ^Z typed?
  2056.     bne    60$            ; /62/ no
  2057.     mov    #cmd$nx    ,r0        ; /62/ ya, don't exit pgm from here
  2058. 60$:    add    #ln$max+2,sp        ; /BBS/ pop the temp buffer
  2059.     unsave    <r3,r2,r1>
  2060.     return
  2061.  
  2062.  
  2063.     .sbttl    Null command, do nothing..
  2064.  
  2065. nulcmd:    clr    r0            ; /45/ no errors
  2066.     return
  2067.  
  2068.  
  2069.     .sbttl    SHOW VERSION        ; /63/ here so server can also call it
  2070.  
  2071. sho$ve::calls    get$ve    ,<#spare1>    ; separate this from the actual
  2072.     wrtall    #spare1            ; version string build so the
  2073.     return                ; server can get the same string..
  2074.  
  2075. get$ve::strcpy    (r5)    ,#cmd.01    ; /63/ display name, instruction set
  2076.     tst    imgtyp            ; virtual overlay image running?
  2077.     beq    10$            ; no
  2078.     strcat    r0    ,#cmd.02    ; /63/ ya, say so
  2079.     br    20$
  2080. 10$:    strcat    r0    ,#cmd.03    ; /63/ it's the low memory image
  2081. 20$:    strcat    r0    ,#cmd.04    ; /63/ tag with "/TSX-Plus  "
  2082.     strcat    r0    ,#sho.ve    ; release, ver, last edit date
  2083.     return                ; /63/ note that the returned string's
  2084.                     ; length must not exceed LN$MAX bytes
  2085.     .end    kermit
  2086.