home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / test / pdp11 / krtsho.mac < prev    next >
Text File  |  1996-10-17  |  48KB  |  1,552 lines

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