home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / b / krtsho.mac < prev    next >
Text File  |  2020-01-01  |  46KB  |  1,481 lines

  1.     .title    KRTSHO    The SHOW command
  2.     .ident    "V03.63"
  3.  
  4. ; /63/    27-Sep-97  Billy Youdelman  V03.63
  5. ;
  6. ;    enhanced SHOW CL
  7. ;    individually display attributes, ala C-Kermit
  8. ;    add SHOW CONTROL-CHARACTER
  9. ;    add SHOW WILDCARDS
  10. ;    moved SHO VERSION to KRTCMD so the server can also call it..
  11. ;    add SHO DAYTIME
  12. ;    SHO ALL now shows all, moved to KRTCMD so it can call everything
  13.  
  14. ; /62/    27-Jul-93  Billy Youdelman  V03.62
  15. ;
  16. ;    added SHO BAUD, DTR, DUPLEX, END-OF-LINE, FLOW-CONTROL, HOME, LD:,
  17. ;    LOCAL-ECHO, LOGFILE, LONG-PACKETS, RANDOM, RECEIVE, SEED, SEND, SPEED
  18. ;    cleanup, condense logging (debug) modes display
  19. ;    display current-block-number and size-of logfile in SHO DEBUG
  20. ;    move SETTLE-TIME to SHO DIAL
  21. ;    conform to major sinit stuff update in KRTINI.MAC
  22. ;    include last number dialed in SH PHONE
  23. ;    add SHOW CL, EOF
  24.  
  25. ; /BBS/     1-Dec-91  Billy Youdelman  V03.61
  26. ;
  27. ;    SHOW command with no args displays assigns ala RT-11
  28. ;    sho$all - shortened up
  29. ;    added sho$attributes
  30. ;    added sho$devices - displays the bbs access permission list only
  31. ;    added sho$submounts, using TSX emts
  32. ;    added sho$vl - displays status of vlswch under TSX+
  33. ;    add DEC-Multinational type to sho$file
  34. ;    moved release notes to the help text file
  35. ;    sho$packet - display "^A" notation in addition to octal numbers
  36. ;    also lists long-packets max length, set length, rec'd length
  37. ;    add xtime for spiffier transfer time display, other small fixes
  38. ;    sho$file - indicate if file name conversion disabled, lower case on
  39. ;    added home directory to sho$default
  40. ;    fixed display formatting for sho$phone_numbers
  41. ;    sho$params indicates if SET LONG OFF or SET NOLONG
  42. ;    added MILNET to SHO CONSOLE
  43. ;    added c$print
  44. ;    moved sho$line to krtcm1
  45. ;    added SHO TERMINAL
  46. ;    added SHO RETRY, TIME-OUT, made PACKET do parameters, not stats
  47. ;    add SHOW INCOMPLETE-FILE-DISPOSITION
  48. ;    add SHO MEMORY, display remaining handler free space under RT-11
  49. ;    add SHO SL, SHO UPDATE, added LOCAL-ECHO, BREAK to SHO CONSOLE
  50. ;    add SHO REPEAT-CHAR, SERVER
  51. ;    pass file date/time/prot to COPY output file
  52. ;    use DEC method of version numbering for SHO VERSION
  53.  
  54. ;    31-Jan-84  08:28:16  Brian Nelson
  55. ;
  56. ;    Remove SHOW code from KRTCMD.MAC for placement into an overlay.
  57.  
  58.  
  59.     .include "IN:KRTMAC.MAC"
  60.     .iif ndf  KRTINC  .error    <; .include for IN:KRTMAC.MAC failed>
  61.     .include "IN:KRTCDF.MAC"
  62.     .iif ndf  KRTCDF  .error    <; .include for IN:KRTCDF.MAC failed>
  63.  
  64.     .mcall    .PURGE            ; /62/
  65.  
  66.  
  67.     .sbttl    Local data        ; /63/ consolidated all data here..
  68.  
  69.     .psect    $pdata
  70. attlst:    .word    at.cdt    ,at.xle    ,at.len    ,at.pro    ,at.sys    ,at.inf    ,at.typ    ,0
  71. atthdr:    .word    10$    ,20$    ,30$    ,40$    ,50$    ,60$    ,70$
  72.  10$:    .asciz    " Date"
  73.  20$:    .asciz    " Exact-Length"
  74.  30$:    .asciz    " Length"
  75.  40$:    .asciz    " Protection"
  76.  50$:    .asciz    " System-ID"
  77.  60$:    .asciz    " System-Info"
  78.  70$:    .asciz    " Type (text/binary)"
  79.     .even
  80. blolst:    .word    10$    ,20$    ,30$
  81.  10$:    .asciz    "1-Byte-Checksum"
  82.  20$:    .asciz    "2-Byte-Checksum"
  83.  30$:    .asciz    "3-Byte-CRC-CCITT"
  84.     .even
  85. deblst:    .word    log$co    ,log$pa    ,log$io    ,log$rp    ,log$de    ,0
  86. debhdr:    .word    10$    ,20$    ,30$    ,40$    ,50$
  87.  10$:    .asciz    "CONNECT session logging:"
  88.  20$:    .asciz    "PACKET exchange logging:"
  89.  30$:    .asciz    "RAW  binary I/O logging:"
  90.  40$:    .asciz    "RPACK rec packets to TT:"
  91.  50$:    .asciz    "TERMINAL  debug display:"
  92.     .even
  93. fillst:    .word    10$    ,20$    ,20$
  94.  10$:    .asciz    "ASCII (7-bit text)"
  95.  20$:    .asciz    "BINARY (fixed 512, no carriage control)"
  96.  30$:    .asciz    "DEC-Multinational (8-bit text)"
  97.     .even
  98. parlst:    .word    10$    ,20$    ,30$    ,40$    ,50$
  99.  10$:    .asciz    "NONE"
  100.  20$:    .asciz    "ODD"
  101.  30$:    .asciz    "EVEN"
  102.  40$:    .asciz    "MARK"
  103.  50$:    .asciz    "SPACE"
  104.     .even
  105. ttlst:    .word    10$    ,20$    ,30$    ,40$
  106.  10$:    .asciz    "NOSCOPE"
  107.  20$:    .asciz    "TTY"
  108.  30$:    .asciz    "VT100"
  109.  40$:    .asciz    "VT200"
  110.     .even
  111. sh.001:    .asciz    "Block-check-type: "
  112. sh.002:    .asciz    "Incomplete-file-disposition: "
  113. sh.003:    .asciz    "RANDOM error generation:"
  114. sh.004:    .asciz    "  SEED = "
  115. sh.005:    .asciz    "."<cr><lf>
  116. sh.006:    .ascii    " "
  117. sh.007:    .asciz    "ENABLED"
  118. sh.008:    .asciz    " disabled"
  119. sh.009:    .asciz    "Logfile is "
  120. sh.010:    .asciz    ", cur/max blk: "
  121. sh.011:    .asciz    "/"
  122. sh.012:    .asciz    "No LOGFILE is open"
  123. sh.013:    .asciz    "ESCAPE connect command prefix  "
  124. sh.014:    .asciz    "FILE-TYPE set to "
  125. sh.015:    .asciz    "Auto ASCII/Binary"
  126. sh.016:    .asciz    "Existing file protection:"
  127. sh.017:    .asciz    "File  naming  conversion:"
  128. sh.018:    .ascii    " "
  129. sh.019:    .asciz    "DISABLED"
  130. sh.020:    .ascii    " "
  131. sh.021:    .asciz    "enabled"
  132. sh.022:    .asciz    "Lower case  file  naming:"
  133. sh.023:    .asciz    "Volume  verification  is:"
  134. sh.024:    .asciz    "Local comma CSI-Parsing:  "
  135. sh.025:    .asciz    "real"
  136. sh.026:    .asciz    "EMULATED"
  137. sh.027:    .asciz    "File create-size blocks:  "
  138. sh.028:    .asciz    "Init file: "
  139. sh.029:    .asciz    "WILDCARDS are set "
  140. sh.030:    .asciz    "Implicit"
  141. sh.031:    .asciz    "EXPLICIT"
  142. sh.032:    .asciz    "Take file EOF action: "
  143. sh.033:    .asciz    "NO"
  144. sh.034:    .asciz    "EXIT"
  145. sh.035:    .asciz    "KEEP"
  146. sh.036:    .asciz    "discard"
  147. sh.037:    .asciz    "RECEIVE "
  148. sh.038:    .asciz    " conpar+p.eol   EOL  "
  149. sh.039:    .asciz    " SEND "
  150. sh.040:    .asciz    "   senpar+p.eol   EOL  "
  151. sh.041:    .ascii    "  "
  152. sh.042:    .asciz    "nominal packet  LEN"
  153. sh.043:    .asciz    "set packet limit  LEN"
  154. sh.044:    .asciz    "LONG-PACKETS "
  155. sh.045:    .asciz    "set locally to"
  156. sh.046:    .ascii    "   "
  157. sh.047:    .asciz    "OFF"
  158. sh.048:    .asciz    "_received_ LEN"
  159. sh.049:    .asciz    "max avail buff"
  160. sh.050:    .asciz    "TIME-OUT "
  161. sh.051:    .asciz    " REC  seconds wait"
  162. sh.052:    .asciz    " SEND seconds wait"
  163. sh.053:    .asciz    "_received_ seconds"
  164. sh.054:    .asciz    "RETRY "
  165. sh.055:    .asciz    "initial-connect limit"
  166. sh.056:    .asciz    "max for other packets"
  167. sh.057:    .ascii    " "
  168. sh.058:    .asciz    " ^"
  169. sh.059:    .ascii    " ----------------- Packet Stats -----------------"<cr><lf>
  170.     .asciz    "Type  Last Sent   Last Rec    Prev Sent   Prev Rec"<cr><lf>
  171. sh.060:    .asciz    " --- Last Transaction ---"<cr><lf>
  172. sh.061:    .asciz    "ALL"
  173. sh.062:    .asciz    "Bytes "
  174. sh.063:    .asciz    "sent:    "
  175. sh.064:    .asciz    "received:"
  176. sh.065:    .asciz    "For data bytes:"
  177. sh.066:    .asciz    "Time to transfer: "
  178. sh.067:    .asciz    "Physical data rate: "
  179. sh.068:    .asciz    " chars/second"<cr><lf>
  180. sh.069:    .asciz    "File transfer rate: "
  181. sh.070:    .asciz    "Chars per read:     "
  182. sh.071:    .asciz    "DELAY"
  183. sh.072:    .ascii    "PAUSE"
  184. sh.073:    .asciz    " secs before send-"
  185. sh.074:    .asciz    "pack"
  186. sh.075:    .asciz    "init"
  187. sh.076:    .asciz    "No handshaking in use"
  188. sh.077:    .asciz    "Handshake set to "
  189. sh.078:    .asciz    "S/W Parity"
  190. sh.079:    .asciz    " is set "
  191. sh.080:    .asciz    "Terminal"
  192. sh.081:    .asciz    ", "
  193. sh.082:    .asciz    "QUIET, "
  194. sh.083:    .asciz    "Console"
  195. sh.084:    .asciz    "7"
  196. sh.085:    .asciz    "8"
  197. sh.086:    .asciz    "-bit, "
  198. sh.087:    .asciz    "Full"
  199. sh.088:    .asciz    "HALF"
  200. sh.089:    .asciz    " Duplex, MILNET XON is "
  201. sh.090:    .asciz    ", BREAK is "
  202. sh.091:    .asciz    "short"
  203. sh.092:    .asciz    "LONG"
  204. sh.093:    .asciz    "Attributes"
  205. sh.094:    .asciz    ": On"
  206. sh.095:    .asciz    ": Off"
  207. sh.096:    .asciz    "CL Ports: "
  208. sh.097:    .asciz    "CL Units: "
  209. sh.098:    .asciz    "CL Priority: "
  210. sh.099:    .asciz    "Nothing SET"
  211. sh.100:    .asciz    "start of packet SOH  "
  212. sh.101:    .asciz    "  "
  213. sh.102:    .asciz    "BINARY-TYPE file extents: "
  214. sh.103:    .asciz    " *"
  215. sh.104:    .asciz    "Accessable devices:"
  216. sh.105:    .asciz    "No phone numbers defined"<cr><lf>    ; /63/ for SHOW ALL
  217. sh.106:    .asciz    "Last number dialed:  "
  218. sh.107:    .asciz    "Not available under RT-11"
  219. sh.108:    .asciz    "VLSWCH (^W,^B) during CONNECT"
  220. sh.109:    .asciz    "REMOTE"
  221. sh.110:    .asciz    "LOCAL"
  222. sh.111:    .asciz    "SL status: "
  223. sh.112:    .asciz    "ON"
  224. sh.113:    .asciz    "KED"
  225. sh.114:    .asciz    "TSX-Plus keeps all handlers resident"
  226. sh.115:    .asciz    "RT-11 can't fetch from an FRUNed program"
  227. sh.116:    .asciz    "VBGEXE is running this program"
  228. sh.117:    .asciz    ". word"
  229. sh.118:    .asciz    "s"
  230. sh.119:    .asciz    " free to load handlers"
  231. sh.120:    .asciz    "Packets between display updates: "
  232. sh.121:    .asciz    "Server time-out: "
  233. sh.122:    .asciz    "Repeated character quoting: "
  234. sh.123:    .asciz    " seconds"
  235. sh.124:    .asciz    "control quote = "
  236. sh.125:    .asciz    " ("
  237. sh.126:    .asciz    "), applied to (0 = unprefixed, 1 = prefixed):"<cr><lf>
  238. sh.127:    .asciz    ": "
  239. sh.128:    .asciz    "         "    ; 9 spaces
  240. sh.129:    .asciz    " renamed to "
  241. sh.130:    .asciz    " deleted"
  242. sh.131:    .asciz    " block"
  243. sh.132:    .asciz    " copied to "
  244. sh.133:    .asciz    "_To: "
  245. sh.134:    .asciz    "No logical disks are mounted"<cr><lf>
  246. dkslug:    .asciz    "DK  --> "
  247. hoslug:    .asciz    "HOME--> "
  248. lis.ct:    .ascii    "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]~?"
  249. pridev:    .asciz    "LP:"
  250. raslug:    .asciz    "  ("
  251. ratag:    .asciz    "Hz)"<cr><lf>
  252. typdef:    .asciz    ".LST"
  253.     .even
  254.  
  255.     .psect    $rwdata    ,rw,d,lcl,rel,con
  256. ld$stat:.byte    4 ,135            ; get status of
  257. ld$num:    .byte    0 ,0            ; this LD unit
  258.     .word    ld$buf            ; and put it here
  259. ld$buf:    .word    0 ,0 ,0 ,0 ,0        ; ld$num emt writes data here
  260. txflag:    .word    0            ; /BBS/ if <>, sending
  261. C2:    .word    0            ; hours
  262. C3:    .word    0            ; mins
  263. C4:    .word    0            ; secs
  264. conn:    .asciz    "     :00"<cr><lf>    ; write converted time here
  265. ld$data:.ascii    "LD0 --> "        ; WARNING: DON'T MODIFY LD$NAME STRING
  266. ld$name:.asciz    "DU5:JAYSEN.DSK  R/O  [not available]" ; TO LEFT OF "[" CHAR!!
  267.     .even
  268.  
  269.  
  270.     .psect    $code
  271.     .sbttl    SHOW command processor
  272.  
  273. c$show::tstb    @argbuf            ; /BBS/ any arg there?
  274.     beq    20$            ; /BBS/ no, do devs ala RT-11
  275.     upcase    argbuf            ; /BBS/ upper case the args
  276.     calls    getcm0    ,<argbuf,#sholst> ; look for a valid command
  277.     tst    r0            ; find one?
  278.     bmi    30$            ; no
  279.     tst    wasnul            ; /BBS/ were commands listed via "?"
  280.     bne    10$            ; /BBS/ ya
  281.     jsr    pc    ,@r1        ; dispatch the command
  282. 10$:    clr    r0            ; /62/ if it can fail it must do its
  283.     return                ; error handling before returning here
  284.  
  285. 20$:    call    sho$df            ; /BBS/ display default disk ala RT-11
  286.     br    10$            ; /62/
  287.  
  288. 30$:    cmp    r0    ,#cmd$un    ; /BBS/ ambiguous?
  289.     bne    40$            ; /BBS/ no
  290.     mov    #er$tam    ,r0        ; /62/ ya, make it ambiguous arg
  291.     br    50$            ; /62/
  292. 40$:    mov    #er$tun    ,r0        ; /62/ unrecognizable arg
  293. 50$:    direrr    r0            ; /62/
  294.     return
  295.  
  296.  
  297.     .sbttl Command dispatch data table
  298.  
  299. command    sholst    ,ALL        ,2    ,sho$al
  300. command    sholst    ,ASSIGNS    ,2    ,sho$df
  301. command    sholst    ,ATTRIBUTES    ,2    ,sho$at    ; /BBS/ wuz missing..
  302. command    sholst    ,BAUD        ,2    ,sho$li    ; /62/
  303. command    sholst    ,BINARY-TYPE    ,2    ,sho$bt
  304. command    sholst    ,BLOCK-CHECK-TYPE,2    ,sho$bl
  305. command    sholst    ,CL:        ,2    ,sho$cl    ; /62/
  306. command    sholst    ,CONSOLE    ,2    ,sho$co
  307. command    sholst    ,CONTROL-PREFIXING,4    ,sho$ct    ; /63/
  308. command    sholst    ,DATE        ,2    ,sho$da
  309. command    sholst    ,DAYTIME    ,3    ,sho$dy    ; /63/
  310. command    sholst    ,DEBUG        ,3    ,sho$de
  311. command    sholst    ,DEFAULT    ,3    ,sho$df
  312. command    sholst    ,DELAY        ,3    ,sho$dl
  313. ;comman    sholst    ,DEVICES    ,3    ,sho$dv    ; /BBS/ devlst only!!
  314. command    sholst    ,DIAL        ,2    ,sho$dp
  315. command    sholst    ,DTR        ,2    ,sho$li    ; /62/
  316. command    sholst    ,DUPLEX        ,2    ,sho$co    ; /62/
  317. command    sholst    ,END-OF-LINE    ,2    ,sho$pa    ; /62/
  318. command    sholst    ,EOF        ,2    ,sho$eo    ; /62/
  319. command    sholst    ,ESCAPE        ,2    ,sho$es
  320. command    sholst    ,FILE-TYPE    ,2    ,sho$fi
  321. command    sholst    ,FLOW-CONTROL    ,2    ,sho$li    ; /62/
  322. command    sholst    ,HANDSHAKE    ,2    ,sho$ha
  323. command    sholst    ,HOME        ,2    ,sho$df    ; /62/
  324. command    sholst    ,INCOMPLETE-FILE-DISPOSITION ,1 ,sho$in
  325. command    sholst    ,LD:        ,2    ,sho$su    ; /62/
  326. command    sholst    ,LINE        ,2    ,sho$li
  327. command    sholst    ,LOCAL-ECHO    ,3    ,sho$co    ; /62/
  328. command    sholst    ,LOGFILE    ,3    ,sho$de    ; /62/
  329. command    sholst    ,LONG-PACKETS    ,3    ,sho$pk    ; /62/
  330. command    sholst    ,MEMORY        ,2    ,sho$me
  331. command    sholst    ,MODEM-TYPE    ,2    ,sho$dp
  332. command    sholst    ,PACKETS    ,3    ,sho$pk
  333. command    sholst    ,PARAMETERS    ,3    ,sho$pa
  334. command    sholst    ,PARITY        ,3    ,sho$pr
  335. command    sholst    ,PAUSE        ,3    ,sho$ps
  336. command    sholst    ,PHONE        ,2    ,sho$ph
  337. command    sholst    ,RANDOM        ,2    ,sho$de    ; /62/
  338. command    sholst    ,RECEIVE    ,3    ,sho$pa    ; /62/
  339. command    sholst    ,REPEAT-QUOTING    ,3    ,sho$rp
  340. command    sholst    ,RETRY        ,3    ,sho$rt
  341. command    sholst    ,SEED        ,3    ,sho$de    ; /62/
  342. command    sholst    ,SEND        ,3    ,sho$pa    ; /62/
  343. command    sholst    ,SERVER        ,3    ,sho$sv
  344. command    sholst    ,SL        ,2    ,sho$sl
  345. command    sholst    ,SPEED        ,2    ,sho$li    ; /62/
  346. command    sholst    ,START-OF-PACKET,2    ,sho$so
  347. command    sholst    ,SUBMOUNTS    ,2    ,sho$su
  348. command    sholst    ,TERMINAL    ,1    ,sho$tt
  349. command    sholst    ,TIME        ,2    ,sho$ti
  350. command    sholst    ,TIME-OUTS    ,5    ,sho$to
  351. command    sholst    ,TT:        ,2    ,sho$tt
  352. command    sholst    ,UPDATE        ,1    ,sho$up
  353. command    sholst    ,VERSION    ,2    ,sho$ve
  354. command    sholst    ,VLSWCH        ,2    ,sho$vl
  355. command    sholst
  356.  
  357.  
  358.     .sbttl    SHOW ALL        ; /63/ split to insert SHO MODEM
  359.  
  360. sho$a0::call    sho$ve            ; version
  361.     call    sho$me            ; /63/ free memory for fetches
  362.     call    sho$li            ; line
  363.     .newline            ; /63/
  364.     return
  365.  
  366. sho$a1::tst    tsxsav            ; /63/ running under TSX?
  367.     beq    10$            ; /63/ no, avoid an error message..
  368.     mov    tsxcl    ,-(sp)        ; /63/
  369.     clr    tsxcl            ; /63/ disable sho$cl jump to sho$line
  370.     call    sho$cl            ; /63/ saved CL parameter strings
  371.     mov    (sp)+    ,tsxcl        ; /63/
  372.     .newline            ; /63/
  373. 10$:    call    sho$tt            ; /63/ terminal, console
  374.     .newline            ; /63/
  375.     call    sho$ph            ; /63/ phone numbers
  376.     .newline            ; /63/
  377.     call    sho$de            ; debugging
  378.     .newline            ; /63/
  379.     call    sho$at            ; attributes
  380.     .newline            ; /63/
  381.     call    sho$bt            ; binary-types
  382.     .newline            ; /63/
  383.     call    sho$ct            ; /63/ control prefixing
  384.     .newline            ; /63/
  385.     call    sho$rp            ; /63/ repeated char compression
  386.     .newline            ; /63/
  387.     call    sho$fi            ; file
  388.     .newline            ; /63/
  389.     call    sho$in            ; incomplete-file-disposition
  390.     .newline            ; /63/
  391.     call    sho$eo            ; /63/ action on end of command file
  392.     .newline            ; /63/
  393.     call    sho$ha            ; /63/ handshaking
  394.     .newline            ; /63/
  395.     call    sho$bl            ; block-check-type
  396.     .newline            ; /63/
  397.     call    sho$pa            ; parameters
  398.     .newline            ; /63/
  399.     call    sho$up            ; /63/ packets between display updates
  400.     .newline            ; /63/
  401.     call    c$stat            ; /63/ transfer stats
  402.     .newline            ; /63/
  403.     call    sho$sv            ; /63/ server time-out
  404.     .newline            ; /63/
  405.     call    sho$dy            ; /63/ daytime
  406.     .newline            ; /63/
  407.     call    c$pwd            ; /63/ default disk, logicals
  408.     .newline            ; /63/
  409.     return
  410.  
  411.  
  412.     .sbttl    SHOW DIAL
  413.  
  414. sho$dp:    tst    (sp)+            ; dump the return address then call
  415.     jmp    xxsdia            ; this to load an adjacent overlay..
  416.  
  417.  
  418.     .sbttl    SHOW DEBUG        ; /62/ major revision
  419.  
  420. sho$de:    clr    r0            ; index := 0
  421. 10$:    tst    deblst(r0)        ; end of the list yet?
  422.     beq    40$            ; yes, go check file name
  423.     wrtall    debhdr(r0)        ; print the header
  424.     bit    deblst(r0),trace    ; see if a bit is turned on
  425.     beq    20$            ; no
  426.     wrtall    #sh.006            ; "ENABLED"  ya, say so then
  427.     br    30$            ; next please
  428. 20$:    wrtall    #sh.008            ; " disabled"  it's off
  429. 30$:    .newline
  430.     tst    (r0)+            ; bump to next entry please
  431.     br    10$            ; go do it
  432.  
  433. 40$:    wrtall    #sh.003            ; "RANDOM error insertion is:"
  434.     tst    ranerr            ; doing random errors?
  435.     bne    50$            ; ya
  436.     wrtall    #sh.008            ; no  " disabled"
  437.     br    60$
  438. 50$:    wrtall    #sh.006            ; ya "ENABLED"
  439. 60$:    wrtall    #sh.004            ; "  SEED = "
  440.     mov    seed    ,r0        ; get a copy of the seed
  441.     call    L10266            ; display it
  442.     wrtall    #sh.005            ; "."<cr><lf>
  443.     bit    #log$op    ,trace        ; is a file open?
  444.     beq    70$            ; no
  445.     wrtall    #sh.009            ; "Logfile is "
  446.     wrtall    #logfil            ; include file name
  447.     wrtall    #sh.010            ; ", cur/max blk: "
  448.     mov    #lun.lo    ,r1        ; logfile lun
  449.     asl    r1            ; word indexing
  450.     mov    blknum(r1),r0        ; recover current block number
  451.     call    L10266            ; dump it to TT
  452.     wrtall    #sh.011            ; "/"
  453.     mov    sizof(r1),r0        ; recover file size
  454.     call    L10266            ; dump that to TT too
  455.     br    80$
  456. 70$:    wrtall    #sh.012            ; "No LOGFILE is open"
  457. 80$:    .newline
  458.     return
  459.  
  460.  
  461.     .sbttl    SHOW DATE, DAYTIME, DEFAULT, HOME, TIME
  462.     .enabl    lsb            ; /62/
  463.  
  464. sho$da::call    sho.da            ; /63/
  465.     .newline
  466.     br    20$            ; /62/
  467.  
  468. sho.da:    calls    ascdat    ,<#errtxt,#-1>    ; /62/ get date into a buffer
  469.     wrtall    #errtxt            ; display it
  470.     return
  471.  
  472. sho$dy::call    sho.da            ; /63/ both date and time..
  473.     wrtall    #sh.101            ; /63/ "  "
  474. sho$ti::calls    asctim    ,<#errtxt,#0>    ; get time of day into a buffer
  475.     wrtall    #errtxt            ; display it
  476.     wrtall    #raslug            ; /62/ "  ("
  477.     mov    clkflg    ,r0        ; /62/ pass line time clock rate
  478.     call    L10266            ; /62/ dump it to terminal
  479.     wrtall    #ratag            ; /62/ "Hz)"<cr><lf>
  480.     br    20$            ; /62/
  481.  
  482. c$pwd::    tst    tsxsav            ; /63/ running under TSX?
  483.     beq    10$            ; /62/ no, can't do this under RT-11
  484.     call    sho$su            ; /62/ show submounts
  485. 10$:    call    sho$df            ; /63/ display default disk
  486. 20$:    clr    r0            ; /62/ for when not called by SHOW
  487.     return
  488.  
  489. sho$df:    call    sho$xx            ; /BBS/ allow separate access
  490.     br    sho$yy            ; /62/ to each function alone
  491.  
  492. sho$xx:    wrtall    #hoslug            ; /BBS/ print prefix
  493.     wrtall    #dkname            ; then show HOME dir
  494.     .newline
  495.     br    20$            ; /62/
  496.  
  497. c$home::strcpy    #defdir    ,#dkname    ; /62/ write home device into default
  498. sho$yy::wrtall    #dkslug            ; /BBS/ print prefix
  499.     wrtall    #defdir            ; then show DK
  500.     .newline
  501.     br    20$            ; /62/
  502.  
  503.     .dsabl    lsb
  504.  
  505.  
  506.     .sbttl    SHOW SUBMOUNTS        ; /BBS/ all new routine..
  507.  
  508.     F.NAM1    =  2        ; offset to first word of file name
  509.     F.NAM2    =  4        ; second word of file name
  510.     F.TYPE    =  6        ; file type
  511.     F.FLAG    = 10        ; file flags
  512.         NOTHERE    =  2    ; not there bit
  513.         READONLY=  1    ; read only bit
  514.  
  515. sho$su:    tst    tsxsav            ; running under TSX?
  516.     bne    10$            ; ya
  517.     mov    #er$tsx    ,r0        ; no, can't do this
  518.     br    20$
  519. 10$:    cmp    tsxver    ,#620.        ; does the right emt exist here?
  520.     bhis    30$            ; ya
  521.     mov    #er$v62    ,r0        ; no
  522. 20$:    direrr    r0            ; say why it can't happen..
  523.     return
  524.  
  525. 30$:    clr    r4            ; init # of units counter
  526.     clr    r5            ; init anything there counter
  527. 40$:    movb    r4    ,ld$num        ; load unit # into stats emt
  528.     mov    #ld$stat,r0        ; load emt arg pointer
  529.     emt    375            ; get status of this LD unit
  530.     tst    ld$buf            ; anybody home??
  531.     beq    90$            ; next
  532.     mov    r4    ,r0        ; copy unit number to
  533.     add    #'0    ,r0        ; convert to ascii character
  534.     movb    r0    ,<ld$data+2>    ; stick into display buffer
  535.  
  536. ;    input:    r2    = buffer for the result
  537. ;        r3    = current directory entry pointer
  538.  
  539.     mov    #ld$name,r2        ; pointer to output buffer
  540.     mov    #ld$buf    ,r3        ; point to .rad50 LD file name
  541.     calls    rdtoa    ,<r2,(r3)>    ; convert the device name please
  542.     add    #3    ,r2        ; skip past it
  543.     movb    #':    ,(r2)+        ; and insert a colon
  544.     calls    rdtoa    ,<r2,f.nam1(r3)> ; convert first 3 file name to ascii
  545.     add    #3    ,r2        ; and skip over those three characters
  546.     calls    rdtoa    ,<r2,f.nam2(r3)> ; now get the rest of the file name
  547.     add    #3    ,r2        ; point to place a dot into the name
  548.     movb    #'.    ,(r2)+        ; a dot
  549.     calls    rdtoa    ,<r2,f.type(r3)> ; get the file type at last
  550.     add    #7    ,r2        ; bump to the "O" or "W" byte
  551.     bit    #readonly,f.flag(r3)    ; read only?
  552.     bne    50$            ; ya..
  553.     movb    #'W    ,(r2)+        ; no, say it's "R/W"
  554.     br    60$
  555. 50$:    movb    #'O    ,(r2)+        ; say it's "R/O"
  556. 60$:    bit    #nothere,f.flag(r3)    ; able to locate file?
  557.     bne    70$            ; nope..
  558.     clrb    (r2)            ; ya, so off not avail message
  559.     br    80$
  560. 70$:    movb    #space    ,(r2)        ; put space where null wuz..
  561. 80$:    wrtall    #ld$data        ; display entry for this LD unit
  562.     .newline
  563.     inc    r5            ; flag some LD unit was found
  564. 90$:    inc    r4            ; bump LD unit number
  565.     cmp    r4    ,#7        ; done all 8. yet?
  566.     ble    40$            ; no
  567.     tst    r5            ; ya, was anything found?
  568.     bne    100$            ; ya
  569.     wrtall    #sh.134            ; /63/ "No logical disks are mounted"
  570. 100$:    return
  571.  
  572.  
  573.     .sbttl    SHOW FILE-TYPE
  574.  
  575. sho$fi:    wrtall    #sh.014            ; "FILE-TYPE set to"
  576.     tst    doauto            ; is auto mode enabled?
  577.     beq    10$            ; no
  578.     mov    #sh.015    ,r0        ; ya, "Auto ASCII/Binary"
  579.     br    20$            ; go display it
  580. 10$:    mov    $image    ,r0        ; recover current file-type
  581.     asl    r0            ; word indexing
  582.     mov    fillst(r0),r0        ; where it is..
  583. 20$:    wrtall    r0            ; dump file-type to TT
  584.     .newline
  585.     wrtall    #sh.029            ; /63/ "WILDCARDS are set "
  586.     tst    dowild            ; /63/
  587.     beq    30$            ; /63/
  588.     wrtall    #sh.030            ; /63/ "Implicit"
  589.     br    40$            ; /63/
  590. 30$:    wrtall    #sh.031            ; /63/ "EXPLICIT"
  591. 40$:    .newline            ; /63/
  592.     wrtall    #sh.016            ; "Existing file protection: "
  593.     tst    filprot            ; is it on?
  594.     beq    50$            ; no
  595.     mov    #sh.006    ,r0        ; "ENABLED"
  596.     br    60$
  597. 50$:    mov    #sh.008    ,r0        ; " disabled"
  598. 60$:    wrtall    r0            ; say which
  599.     .newline
  600.     wrtall    #sh.017            ; "File naming conversion: "
  601.     tst    rawfil            ; is it on?
  602.     beq    70$            ; no
  603.     mov    #sh.018    ,r0        ; " DISABLED"
  604.     br    80$
  605. 70$:    mov    #sh.020    ,r0        ; " enabled"
  606. 80$:    wrtall    r0            ; say which
  607.     .newline
  608.     wrtall    #sh.022            ; "Lower case file naming: "
  609.     tst    locase            ; is it on?
  610.     beq    90$            ; no
  611.     mov    #sh.006    ,r0        ; "ENABLED"
  612.     br    100$
  613. 90$:    mov    #sh.008    ,r0        ; " disabled"
  614. 100$:    wrtall    r0            ; say which
  615.     .newline
  616.     wrtall    #sh.023            ; "Volume verification is: "
  617.     tst    rtvol            ; is it on?
  618.     beq    110$            ; no
  619.     mov    #sh.020    ,r0        ; " enabled"
  620.     br    120$
  621. 110$:    mov    #sh.018    ,r0        ; " DISABLED"
  622. 120$:    wrtall    r0            ; say which
  623.     .newline
  624.     wrtall    #sh.024            ; /62/ "Local CSI comma parsing:  "
  625.     tst    csi.fake        ; /62/ which is it?
  626.     beq    130$            ; /62/
  627.     mov    #sh.026    ,r0        ; /62/ "EMULATED"
  628.     br    140$            ; /62/
  629. 130$:    mov    #sh.025    ,r0        ; /62/ "real"
  630. 140$:    wrtall    r0            ; /62/ say which
  631.     .newline
  632.     wrtall    #sh.027            ; "File create-size blocks: "
  633.     mov    en$siz    ,r0        ; copy of size
  634.     call    L10266            ; write integer as ascii on terminal
  635.     .newline
  636.     wrtall    #sh.028            ; /62/ "Init file: "
  637.     wrtall    #ininam            ; /62/ and its name
  638.     .newline            ; /62/
  639.     return
  640.  
  641.  
  642.     .sbttl     SHOW BLOCK, EOF, INCOMPLETE-FILE-DISPOSITION    ; /63/
  643.     .enabl    lsb                        ; /63/
  644.  
  645. sho$bl:    wrtall    #sh.001            ; /62/ "Block-check-type: "
  646.     movb    setchkt    ,r0        ; /62/ get the checksum type please
  647.     sub    #'1    ,r0        ; convert to an index for printing
  648.     asl    r0            ; word indexing
  649.     wrtall    blolst(r0)        ; display it
  650.     br    30$            ; /63/
  651.  
  652. sho$eof:wrtall    #sh.032            ; /63/ "Take file EOF action: "
  653.     tst    exieof            ; is it on?
  654.     bne    10$            ; ya
  655.     wrtall    #sh.033            ; /63/ "NO"
  656. 10$:    wrtall    #sh.034            ; /63/ "EXIT"
  657.     br    30$            ; /63/
  658.  
  659. sho$in:    wrtall    #sh.002            ; /63/ "Incomplete-file-disposition: "
  660.     tst    incfile            ; is it on?
  661.     bne    20$            ; no
  662.     wrtall    #sh.035            ; /63/ "KEEP"
  663.     br    30$
  664. 20$:    wrtall    #sh.036            ; /63/ "discard"
  665. 30$:    .newline
  666.     return
  667.  
  668.     .dsabl    lsb
  669.  
  670.  
  671.     .sbttl    SHOW ESCAPE        ; /BBS/ modified..
  672.  
  673. sho$es:    wrtall    #sh.013            ; /63/ "ESCAPE connect command prefix"
  674.     mov    conesc    ,-(sp)        ; copy escape char to a tiny buffer
  675.     mov    sp    ,r0        ; point to the tiny buffer
  676.     call    unfmts            ; convert to "\000" notation first
  677.     wrtall    r0            ; display that
  678.     call    tag.it            ; then do the "^\" notation
  679.     tst    (sp)+            ; pop the tiny buffer
  680.     return
  681.  
  682.  
  683.     .sbttl    SHOW PARAMETERS
  684.  
  685. sho$pa:    call    sho$pk            ; packets
  686.     call    sho$dl            ; delay
  687.     call    sho$ps            ; pause
  688.     call    sho$to            ; time-out
  689.     jmp    sho$rt            ; /62/ retries
  690.  
  691.  
  692.     .sbttl    SHOW PACKET, RETRY, TIME-OUT    ; /BBS/ extensively modified
  693.     .enabl    lsb                ; /63/
  694.  
  695. sho$pk:    call    sho$so            ; show SOH first
  696.     wrtall    #sh.037            ; /63/ "RECEIVE "
  697.     wrtall    #sh.038            ; /63/ " conpar+p.eol   EOL  "
  698.     clr    -(sp)            ; a one word buffer
  699.     bisb    conpar+p.eol,@sp    ; copy receive EOL char
  700.     mov    sp    ,r0        ; point to buffer
  701.     call    unfmts            ; convert to "\000" notation
  702.     wrtall    r0            ; display that
  703.     call    tag.it            ; then tag with "^M" notation
  704.     clr    (sp)            ; init the tiny buffer again
  705.     bisb    senpar+p.eol,@sp    ; /62/ copy send EOL char
  706.     wrtall    #sh.039            ; /63/ " SEND "
  707.     wrtall    #sh.040            ; /63/ "   senpar+p.eol   EOL  "
  708.     mov    sp    ,r0        ; point to buffer
  709.     call    unfmts            ; convert to "\000" notation
  710.     wrtall    r0            ; display it
  711.     call    tag.it            ; then tag with "^M" notation
  712.     tst    (sp)+            ; pop tiny buffer
  713.     wrtall    #sh.037            ; /63/ "RECEIVE "
  714.     wrtall    #sh.042            ; /63/ "nominal packet  LEN"
  715.     movb    conpar+p.spsiz,r0    ; /62/ recover packet length
  716.     decout    r0            ; display it
  717.     .newline
  718.     wrtall    #sh.039            ; /63/ " SEND "
  719.     wrtall    #sh.041            ; /63/ "  nominal packet  LEN"
  720.     movb    senpar+p.spsiz,r0    ; /62/ recover packet length
  721.     decout    r0            ; display it
  722.     .newline
  723.     wrtall    #sh.039            ; /63/ " SEND "
  724.     wrtall    #sh.043            ; /63/ "set packet limit  LEN"
  725.     decout    senlen            ; /62/ display SET SEND PACKET length
  726.     .newline
  727.     wrtall    #sh.044            ; /63/ "LONG-PACKETS"
  728.     wrtall    #sh.045            ; /63/ "set locally to"
  729.     tst    dolong            ; are long-packets enabled?
  730.     bne    10$            ; ya
  731.     wrtall    #sh.046            ; /63/ "   OFF"
  732.     br    20$
  733. 10$:    decout    reclng            ; display locally set long-packet len
  734. 20$:    .newline
  735.     wrtall    #sh.044            ; /63/ "LONG-PACKETS"
  736.     wrtall    #sh.048            ; /63/ "_received_ LEN"
  737.     decout    senlng            ; received (from other Kermit) length
  738.     .newline
  739.     wrtall    #sh.044            ; /63/ "LONG-PACKETS"
  740.     wrtall    #sh.049            ; /63/ "max avail buff"
  741.     decout    #maxlng            ; the maximum possible packet length
  742.     br    30$            ; /63/
  743.  
  744. sho$to:    wrtall    #sh.050            ; /63/ "TIME-OUT "
  745.     wrtall    #sh.051            ; /63/ " REC  seconds wait"
  746.     decout    rectim            ; SET value
  747.     .newline
  748.     wrtall    #sh.050            ; /63/ "TIME-OUT "
  749.     wrtall    #sh.052            ; /63/ " SEND seconds wait"
  750.     decout    sentim            ; SET value
  751.     .newline
  752.     wrtall    #sh.050            ; /63/ "TIME-OUT "
  753.     wrtall    #sh.053            ; /63/ "_received_ seconds"
  754.     movb    conpar+p.time,r0    ; RECEIVED (from other Kermit)
  755.     decout    r0            ; value
  756.     br    30$            ; /63/
  757.  
  758. sho$rt:    wrtall    #sh.054            ; /63/ "RETRY "
  759.     wrtall    #sh.055            ; /63/ "initial-connect limit"
  760.     decout    initry
  761.     .newline
  762.     wrtall    #sh.054            ; /63/ "RETRY "
  763.     wrtall    #sh.056            ; /63/ "max for other packets"
  764.     decout    maxtry
  765.     br    30$            ; /63/
  766.  
  767. tag.it:    wrtall    #sh.057            ; /63/ "  ^"  /BBS/ added..
  768.     mov    2(sp)    ,r0        ; display a control char
  769.     movb    lis.ct(r0),r0        ; in "^n" notation
  770.     call    writ1char
  771. 30$:    .newline
  772.     return
  773.  
  774.     .dsabl    lsb
  775.  
  776.  
  777.     .sbttl    STATUS
  778.  
  779. c$stat::sub    #120    ,sp        ; /43/ allocate a buffer please
  780.     wrtall    #sh.059            ; /63/ a header
  781.     clr    r3            ; /43/ current item to Dump
  782.     mov    #27.    ,r4        ; /43/ number items to dump
  783.     mov    sp    ,r5        ; /BBS/ init buffer pointer
  784.     br    20$            ; /BBS/ do totals, even zeros..
  785.  
  786. 10$:    mov    sp    ,r5        ; /43/ restore buffer pointer
  787.     tst    pcnt.r+2(r3)        ; /43/ anything there to dump?
  788.     bne    20$            ; /43/ yes
  789.     tst    pcnt.s+2(r3)        ; /43/ no, what about sent packets?
  790.     bne    20$            ; /BBS/ ya
  791.     mov    totp.s    ,r1        ; /BBS/ check "prev" totals too
  792.     add    r3    ,r1        ; point to this type's sent total
  793.     tst    2(r1)            ; anything in low word?
  794.     bne    20$            ; ya, there's something to do
  795.     mov    totp.r    ,r1        ; top of the received data table
  796.     add    r3    ,r1        ; point to this type's rec'd total
  797.     tst    2(r1)            ; anything in low word?
  798.     beq    60$            ; no, skip the empty individual types
  799. 20$:    mov    r5    ,r1        ; /43/ fill the buffer with spaces
  800.     mov    #110    ,r2        ; /43/ count for the fill
  801. 30$:    movb    #space    ,(r1)+        ; /43/ stuff a space
  802.     sob    r2    ,30$        ; /43/ and go back for more
  803.     mov    r3    ,r1        ; /43/ current type
  804.     beq    40$            ; /43/ empty type means total packets
  805.     asr    r1            ; /43/ divide by two
  806.     asr    r1            ; /43/ again
  807.     add    #100    ,r1        ; /43/ get the letter type now
  808.     movb    r1    ,(r5)+        ; /43/ insert into the buffer
  809.     br    50$            ; /43/ insert data now
  810. 40$:    mov    #sh.061    ,r1        ; /63/ the word "ALL" for totals
  811.     movb    (r1)+    ,(r5)+        ; /63/ bump r5 ala above and
  812.     movb    (r1)+    ,(r5)        ; /63/ copy without leaving
  813.     movb    (r1)    ,1(r5)        ; /63/ a null terminator here
  814. 50$:    add    #5    ,r5        ; /43/ skip over a couple spaces
  815.     mov    #pcnt.s    ,r1        ; /43/ sent packet count
  816.     call    150$            ; /43/ convert double quantity
  817.     mov    #pcnt.r    ,r1        ; /43/ received packet count
  818.     call    150$            ; /43/ convert double quantity
  819.     mov    totp.s    ,r1        ; /43/ total sent packet count
  820.     call    150$            ; /43/ convert double quantity
  821.     mov    totp.r    ,r1        ; /43/ total received packet count
  822.     call    150$            ; /43/ convert double quantity
  823.     movb    #cr    ,(r0)+        ; /43/ insert carriage control
  824.     movb    #lf    ,(r0)+        ; /43/
  825.     clrb    @r0            ; /43/ all done, .asciz
  826.     mov    sp    ,r0        ; /43/ now dump it
  827.     wrtall    r0            ; /43/ simple
  828. 60$:    add    #4    ,r3        ; /43/ move up to next entry
  829.     dec    r4            ; /BBS/ wuz sob r4 ,10$ (too big now)
  830.     beq    70$
  831.     jmp    10$
  832.  
  833. 70$:    clr    txflag            ; /62/ init transfer direction flag
  834.     wrtall    #sh.060            ; /63/ a header, dump character counts
  835.     mov    sp    ,r4        ; /43/ buffer address
  836.     wrtall    #sh.062            ; /63/ "Bytes "
  837.     tst    charout            ; /BBS/ anything sent?
  838.     bne    80$            ; /BBS/    ya
  839.     tst    charout+2        ; /BBS/    check low word
  840.     beq    90$            ; /BBS/ nope..
  841. 80$:    wrtall    #sh.063            ; /63/ "sent:    "
  842.     mov    #charout,r1        ; /43/ data characters in
  843.     mov    sp    ,txflag        ; /BBS/ flag for "Chars per read: "
  844.     br    100$            ; /BBS/ print it
  845. 90$:    wrtall    #sh.064            ; /63/ "received:"
  846.     mov    #charin    ,r1        ; /43/ point to it
  847. 100$:    call    130$            ; /43/ and dump
  848.     wrtall    #sh.065            ; /63/ "For data bytes:"
  849.     tst    txflag            ; sending this time?
  850.     bne    110$
  851.     mov    #filein    ,r1        ; no, use in char count
  852.     br    120$
  853. 110$:    mov    #fileout,r1        ; ya, use out char count
  854. 120$:    call    130$            ; display whichever..
  855.     wrtall    #sh.066            ; /63/ "Time to transfer: "
  856.     call    xtime            ; /BBS/ format the transfer time
  857.     call    brate            ; /43/ data rates also
  858.     add    #120    ,sp        ; /43/ pop local buffer
  859.     clr    r0            ; /62/ return no error
  860.     return
  861.  
  862. 130$:    clr    r2            ; /43/ convert for character counts
  863.     mov    r4    ,r0        ; /43/ buffer address
  864.     call    $cddmg            ; /43/ convert 32-bit integer
  865.     movb    #cr    ,(r0)+        ; /BBS/ then tag number
  866.     movb    #lf    ,(r0)+        ; /BBS/ with a CR/LF
  867.     clrb    @r0            ; /43/ .asciz
  868.     sub    r4    ,r0        ; /BBS/ get length
  869.     sub    #15    ,r0        ; /BBS/ how much to pad?
  870.     neg    r0            ; /BBS/ need pos number
  871.     mov    r0    ,r2        ; /BBS/ copy # of pad chars
  872.     mov    #space    ,r0        ; /BBS/ a space
  873. 140$:    call    writ1ch            ; /BBS/ dump it to the screen
  874.     sob    r2    ,140$        ; /BBS/ pad as needed
  875.     wrtall    r4            ; /43/ dump and exit
  876.     return
  877.  
  878. 150$:    add    r3    ,r1        ; /43/ get address to convert
  879.     clr    r2            ; /43/ ensure no leading zeroes
  880.     mov    r5    ,r0        ; /43/ set buffer address
  881.     call    $cddmg            ; /43/ convert
  882.     add    #14    ,r5        ; /43/ position for next time
  883.     return
  884.  
  885. xtime:    mov    #conn    ,r0        ; /BBS/ display xfr time as HH:MM:SS
  886.     movb    #space    ,(r0)+        ; write spaces
  887.     movb    #space    ,(r0)+        ; to clear possible
  888.     movb    #space    ,(r0)        ; leftover hours & colon
  889.     mov    times+4    ,r0        ; hi word, incremental time from stats
  890.     mov    times+6    ,r1        ; lo word, ditto..
  891.     div    #60.    ,r0        ;; good for up to 18.2 hours duration
  892.     mov    r1    ,C4        ; save secs
  893.     mov    r0    ,r1        ; prep for
  894.     clr    r0            ; next divide
  895.     div    #60.    ,r0        ; get hours and mins
  896.     mov    r1    ,C3        ; save mins
  897.     mov    r0    ,C2        ; save copy of hours
  898.     beq    160$            ; skip if no hours
  899.  
  900.     mov    r0    ,r1        ; where hrs need to be for dec2
  901.     mov    #conn    ,r2        ; where dec2 will write hours
  902.     call    dec2            ; convert hours to ascii
  903.     movb    #':    ,conn+2        ; colon after hours
  904.     cmpb    #'0    ,conn        ; iz hours "tens" digit a zero?
  905.     bne    160$            ; no
  906.     movb    #space    ,conn        ; blank leading zero
  907.  
  908. 160$:    mov    C3    ,r1        ; do mins
  909.     mov    #conn+3    ,r2        ; put 'em here
  910.     call    dec2            ; convert mins to ascii
  911.     tst    C2            ; do hours exist?
  912.     bne    170$            ; ya, so leave leading zero in mins
  913.     cmpb    #'0    ,conn+3        ; iz mins "tens" digit a zero?
  914.     bne    170$            ; nope..
  915.     movb    #space    ,conn+3        ; ya, blank leading zero
  916.  
  917. 170$:    mov    C4    ,r1        ; recover secs
  918.     mov    #conn+6    ,r2        ; to here
  919.     call    dec2            ; convert to ascii
  920.     wrtall    #conn            ; done, dump buff to screen
  921.     return
  922.  
  923. dec2:    clr    r0            ; integer in r1 -> two digit ascii
  924.     div    #10.    ,r0        ; get values of digits
  925.     add    #'0    ,r0        ; convert ones to ascii
  926.     movb    r0    ,(r2)+        ; put ascii number in buffer
  927.     add    #'0    ,r1        ; get tens digit
  928.     movb    r1    ,(r2)        ; two digits only
  929.     return
  930.  
  931. brate:    mov    charout+2,r1        ; /43/ compute effective baud rate
  932.     mov    charout+0,r0        ; /43/ for the last transaction
  933.     add    charin+2,r1        ; /43/ don't care which way it was
  934.     adc    r0            ; /43/ overflow?
  935.     add    charin    ,r0        ; /43/ done
  936.     div    times+6    ,r0        ; /43/ at last (forget the 16 high)
  937.     ble    180$            ; /BBS/ nothing to display
  938.     wrtall    #sh.067            ; /63/ Physical data rate: "
  939.     decout    r0            ; /43/ dump the data
  940.     wrtall    #sh.068            ; /63/ " chars/second"
  941.     mov    fileout+2,r1        ; /43/ compute effective baud rate
  942.     mov    fileout+0,r0        ; /43/ for the last transaction
  943.     add    filein+2,r1        ; /43/ don't care which way it was
  944.     adc    r0            ; /43/ overflow?
  945.     add    filein    ,r0        ; /43/ done
  946.     div    times+6,r0        ; /43/ at last (forget the 16 high)
  947.     wrtall    #sh.069            ; /63/ "File transfer rate: "
  948.     decout    r0            ; /43/ dump the data
  949.     wrtall    #sh.068            ; /63/ " chars/second"
  950.     tst    txflag            ; /BBS/ reading this time?
  951.     beq    180$            ; /BBS/ nope
  952.     mov    rdrate+2,r1        ; /56/ ya, low word of chars read
  953.     mov    rdrate+0,r0        ; /56/ high word of chars read
  954.     div    rdrate+4,r0        ; /56/ divided by number of reads done
  955.     ble    180$            ; /BBS/ nothing to display
  956.     wrtall    #sh.070            ; /63/ "Chars per read:     "
  957.     decout    r0            ; /56/ write number to TT
  958.     .newline            ; /56/
  959. 180$:    return
  960.  
  961.  
  962.     .sbttl    SHOW DELAY, HANDSHAKE, PAUSE, PARITY
  963.     .enabl    lsb            ; /63/
  964.  
  965. sho$dl:    wrtall    #sh.071            ; /63/ "DELAY"
  966.     wrtall    #sh.073            ; /63/ " secs before send-"
  967.     wrtall    #sh.075            ; /63/ "init"
  968.     decout    sendly            ; write decimal value to TT
  969.     br    30$            ; /63/
  970.  
  971. sho$ha:    movb    handch    ,r0        ; recover handshake character
  972.     bne    10$            ; got it
  973.     wrtall    #sh.076            ; /63/ "No handshaking in use"
  974.     br    30$            ; /63/
  975. 10$:    wrtall    #sh.077            ; /63/ "Handshake set to "
  976.     cmp    r0    ,#space        ; /62/ is it some control char?
  977.     bge    20$            ; /62/ no
  978.     wrtall    #sh.058            ; /63/ " ^"
  979.     movb    lis.ct(r0),r0        ; /62/ make it displayable
  980. 20$:    call    writ1char        ; dump the handshake char now
  981.     br    30$            ; /63/
  982.  
  983. sho$pr:    wrtall    #sh.078            ; /63/ "S/W Parity"
  984.     wrtall    #sh.079            ; /63/ " is set "
  985.     mov    parity    ,r0        ; recover parity
  986.     asl    r0            ; word indexing for list below
  987.     wrtall    parlst(r0)        ; display what it is
  988.     br    30$            ; /63/
  989.  
  990. sho$ps:    wrtall    #sh.072            ; /63/ "PAUSE secs before send-"
  991.     wrtall    #sh.074            ; /63/ "pack"
  992.     decout    pauset            ; write decimal value to TT
  993. 30$:    .newline
  994.     return
  995.  
  996.     .dsabl    lsb
  997.  
  998.  
  999.     .sbttl    SHOW TERMINAL, CONSOLE
  1000.  
  1001. sho$tt:    mov    vttype    ,r0        ; recover terminal type
  1002.     wrtall    #sh.080            ; /63/ "Terminal"
  1003.     wrtall    #sh.079            ; /63/ " is set "
  1004.     asl    r0            ; word indexing
  1005.     wrtall    ttlst(r0)        ; display it
  1006.     wrtall    #sh.081            ; /63/ ", "
  1007.     tst    infomsg            ; check SET TT [NO]QUIET status
  1008.     beq    10$            ; it's QUIET
  1009.     wrtall    #sh.033            ; /63/ "NO"
  1010. 10$:    wrtall    #sh.082            ; /63/ "QUIET, "
  1011.     call    sho$sl            ; show SL editor status
  1012.     .br    sho$con
  1013.  
  1014. sho$co:    wrtall    #sh.083            ; /63/ "Console"
  1015.     wrtall    #sh.079            ; /63/ " is set "
  1016.     tst    con8bit            ; is 8-bit mode enabled?
  1017.     bne    20$
  1018.     wrtall    #sh.084            ; /63/ "7"
  1019.     br    30$
  1020. 20$:    wrtall    #sh.085            ; /63/ "8"
  1021. 30$:    wrtall    #sh.086            ; /63/ "-bit, "
  1022.     tst    duplex            ; what is DUPLEX doing?
  1023.     bne    40$            ; it's HALF
  1024.     wrtall    #sh.087            ; /63/ "Full"
  1025.     br    50$
  1026. 40$:    wrtall    #sh.088            ; /63/ HALF"
  1027. 50$:    wrtall    #sh.089            ; /63/ " Duplex, MILNET XON is "
  1028.     tst    milnet            ; and the MILNET mode?
  1029.     bne    60$
  1030.     wrtall    #sh.047            ; /63/ "OFF"
  1031.     br    70$
  1032. 60$:    wrtall    #sh.007            ; /63/ "ENABLED"
  1033. 70$:    wrtall    #sh.090            ; /63/ ", BREAK is "
  1034.     cmp    break+2    ,#18.        ; check break length
  1035.     bgt    80$            ; it's long
  1036.     wrtall    #sh.091            ; /63/ "short"
  1037.     br    90$            ; /63/
  1038. 80$:    wrtall    #sh.092            ; /63/ "LONG"
  1039. 90$:    .newline            ; /63/
  1040.     tst    tsxsav            ; /63/ running under TSX?
  1041.     beq    100$            ; /63/ skip sho$vl if not
  1042.     call    sho$vl            ; /63/ show vlswch
  1043. 100$:    jmp    sho$es            ; /63/ show escape
  1044.  
  1045.  
  1046.     .sbttl    SHOW ATTRIBUTES        ; /63/ individual attrs ala C-Kermit
  1047.  
  1048. sho$at:    wrtall    #sh.093            ; "Attributes"
  1049.     bit    #at.on    ,doattr        ; are attributes on?
  1050.     bne    10$            ; ya..
  1051.     wrtall    #sh.095            ; no, "Off"
  1052.     .newline
  1053.     br    50$            ; if off, skip individual attributes
  1054. 10$:    wrtall    #sh.094            ; "On"
  1055.     clr    r0            ; index := 0
  1056. 20$:    .newline
  1057.     tst    attlst(r0)        ; end of the list yet?
  1058.     beq    50$            ; yes
  1059.     wrtall    atthdr(r0)        ; print the header
  1060.     bit    attlst(r0),doattr    ; see if a bit is turned on
  1061.     beq    30$            ; no
  1062.     wrtall    #sh.094            ; ya, "On"
  1063.     br    40$            ; next please
  1064. 30$:    wrtall    #sh.095            ; no, "Off"
  1065. 40$:    tst    (r0)+            ; bump to next entry please
  1066.     br    20$            ; go do it
  1067. 50$:    return
  1068.  
  1069.  
  1070.     .sbttl    SHOW CL:        ; /62/ all new
  1071.  
  1072. sho$cl:    tst    tsxsav            ; running under TSX?
  1073.     bne    10$            ; ya
  1074.     direrr    #er$tsx            ; no, can't do this
  1075.     br    70$
  1076. 10$:    wrtall    #sh.096            ; "CL PORTS: "
  1077.     tstb    ports
  1078.     bne    20$
  1079.     wrtall    #sh.099            ; nothing SET
  1080.     br    30$
  1081. 20$:    wrtall    #ports
  1082. 30$:    .newline
  1083.     wrtall    #sh.097            ; "CL UNITS: "
  1084.     tstb    units
  1085.     bne    40$
  1086.     wrtall    #sh.099            ; nothing SET
  1087.     br    50$
  1088. 40$:    wrtall    #units
  1089. 50$:    .newline
  1090.     tst    tsxcl            ; /63/ is link device a CL unit now?
  1091.     beq    60$            ; /63/ no
  1092.     jmp    sho$line        ; /63/ ya, display its parameters
  1093. 60$:    wrtall    #sh.098            ; /63/    "CL Priority: "
  1094.     mov    cl.pri    ,r0        ; /63/ recover it
  1095.     call    L10266            ; /63/ and dump it
  1096.     .newline            ; /63/
  1097. 70$:    return
  1098.  
  1099.  
  1100.     .sbttl    SHOW START-OF-PACKET
  1101.  
  1102. sho$so:    wrtall    #sh.037            ; /63/ "RECEIVE "
  1103.     wrtall    #sh.100            ; /63/ "start of packet SOH  "
  1104.     mov    recsop    ,-(sp)        ; recover SOH char to a tiny buffer
  1105.     bic    #^c<177>,@sp        ; hose parity
  1106.     mov    sp    ,r0        ; point to where it is on stack
  1107.     call    unfmts            ; convert to "\000" format
  1108.     wrtall    r0            ; display that
  1109.     call    tag.it            ; tag with "^A" notation
  1110.     wrtall    #sh.039            ; /63/ " SEND "
  1111.     wrtall    #sh.101            ; /63/ "  "
  1112.     wrtall    #sh.100            ; /63/ "start of packet SOH  "
  1113.     mov    sensop    ,@sp        ; recover SOH char
  1114.     bic    #^c<177>,@sp        ; hose parity
  1115.     mov    sp    ,r0        ; point to where it is on stack
  1116.     call    unfmts            ; convert to "\000" format
  1117.     wrtall    r0            ; display that
  1118.     call    tag.it            ; tag with "^A" notation
  1119.     tst    (sp)+            ; pop tiny buffer
  1120.     return
  1121.  
  1122.  
  1123.     .sbttl    SHOW BINARY-TYPE
  1124.  
  1125.     BINWIDE    =    10.        ; /63/ how many per line to list..
  1126.  
  1127. sho$bt:    wrtall    #sh.102            ; /63/ "BINARY-TYPE file extents: "
  1128.     mov    bintyp    ,r1        ; get the address of the list
  1129. 10$:    mov    #binwide,r2        ; /BBS/ list is simply a concatenated
  1130.     .newline            ; string of file types rather than
  1131. 20$:    tstb    @r1            ; the more general one of a list
  1132.     beq    40$            ; of pointers
  1133.     wrtall    #sh.103            ; /63/ " *"  format it into *.xyz
  1134.     mov    #4    ,r3        ; looping for 4 bytes
  1135. 30$:    movb    (r1)+    ,r0        ; /BBS/ replaces print to a length..
  1136.     call    writ1char
  1137.     sob    r3    ,30$
  1138.     sob    r2    ,20$        ; and print the next one
  1139.     br    10$            ; insert a newline
  1140. 40$:    cmp    #binwide,r2        ; /BBS/ already done a new line?
  1141.     beq    50$            ; /BBS/ ya, so why do another?
  1142.     .newline
  1143. 50$:    return
  1144.  
  1145.  
  1146. ;    .sbttl    SHOW DEVICES, supported through CHKDEV which also be used
  1147.  
  1148. ;    DEVWIDE    =    15.        ; /63/ how many per line to list..
  1149.  
  1150. ;sho$dv:wrtall    #sh.104            ; /63/ "Accessable devices:"
  1151. ;    mov    #devlst    ,r1        ; get the address of the list
  1152. ;10$:    mov    #devwide,r2        ; the list is simply a concatenated
  1153. ;    .newline            ; string of file types rather than
  1154. ;20$:    tstb    @r1            ; the more general one of a list
  1155. ;    beq    50$            ; of pointers
  1156. ;  ;;    cmp    #devwide,r2        ; at start of a line?
  1157. ;  ;;    beq    30$            ; ya..
  1158. ;    movb    #space            ; /62/
  1159. ;    call    writ1char        ; /62/
  1160. ;30$:    mov    #4    ,r3        ; loop for 4 bytes
  1161. ;40$:    movb    (r1)+    ,r0        ; /BBS/ replaces print to a length..
  1162. ;    call    writ1char
  1163. ;    sob    r3    ,40$
  1164. ;    sob    r2    ,20$        ; and print the next one
  1165. ;    br    10$            ; insert a newline
  1166. ;50$:    cmp    #15.    ,r2        ; /BBS/ already done a new line?
  1167. ;    beq    60$            ; /BBS/ ya, so why do another?
  1168. ;    .newline
  1169. ;60$:    jmp    sho$su            ; /62/ then show submounts
  1170.  
  1171.  
  1172.     .sbttl    SHOW PHONE        ; /BBS/ modified..
  1173.  
  1174. sho$ph:    mov    #pnhead    ,r2        ; pointer to list of numbers
  1175.     tst    (r2)            ; /48/ anything there?
  1176.     bne    10$            ; /48/ yes
  1177.     wrtall    #sh.105            ; /63/ "No phone numbers defined"
  1178.     br    70$            ; /48/ exit
  1179. 10$:    mov    (r2)    ,r2        ; /48/ get pointer to next
  1180.     beq    70$            ; /48/ nothing
  1181.     mov    r2    ,r3        ; /48/ copy pointer
  1182.     add    #2    ,r3        ; /48/ point to the text
  1183.     clr    r4            ; init a flag
  1184. 20$:    clr    r1            ; init a counter
  1185.  
  1186. 30$:    movb    (r3)+    ,r0        ; get a byte
  1187.     beq    60$            ; done
  1188.     call    writ1char        ; dump byte to TT
  1189.     cmpb    r0    ,#space        ; wuz it a space?
  1190.     beq    40$            ; ya
  1191.     inc    r1            ; no, bump char count
  1192.     br    30$            ; and continue
  1193.  
  1194. 40$:    tst    r4            ; been here before?
  1195.     bne    30$            ; ya, leave other spaces as is
  1196.     mov    sp    ,r4        ; only use 1st space in string
  1197.     sub    #20.    ,r1        ; ya, compute padding req'd
  1198.     neg    r1            ; make it a positive value
  1199.     ble    20$            ; if not, leave it and continue
  1200.     movb    #space    ,r0        ; load a space
  1201. 50$:    call    writ1char        ; then type it out
  1202.     sob    r1    ,50$        ; this many times..
  1203.     br    30$            ; then on to the next string
  1204.  
  1205. 60$:    .newline
  1206.     br    10$            ; /48/ next please
  1207. 70$:    mov    phnum    ,r0        ; /62/ address of phone number
  1208.     tstb    @r0            ; /62/ anything dialed yet?
  1209.     beq    80$            ; /62/ no
  1210.     wrtall    #sh.106            ; /63/ "Last number dialed:  "
  1211.     wrtall    r0            ; /62/ display the phone number
  1212.     .newline
  1213. 80$:    return
  1214.  
  1215.  
  1216.     .sbttl    SHOW VLSWCH
  1217.  
  1218. sho$vl:    tst    tsxsav            ; running under TSX?
  1219.     bne    10$            ; ya
  1220.     wrtall    #sh.107            ; /63/ "Not available under RT-11"
  1221.     br    30$
  1222.  
  1223. 10$:    wrtall    #sh.108            ; /63/ "VLSWCH during CONNECT"
  1224.     wrtall    #sh.079            ; /63/ " is set "
  1225.     tstb    vlflag            ; the answer is..
  1226.     beq    20$            ;           0 is local
  1227.     wrtall    #sh.109            ; /63/ "REMOTE"     <> means remote
  1228.     br    30$
  1229. 20$:    wrtall    #sh.110            ; /63/ "LOCAL"
  1230. 30$:    .newline
  1231.     return
  1232.  
  1233.  
  1234.     .sbttl    SHOW SL            ; /BBS/ added..
  1235.  
  1236. sho$sl:    wrtall    #sh.111            ; /63/ "SL status: "
  1237.     tst    sl.on            ; is it on?
  1238.     bne    10$            ; ya
  1239.     wrtall    #sh.047            ; /63/ "OFF"
  1240.     br    20$
  1241. 10$:    wrtall    #sh.112            ; /63/ "ON"
  1242. 20$:    mov    #comma    ,r0        ; a comma
  1243.     call    writ1char        ; between options
  1244.     tst    sl.ked            ; is KED mode on?
  1245.     bne    30$            ; ya
  1246.     wrtall    #sh.033            ; /63/ "NO"
  1247. 30$:    wrtall    #sh.113            ; /63/ "KED"
  1248.     .newline
  1249.     return
  1250.  
  1251.  
  1252.     .sbttl    SHOW MEMORY    ; /BBS/ all new
  1253.  
  1254. sho$me:    tst    tsxsav            ; running under TSX?
  1255.     beq    10$            ; /62/ no
  1256.     wrtall    #sh.114            ; /63/ "TSX keeps handlers resident"
  1257.     br    50$
  1258. 10$:    tst    jobsts            ; /62/ FRUNed?
  1259.     beq    20$            ; /62/ no
  1260.     wrtall    #sh.115            ; /63/ "can't fetch from FRUNed pgm"
  1261.     br    50$
  1262. 20$:    tst    vbgexe            ; /62/ is VBGEXE running this program?
  1263.     beq    30$            ; /62/ no
  1264.     wrtall    #sh.116            ; /63/ "VBGEXE running this program"
  1265.     br    50$
  1266. 30$:    mov    fetptmax,-(sp)        ; this is top of memory
  1267.     sub    @fetpt    ,@sp        ; minus top of program + handlers
  1268.     mov    (sp)+    ,r0        ; equals what's left..
  1269.     asr    r0            ; convert to words
  1270.     mov    r0    ,r1        ; save a copy
  1271.     call    L10266            ; display it
  1272.     wrtall    #sh.117            ; /63/ ". word"
  1273.     dec    r1            ; was it just one word?
  1274.     beq    40$            ; ya
  1275.     wrtall    #sh.118            ; /63/ no, this "s" makes it "words"
  1276. 40$:    wrtall    #sh.119            ; /63/ " free to load handlers"
  1277. 50$:    .newline            ; /62/
  1278.     return
  1279.  
  1280.  
  1281.     .sbttl    SHOW REPEAT-QUOTING, SERVER, UPDATE    ; /BBS/ added
  1282.     .enabl    lsb
  1283.  
  1284. sho$up:    wrtall    #sh.120            ; /63/ "Packets between updates: "
  1285.     mov    blip    ,r0        ; the interval in question
  1286.     call    L10266            ; write it to TT
  1287.     br    20$            ; /63/
  1288.  
  1289. sho$sv:    wrtall    #sh.121            ; /63/ "Server time-out: "
  1290.     mov    serwait    ,r0        ; the time-out value
  1291.     call    L10266            ; write it to TT
  1292.     wrtall    #sh.123            ; /63/ " seconds"
  1293.     br    20$            ; /63/
  1294.  
  1295. sho$rp:    wrtall    #sh.122            ; /63/ "Repeated character quoting: "
  1296.     tst    setrpt            ; is it on?
  1297.     bne    10$            ; ya..
  1298.     wrtall    #sh.019            ; /63/ "DISABLED"
  1299.     br    20$
  1300. 10$:    wrtall    #sh.021            ; /63/ "enabled"
  1301. 20$:    .newline
  1302.     return
  1303.  
  1304.     .dsabl    lsb
  1305.  
  1306.  
  1307.     .sbttl    SHOW CONTROL-CHARACTER    ; /63/ all new..
  1308.  
  1309. sho$ct:    wrtall    #sh.124            ; print first part of header
  1310.     movb    senpar+p.qctl,r0    ; recover the control char quote char
  1311.     call    L10266            ; dump its value to the terminal
  1312.     wrtall    #sh.125            ; print next part of header
  1313.     movb    senpar+p.qctl,r0    ; get control char quote char again
  1314.     call    writ1char        ; now dump it as a printed char
  1315.     wrtall    #sh.126            ; and finish up the header line..
  1316.     mov    #ctlflgs,r3        ; top of the control chars flags list
  1317.     inc    r3            ; skip past first entry, which is 255.
  1318.     clr    r4            ; init control char value register
  1319.     mov    #20    ,r5        ; 16. lines of stuff to display
  1320.  
  1321. 10$:    mov    r3    ,r2        ; pointer to where we are in ctlflgs
  1322.     mov    r4    ,r1        ; this time do this set of numbers
  1323.     call    ct.n20            ; display some data
  1324.     cmp    r1    ,#37        ; is it time to do DEL?
  1325.     bne    20$            ; not yet
  1326.     inc    r2            ; bump to chr$(177)'s flag location
  1327.     add    #140    ,r1        ; label it correctly
  1328.     call    ct.num            ; display the data
  1329.     sub    #140    ,r1        ; restore label reg
  1330.     dec    r2            ; restore ctlflgs index
  1331.     br    30$            ; and continue
  1332. 20$:    wrtall    #sh.128            ; 9 spaces for display formatting
  1333. 30$:    add    #21    ,r2        ; bump to next location for the row
  1334.     add    #160    ,r1        ; bump the char name label reg too
  1335.     call    ct.n20            ; display some data
  1336.     cmp    r1    ,#237        ; done them all yet?
  1337.     bne    40$            ; no
  1338.     mov    #ctlflgs,r2        ; top of the control chars flags list
  1339.     mov    #377    ,r1        ; load the appropriate label
  1340.     call    ct.num            ; display the data
  1341. 40$:    .newline
  1342.     inc    r3            ; bump the ctlflgs index
  1343.     inc    r4            ; and the control char value reg
  1344.     sob    r5    ,10$        ; next..
  1345.     return
  1346.  
  1347. ct.n20:    call    ct.num            ; display some data then
  1348.     add    #20    ,r2        ; bump to the next columns
  1349.     add    #20    ,r1        ; and do it again..
  1350. ct.num:    deccvt    r1 ,#spare1 ,#5        ; convert integer to decimal number
  1351.     clrb    spare1+5        ; null terminate
  1352.     wrtall    #spare1            ; display it
  1353.     wrtall    #sh.127            ; ": "
  1354.     movb    (r2)    ,r0        ; copy the state
  1355.     call    L10266            ; display it as a number
  1356.     mov    #space    ,r0        ; a trailing space
  1357.     call    writ1char        ; dump it to tt
  1358.     return
  1359.  
  1360.  
  1361.     .sbttl    COPY, DELETE, PRINT, RENAME     ; /BBS/ heavily hacked..
  1362.     .enabl    lsb
  1363.  
  1364. c$copy::upcase    argbuf            ; upper case all args
  1365.     call    gettwo            ; ensure the "to:" argument is here
  1366.     tst    r0            ; did it work out ok?
  1367.     bne    30$            ; /63/ nope..
  1368.     upcase    argbuf            ; /62/ in case from kybd "To:" prompt
  1369.     br    c.print            ; /63/
  1370.  
  1371. c$del::    upcase    argbuf            ; upper case the argument
  1372.     calls    delete    ,<argbuf>    ; try to delete the file
  1373.     tst    r0            ; did it work?
  1374.     bne    40$            ; /63/ no
  1375.     tst    infomsg            ; SET TT QUIET?
  1376.     beq    30$            ; /63/ ya, skip result message
  1377.     wrtall    #srcnam            ; no wildcarding
  1378.     wrtall    #sh.130            ; /63/ simplifies things
  1379.     br    20$
  1380.  
  1381. c$rena::upcase    argbuf            ; upper case all args
  1382.     call    gettwo            ; ensure a "to:" argument is here
  1383.     tst    r0            ; did it work out ok?
  1384.     bne    30$            ; /63/ no
  1385.     upcase    argbuf            ; /62/ in case from kybd "To:" prompt
  1386.     calls    rename    ,<cmdbuf,argbuf> ; do the rename now
  1387.     tst    r0            ; did it work?
  1388.     bne    40$            ; /63/ no
  1389.     tst    infomsg            ; SET TT QUIET?
  1390.     beq    30$            ; /63/ ya, skip result message
  1391.     wrtall    #srcnam            ; no wildcarding
  1392.     wrtall    #sh.129            ; /63/ simplifies
  1393. 10$:    wrtall    #filnam            ; things
  1394. 20$:    .newline
  1395.     clr    r0            ; /63/ no error
  1396. 30$:    return
  1397. 40$:    direrr    r0            ; handle error
  1398.     return
  1399.  
  1400. c$prin::upcase    argbuf            ; upper case all args
  1401.     strcpy    cmdbuf    ,argbuf        ; /62/ and put input file name here
  1402.     scan    #'.    ,cmdbuf        ; is there a dot in the name?
  1403.     tst    r0
  1404.     bne    50$            ; ya..
  1405.     strcat    cmdbuf    ,#typdef    ; no, add .LST to it
  1406. 50$:    strcpy    argbuf    ,#pridev    ; /63/ make LP: the output device
  1407.     .br    c.print            ; /63/
  1408.  
  1409. c.print:mov    argbuf    ,r2        ; save a few bytes, use a reg
  1410.     mov    rawfil    ,-(sp)        ; save current setting
  1411.     clr    rawfil            ; enable namcvt
  1412.     calls    namcvt    ,<r2,#spare1>    ; extract "file.typ"
  1413.     tstb    spare1            ; anything left?
  1414.     bne    60$            ; ya, continue
  1415.     calls    namcvt    ,<cmdbuf,#spare1> ; no, get input "file.typ"
  1416.     strcat    r2    ,#spare1    ; concat input_file_name to output_dev
  1417. 60$:    mov    (sp)+    ,rawfil        ; back to where it wuz..
  1418.     calls    fparse    ,<cmdbuf,#srcnam> ; /62/ get attrs here as lookup is
  1419.     clr    index            ; /62/ in another overlay  init index
  1420.     calls   lookup  ,<#srcnam,#spare1> ; /62/ load input file attributes
  1421.     .purge    #lun.sr            ; /62/ dump lookup channel
  1422.     calls    copy    ,<cmdbuf,r2>    ; do the copy now
  1423.     tst    r0            ; did it work?
  1424.     bne    40$            ; no
  1425.     tst    infomsg            ; SET TT QUIET?
  1426.     beq    30$            ; /63/ ya, skip result message
  1427.     mov    r1    ,r0        ; print the
  1428.     call    L10266            ; block count
  1429.     wrtall    #sh.131            ; /63/ and a header
  1430.     dec    r1            ; how many blocks were moved?
  1431.     beq    70$            ; had to be just one, skip "s"
  1432.     wrtall    #sh.118            ; /63/ not 1, this "s" makes it plural
  1433. 70$:    wrtall    #sh.132            ; /63/ then do the next part of log
  1434.     jmp    10$            ; /63/ message and where it went
  1435.  
  1436.     .dsabl    lsb
  1437.  
  1438.  
  1439.     .sbttl    Get second argument for a command
  1440.     .enabl    lsb
  1441.  
  1442. ;    input:    argbuf    = command args
  1443. ;    output:    cmdbuf    = first arg
  1444. ;        argbuf    = second arg
  1445. ;         r0    = if <>, error code
  1446.  
  1447.     CVTARG    = C.CRLF ! C.LSPA ! C.SSPA ! C.TSPA ; /62/ don't upper case
  1448.  
  1449. gettwo::save    <r1,r2>
  1450.     mov    argbuf    ,r2        ; point to the argument buffer
  1451.     tstb    @r2            ; anything there (should be)?
  1452.     beq    40$            ; no
  1453.     dec    r2            ; ya, init so following loop runs..
  1454. 10$:    inc    r2            ; next byte
  1455.     tstb    @r2            ; We have to finish parsing this
  1456.     beq    20$            ; end of it, prompt for "To:"
  1457.     cmpb    @r2    ,#space        ; find a space yet?
  1458.     bne    10$            ; no
  1459.     clrb    (r2)+            ; yes, make it .asciz
  1460.     strcpy    cmdbuf    ,argbuf        ; /62/ save the first part of the arg
  1461.     strcpy    argbuf    ,r2        ; /62/ return arg number two in argbuf
  1462.     br    30$            ; got old and new so we are all set
  1463.  
  1464. 20$:    mov    argbuf    ,r2        ; where the "to:" arg will be read in
  1465.     strcpy    cmdbuf    ,r2        ; /62/ save old arg as first part
  1466.     calls    readcmd    ,<r2,#sh.133>    ; /63/ use SL editor..
  1467.     tst    r0            ; did it work?
  1468.     bne    40$            ; /62/ no
  1469.     calls    cvt$$    ,<r2,r1,#cvtarg> ; /62/ don't upper case it yet!
  1470.     tst    r0            ; anything left?
  1471.     beq    20$            ; no
  1472.     add    r2    ,r0        ; yes, point to end
  1473.     clrb    @r0            ; and make it .asciz
  1474. 30$:    clr    r0            ; no errors please
  1475. 40$:    unsave    <r2,r1>
  1476.     return
  1477.  
  1478.     .dsabl    lsb
  1479.  
  1480.     .end
  1481.