home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume16 / ecuman3 / part02 < prev    next >
Internet Message Format  |  1991-01-05  |  57KB

  1. From: wht@n4hgf (Warren Tucker)
  2. Newsgroups: comp.sources.misc
  3. Subject: v16i023:  ECU async comm package rev 3.0 manual, Part02/03
  4. Message-ID: <1991Jan5.062356.3920@sparky.IMD.Sterling.COM>
  5. Date: 5 Jan 91 06:23:56 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: dbd43e1b 8d1eeb1a 18ff3f10 57e213dd
  8.  
  9. Submitted-by: Warren Tucker <wht@n4hgf>
  10. Posting-number: Volume 16, Issue 23
  11. Archive-name: ecuman3/part02
  12.  
  13. ---- Cut Here and feed the following to sh ----
  14. #!/bin/sh
  15. # this is ecuman3.02 (part 2 of ecuman3)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file doc/ecu.man continued
  18. #
  19. if touch 2>&1 | fgrep 'amc' > /dev/null
  20.  then TOUCH=touch
  21.  else TOUCH=true
  22. fi
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 2; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. echo 'x - continuing file doc/ecu.man'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'doc/ecu.man' &&
  37. X    cycle to the next entry or abort the cycle.
  38. X
  39. X    If no entries are marked for redial, the current, highlighted directory
  40. X    entry is used for dialing.
  41. X
  42. X    To unmark a    single entry, press 'M'    (uppercase M).    To unmark all
  43. X    entries, press 'U'.
  44. X
  45. X
  46. X    4.7.3  Automatic Login Procedure
  47. X
  48. X    Upon dialing from the menu,    if a procedure file can    be found in the
  49. X    current directory or the users home    .ECU subdirectory whose    name matches
  50. X    the    logical    name, then the procedure is executed with the argument
  51. X    '!MENU'.  It is the    responsibility of the automatically executed
  52. X    procedure to establish connection with the remote system (by using the
  53. X    procedure dial command).  An example of an automatic login procedure can
  54. X    be found in    the distribution subdirectory 'models' named 'sysname.ep'.
  55. X    A companion    procedure is 'unixlogin.ep'.
  56. X
  57. X    For    example,
  58. X
  59. X    | entry name | telephone number | tty | baud P | ...
  60. X    | sysname     | 555-1234        | Any | 2400 N | ...
  61. X
  62. X
  63. X
  64. X
  65. X
  66. X
  67. X
  68. X
  69. X
  70. X
  71. X
  72. X
  73. X
  74. X
  75. X
  76. X
  77. X
  78. X
  79. X
  80. X
  81. X
  82. X
  83. X
  84. X    Public Domain by wht@n4hgf                12/26/90
  85. X
  86. X
  87. X
  88. X
  89. X
  90. X
  91. X
  92. X    ECU    Technical Description                      30
  93. X
  94. X
  95. X
  96. X    #-----------------------------------------------------------
  97. X    # sysname.ep - procedure to    call UNIX-like system 'sysname'
  98. X    #
  99. X    # CONFIDENTIAL - This function should be chmod 0600    because
  100. X    # it contains a password which you probably    don't want to be
  101. X    # common knowledge.
  102. X    #
  103. X    # This procedure calls 'unixlogin.ep' to do    the hard work.
  104. X    #-----------------------------------------------------------
  105. X
  106. X    mkvar $s_pwd(20)    # local variable preserves password
  107. X    $s_pwd = 'password' # security by disappearing when the
  108. X                # procedure    terminates
  109. X
  110. X    #    also, by keeping the password text off the following line,
  111. X    #    the password will not be displayed if you abort    (interrupt)
  112. X    #    the procedure
  113. X
  114. X    do 'unixlogin' %argv(0)    'username' $s_pwd 'ansi-or-whatever'
  115. X
  116. X
  117. X
  118. X    4.8     DO : perform procedure
  119. X
  120. X    usage: do <procname> [<arg>    ... ]
  121. X
  122. X
  123. X    Perform ECU    procedure.  Ecu    searches for <procname>.ep in the current
  124. X    directory.    If the file is not found, the program looks for    the file in
  125. X    the    ~/.ECU directory.  One or more arguments may be    passed to the
  126. X    procedure.    Arguments aare made available in the called procedure by use
  127. X    of the %argc integer function and %argv string function.
  128. X
  129. X    Unlike arguments to    the do procedure command, arguments to the do
  130. X    interactive    command    are not    quoted and may not contain embedded spaces
  131. X    or tabs.
  132. X
  133. X
  134. X
  135. X    4.9     DUplex    : set/display duplex
  136. X
  137. X    usage: duplex [ Full | Half    ]
  138. X
  139. X
  140. X    This command specifies whether or not ECU is to locally echo characters
  141. X    typed by you at the    keyboard.  The overwhelming majority of    remote
  142. X    systems provide the    echo function, in which    case full duplex must be
  143. X    used.  For the rare    occasions when the remote system does not echo your
  144. X    keyboard input, setting half duplex    will allow you to see what you are
  145. X    typing.
  146. X
  147. X
  148. X
  149. X
  150. X    Public Domain by wht@n4hgf                12/26/90
  151. X
  152. X
  153. X
  154. X
  155. X
  156. X
  157. X
  158. X    ECU    Technical Description                      31
  159. X
  160. X
  161. X
  162. X    When communicating with another terminal in    a "teletype conversation",
  163. X    setting half duplex    is generally required.    In such    cases, use of the
  164. X    nl,    nlin and nlout commands    may also be required.
  165. X
  166. X    The    default    setting    for duplex is full.
  167. X
  168. X
  169. X
  170. X    4.10  EXit : drop carrier, exit program
  171. X
  172. X    usage: exit
  173. X
  174. X
  175. X    This command terminates ECU    promptly.  If your modem does not drop
  176. X    carrier upon loss of Data Terminal Ready (DTR), the    command    will
  177. X    terminate ECU, but may leave the communications line off hook.  It is
  178. X    strongly recommended that you configure your modem to hang up the phone
  179. X    line when DTR drops.  A shorthand version of this command exists: '.' is
  180. X    equivalent to exit.
  181. X
  182. X
  183. X
  184. X    4.11  FI : send text file to line
  185. X
  186. X    usage: fi [<filename>]
  187. X
  188. X
  189. X    "file insert": This    command    causes file characters to be inserted into
  190. X    the    transmit data stream as    though they had    been entered at    the
  191. X    keyboard.  No error    correction is provided,    although XON/XOFF flow
  192. X    control is obeyed.
  193. X
  194. X    If <filename> is not entered on the    command    line, a    prompt for the
  195. X    filename is    made.  Once the    filename has been entered and file has been
  196. X    opened, you    are asked whether the file should be transmitted at full
  197. X    speed, by "echo pacing" or by a single line    at a time.  You    may also
  198. X    append an 'f', 'e' or 's' argument to the command line.
  199. X
  200. X    If your remote can tolerate    it, full speed transmission is the fastest.
  201. X    Some systems are not capable of receiving large amount of data
  202. X    ("streaming    data") without pauses.    Even with "full" speed transmission,
  203. X    some "pacing" (inter-character delay) is introduced    to ease    loading    on
  204. X    the    remote system.    Pressing the interrupt key (DEL) stops a full speed
  205. X    transmission.
  206. X
  207. X    By specifying echo pacing, it is possible to increase the likelihood of
  208. X    proper receipt.  Echo pacing reads the return data stream to attempt to
  209. X    keep from overloading the remote.  Pressing    the interrupt key (DEL)
  210. X    stops an echo paced    transmission.
  211. X
  212. X    As a last resort, if echo pacing is    not working for    you, (i.e., you    are
  213. X
  214. X
  215. X
  216. X    Public Domain by wht@n4hgf                12/26/90
  217. X
  218. X
  219. X
  220. X
  221. X
  222. X
  223. X
  224. X    ECU    Technical Description                      32
  225. X
  226. X
  227. X
  228. X    using the command in an environment    where the remote does not echo your
  229. X    characters), single    line at    a time transmission is available.  With
  230. X    "single" line transmission,    you must press the space key to    initiate
  231. X    sending each line.    Pressing the 'ESC' or 's' key stops the    transfer.
  232. X
  233. X
  234. X    4.12  FKey : function key definition
  235. X
  236. X    usage: fkey    [<keyset_name>]
  237. X
  238. X
  239. X    This command allows    the mapping of function    keys F1-F12, PgUp, PgDn, End
  240. X    and    Ins and    the cursor up, down, left and right keys to emit a desired
  241. X    sequence of    characters when    a function key is pressed.  <keyset_name>
  242. X    specifies which key    set in ~/.ecu/keys is to be selected. Sample entry:
  243. X
  244. X     hayes
  245. X         F1:escape:+ + +
  246. X         F2:autoans:A T S 0    = 1 cr
  247. X         F3:dial:A T D T
  248. X     bbs
  249. X         F1:cancel:^K
  250. X         F2:yes:y cr
  251. X
  252. X
  253. X    If a keyset_name matches a logical dial directory name, it is loaded
  254. X    when the number is dialed.
  255. X
  256. X    The    characters in the mapped string    may be any printable character or
  257. X    one    of the following:
  258. X
  259. X     map ->    character    map -> character
  260. X     ---    -----------    ---    ------------
  261. X     nul    0 000 00 ^@  |    dle    16 020 10 ^P
  262. X     soh    1 001 01 ^A  |    dc1    17 021 11 ^Q
  263. X     stx    2 002 02 ^B  |    dc2    18 022 12 ^R
  264. X     etx    3 003 03 ^C  |    dc3    19 023 13 ^S
  265. X     eot    4 004 04 ^D  |    dc4    20 024 14 ^T
  266. X     enq    5 005 05 ^E  |    nak    21 025 15 ^U
  267. X     ack    6 006 06 ^F  |    syn    22 026 16 ^V
  268. X     bel    7 007 07 ^G  |    etb    23 027 17 ^W
  269. X     bs    8 010 08 ^H  |    can    24 030 18 ^X
  270. X     ht    9 011 09 ^I  |    em     25 031 19 ^Y
  271. X     nl    10 012 0a ^J  |    sub    26 032 1a ^Z
  272. X     vt    11 013 0b ^K  |    esc    27 033 1b ^[
  273. X     ff    12 014 0c ^L  |    fs     28 034 1c ^(
  274. X     cr    13 015 0d ^M  |    gs     29 035 1d ^]
  275. X     so    14 016 0e ^N  |    rs     30 036 1e ^^
  276. X     si    15 017 0f ^O  |    us     31 037 1f ^_
  277. X
  278. X
  279. X
  280. X
  281. X
  282. X    Public Domain by wht@n4hgf                12/26/90
  283. X
  284. X
  285. X
  286. X
  287. X
  288. X
  289. X
  290. X    ECU    Technical Description                      33
  291. X
  292. X
  293. X
  294. X    4.13  HAngup : hang    up modem
  295. X
  296. X    usage: hangup
  297. X
  298. X
  299. X    This causes    DTR to be momentarily interrupted, terminating any
  300. X    outstanding    connection.  Your DCE (modem) must be able to drop carrier
  301. X    upon loss of DTR.
  302. X
  303. X
  304. X    4.14  HElp : invoke    help
  305. X
  306. X    usage: help    [<cmd-name>]
  307. X
  308. X
  309. X    Issuing this command with no argument displays a list of commands
  310. X    followed by    a request for a    command    for further information.
  311. X
  312. X
  313. X    4.15  LLp :    set session log    to /dev/lp
  314. X
  315. X    usage: llp
  316. X
  317. X
  318. X    This command is a shorthand    version    of 'log    /dev/lp'.  /dev/lp must    not
  319. X    be under the control of a print spooler.
  320. X
  321. X
  322. X    4.16  LOFf : turn off session logging
  323. X
  324. X    usage: loff
  325. X
  326. X
  327. X    This command is shorthand for 'log off'.  If session logging is active,
  328. X    it is turned off.
  329. X
  330. X
  331. X    4.17  LOG :    session    logging    control
  332. X
  333. X    usage: log [-s] [-r] [ | off | filename ]
  334. X    -s "scratch" previous file contents; otherwise append
  335. X    -r "raw" logging; otherwise non-printable characters
  336. X        other than tab and newline are omitted from    the log
  337. X
  338. X
  339. X    This command controls session logging; issuing the command with no
  340. X    argument causes the    status of session logging to be    displayed.  The
  341. X    special argument 'off' causes active logging to be terminated.  Other
  342. X    argument values cause logging to start using the argument as a filename.
  343. X    Issuing a log command with a filename when logging is already active
  344. X    causes the previous    file to    be closed and the new file to be opened.
  345. X
  346. X
  347. X
  348. X    Public Domain by wht@n4hgf                12/26/90
  349. X
  350. X
  351. X
  352. X
  353. X
  354. X
  355. X
  356. X    ECU    Technical Description                      34
  357. X
  358. X
  359. X
  360. X    Switches are meaningful only when used in conjunction with a filename to
  361. X    start logging.
  362. X
  363. X
  364. X
  365. X    4.18  NL : display CR/LF mapping
  366. X
  367. X    usage: nl
  368. X
  369. X
  370. X    Display the    current    setting    of CR/LF mapping.  For more information,
  371. X    refer to the nlin and nlout    command    descriptions.
  372. X
  373. X
  374. X
  375. X    4.19  NLIn : set receive CR/LF mapping
  376. X
  377. X    usage: nlin    [<y-n>]
  378. X
  379. X
  380. X    This command controls whether or not a newline (NL/LF) character is    sent
  381. X    to the screen upon receipt of a carriage return (CR) from the remote
  382. X    system.  Most remote computers supply a NL after CR.  When communicating
  383. X    with another terminal in a "teletype conversation",    this is    generally
  384. X    not    the case (see also the duplex command).
  385. X
  386. X    Issuing the    command    without    <y-n> causes the current setting to be
  387. X    displayed.    The format of <y-n> is flexible: 'y' or    '1' enables
  388. X    appending NL to CR,    'n' or '0' causes the feature to be disabled.
  389. X
  390. X
  391. X
  392. X    4.20  NLOut    : set transmit CR/LF mapping
  393. X
  394. X    usage: nlout [<y-n>]
  395. X
  396. X
  397. X    This command controls whether or not a newline (NL/LF) character is    sent
  398. X    to the remote system upon transmission of a    carriage return    (CR) entered
  399. X    by the keyboard.  Most remote computers do not require (indeed
  400. X    "dislike") a NL after CR.  When communicating with another terminal    in a
  401. X    "teletype conversation", this is generally not the case (see also the
  402. X    duplex command).
  403. X
  404. X    Issuing the    command    without    <y-n> causes the current setting to be
  405. X    displayed.    The format of <y-n> is flexible: 'y' or    '1' enables
  406. X    appending NL to CR,    'n' or '0' causes the feature to be disabled.
  407. X
  408. X
  409. X
  410. X
  411. X
  412. X
  413. X
  414. X    Public Domain by wht@n4hgf                12/26/90
  415. X
  416. X
  417. X
  418. X
  419. X
  420. X
  421. X
  422. X    ECU    Technical Description                      35
  423. X
  424. X
  425. X
  426. X    4.21  OA : octal to    ascii char
  427. X
  428. X    usage: oa [<octal-val>]
  429. X
  430. X
  431. X    <octal-val>    is a octal value between 0 and 0377; the parity    (sign) bit
  432. X    is stripped    and the    equivalent ASCII character value is displayed.
  433. X
  434. X    If no argument is supplied,    a table    of control characters is printed
  435. X    containing decimal,    octal, hex, ASCII identifiers and two-character
  436. X    control character identifier.
  437. X
  438. X
  439. X
  440. X    4.22  PARity : set/display line parity
  441. X
  442. X    usage: parity [ None | Even    | Odd ]
  443. X
  444. X
  445. X    This command controls the parity of    characters transmitted by the
  446. X    keyboard.  Issuing the command with    no argument displays the current
  447. X    setting.  When the argument    is supplied, only the first character is
  448. X    required.  Even or odd parity implies seven    data bits; no parity implies
  449. X    eight data bits.  Parity of    incoming characters is not checked.
  450. X
  451. X    The    setting    may be automatically changed as    the result of an interactive
  452. X    or procedure dial command.    See the    baud and dial command descriptions.
  453. X
  454. X
  455. X
  456. X    4.23  PId :    display    process    ids
  457. X
  458. X    usage: pid
  459. X
  460. X
  461. X    This command displays the process id of the    ECU transmitter    process, the
  462. X    ECU    receiver process and the process ids of    ECU's parent and group.
  463. X
  464. X
  465. X    4.24  PLog : procedure logging
  466. X
  467. X    usage: plog    [ <filename> | off]
  468. X
  469. X
  470. X    This command enables or disbles procedure logging.
  471. X
  472. X
  473. X
  474. X
  475. X
  476. X
  477. X
  478. X
  479. X
  480. X    Public Domain by wht@n4hgf                12/26/90
  481. X
  482. X
  483. X
  484. X
  485. X
  486. X
  487. X
  488. X    ECU    Technical Description                      36
  489. X
  490. X
  491. X
  492. X    4.25  PTrace : control procedure trace
  493. X
  494. X    usage: ptrace [ 0 |    1 | on | off]
  495. X
  496. X
  497. X    This command controls whether or not procedure execution is    to be
  498. X    traced. Trace output is written to the screen and varys in its nature
  499. X    depending upon the command being traced.  Specifically, any    change to a
  500. X    string or integer variable is noted.  If tracing is    enabled, the output
  501. X    will also be written to the    procedure log file (see    the interactive    and
  502. X    procedure commands).  Issuing the command with no argument shows current
  503. X    status.
  504. X
  505. X
  506. X    4.26  PWd :    print working directory
  507. X
  508. X    usage: pwd
  509. X
  510. X
  511. X    This command prints    the current working directory of the ECU process.
  512. X
  513. X
  514. X
  515. X    4.27  REDial : redial last number
  516. X
  517. X    usage: redial [<retry-count> [<pause-interval>]]
  518. X
  519. X
  520. X    This command redials a number previously dialed with the 'dial' command.
  521. X    Modem status is tested and multiple    retries    may be made.  <retry-count>
  522. X    specifies how many retries are to be made.    <pause-interval> specifies
  523. X    how    many seconds the program pauses    after a    failure    to connect.  You
  524. X    must specify <retry-count> in order    to specify <pause-interval>.  The
  525. X    default value for <retry-count> is 10, for <pause-interval>    is 60.
  526. X
  527. X    You    should know that in some jurisdictions,    it is ILLEGAL to dial the
  528. X    same telephone number more than a specified    number of times    during some
  529. X    interval of    time.  In any case, a <pause-interval> less than 15 seconds
  530. X    is silently    changed    to 15 seconds.
  531. X
  532. X
  533. X    4.28  REV :    ECU revision/make date
  534. X
  535. X    usage: rev
  536. X
  537. X
  538. X    This command displays ECU's    revision, the transmitter process id' and
  539. X    the    date and time ECU was made.
  540. X
  541. X
  542. X
  543. X
  544. X
  545. X
  546. X    Public Domain by wht@n4hgf                12/26/90
  547. X
  548. X
  549. X
  550. X
  551. X
  552. X
  553. X
  554. X    ECU    Technical Description                      37
  555. X
  556. X
  557. X
  558. X    4.29  RK : receive via C-Kermit
  559. X
  560. X    usage: rk
  561. X
  562. X
  563. X    This command searches the PATH list    for 'ckermit' (Columbia    University
  564. X    C-Kermit) and invokes it to    receive    files.
  565. X
  566. X    The    file ~/.kermrc must be set up to have any desired initialization
  567. X    paraeters you desire.  Refer to C-Kermit documentation for more
  568. X    information.
  569. X
  570. X
  571. X
  572. X    4.30  RS : receive via SEAlink
  573. X
  574. X    usage: rs
  575. X
  576. X
  577. X    This command invokes a SEAlink receive protocol.
  578. X
  579. X
  580. X    4.31  RTScts : control RTS/CTS flow    control
  581. X
  582. X    usage: rtscts [ off| on | no | yes | 0 | 1 | 2 | 3 ]
  583. X
  584. X
  585. X    This command controls the RTS/CTS flow control feature of the SCO
  586. X    UNIX/XENIX line driver (which may or may not work).     If no argument    is
  587. X    supplied, the current setting is displayed.     Specifying 0 or n disables
  588. X    the    facility; 1 or y causes    RTS/CTS    flow control to    be enabled.
  589. X
  590. X    What the command does is to    manipulate the RTSFLOW and CTSFLOW bits    of
  591. X    the    termio c_cflag word (see termio(S)).
  592. X
  593. X
  594. X     argument | RTSFLOW | CTSFLOW
  595. X     ---------+---------+---------
  596. X       off      |   0        |    0
  597. X       on      |   1        |    1
  598. X       no      |   0        |    0
  599. X       yes      |   1        |    1
  600. X       0      |   0        |    0
  601. X       1      |   1        |    1
  602. X       2      |   1        |    0
  603. X       3      |   0        |    1
  604. X
  605. X
  606. X
  607. X
  608. X
  609. X
  610. X
  611. X
  612. X    Public Domain by wht@n4hgf                12/26/90
  613. X
  614. X
  615. X
  616. X
  617. X
  618. X
  619. X
  620. X    ECU    Technical Description                      38
  621. X
  622. X
  623. X
  624. X    4.32  RX : receive via XMODEM/CRC
  625. X
  626. X    usage: rx
  627. X
  628. X
  629. X    This command invokes ecurz to receive files    from the remote    system using
  630. X    XMODEM/CRC.
  631. X
  632. X    After entering the command,    you are    prompted as to whether or not file
  633. X    CR/LF characters are to be converted to newlines.  If you are
  634. X    transferring text files from a system which    contain    CR/LF line
  635. X    terminators, you must answer yes to    this question.    You should answer no
  636. X    when transferring binary files, such as executables, .arc files and    the
  637. X    like.  File    transfer progress is presented on a visual display.  To
  638. X    abort the transfer,    press your interrupt key (usually DEL unless reset
  639. X    with stty(C)).
  640. X
  641. X
  642. X
  643. X    4.33  RY : receive via YMODEM Batch
  644. X
  645. X    usage: ry
  646. X
  647. X
  648. X    This command invokes ecurz to receive files    from the remote    system using
  649. X    YMODEM batch with CRC-16 error correction.    The YMODEM is "true YMODEM",
  650. X    not    XMODEM-1k.  File transfer progress is presented    on a visual display.
  651. X    To abort the transfer, press your interrupt    key (usually DEL unless
  652. X    reset with stty(C)).
  653. X
  654. X
  655. X
  656. X    4.34  RZ : receive via ZMODEM/CRC32
  657. X
  658. X    usage: rz
  659. X
  660. X
  661. X    This command invokes ecurz to receive files    from the remote    system using
  662. X    ZMODEM/CRC32.  File    transfer progress is presented on a visual display.
  663. X    To abort the transfer, press your interrupt    key (usually DEL unless
  664. X    reset with stty(C)).
  665. X
  666. X
  667. X
  668. X    4.35  SDNAME : select screen dump file name
  669. X
  670. X    usage: sdname [<filename>]
  671. X
  672. X
  673. X    When the "cursor 5"    key is pressed,    the screen contents are    dumped to a
  674. X    file.  By default, this file is named '~/.ecu/screen.dump'.     This
  675. X
  676. X
  677. X
  678. X    Public Domain by wht@n4hgf                12/26/90
  679. X
  680. X
  681. X
  682. X
  683. X
  684. X
  685. X
  686. X    ECU    Technical Description                      39
  687. X
  688. X
  689. X
  690. X    command either displays or changes the current screen dump file name,
  691. X    depending upon whether or not a argument is    supplied.
  692. X
  693. X    The    actions    of this    command    have no    effect on the operation    of the
  694. X    procedure command.
  695. X
  696. X    See    the section titled "Screen Dump" for more information.
  697. X
  698. X
  699. X    4.36  SK : send via    C-Kermit
  700. X
  701. X    usage: sk [<file-list>]
  702. X
  703. X
  704. X    This command searches the PATH list    for 'ckermit' (Columbia    University
  705. X    C-Kermit) and invokes it to    send files.  The file ~/.kermrc    must be    set
  706. X    up to have any desired initialization paraeters you    desire.
  707. X
  708. X    After entering the command,    you are    prompted as to whether or not file
  709. X    newline characters are to be converted to CR/LF.  If you are
  710. X    transferring text files to a system    which requires CR/LF line
  711. X    terminators, you must answer yes to    this question.    You should answer no
  712. X    when transferring binary files, such as executables, .arc files and    the
  713. X    like.  You are prompted to enter a list of files to    send, which may
  714. X    contain one    or more    wildcard specifications.
  715. X
  716. X    The    file ~/.kermrc must be set up to have any desired initialization
  717. X    arguments you desire.  Refer to C-Kermit documentation for more
  718. X    information.
  719. X
  720. X
  721. X
  722. X    4.37  SS : send via    SEAlink
  723. X
  724. X    usage: ss [<file-list>]
  725. X
  726. X
  727. X    This command invokes a SEAlink file    transmission protocol.
  728. X
  729. X
  730. X     .--[ Send SEAlink ]-------- dir: /u1/src/ecu ------------------.
  731. X     |                                    |
  732. X     |    File(s)    to send:                        |
  733. X     |    ___________________________________________________________ |
  734. X     |                                    |
  735. X     |      TAB:next  ^B:prev  END:perform transfer  ESC:abort        |
  736. X     `-- enter file(s) to send -------------------------------------'
  737. X
  738. X
  739. X
  740. X
  741. X
  742. X
  743. X
  744. X    Public Domain by wht@n4hgf                12/26/90
  745. X
  746. X
  747. X
  748. X
  749. X
  750. X
  751. X
  752. X    ECU    Technical Description                      40
  753. X
  754. X
  755. X
  756. X    4.38  STat : connection status
  757. X
  758. X    usage: stat
  759. X
  760. X
  761. X    This command displays statistics about ECU usage.  Example display:
  762. X
  763. X    Date/time: 06-14-1988 11:40:35 (UTC    15:40)
  764. X    Total chars    transmitted: 178
  765. X    Total chars    received:    3681
  766. X
  767. X    Date/time: 06-14-1988 14:41:24 (UTC    18:41)
  768. X    Connected to CompuHost (555-1234) at 14:40:57
  769. X    Parameters:    2400-N-1 Connect time: 00:01:27
  770. X    Total chars    transmitted: 234 (since    CONNECT    142)
  771. X    Total chars    received:    2278 (since CONNECT 1478)
  772. X
  773. X
  774. X
  775. X    4.39  SX : send via    XMODEM/CRC
  776. X
  777. X    usage: sx [<file-name>]
  778. X
  779. X
  780. X    This command invokes ecusz to send a file to the remote system using
  781. X    XMODEM/CRC.
  782. X
  783. X    After entering the command,    you are    prompted as to whether or not file
  784. X    CR/LF characters are to be converted to newlines.  If you are
  785. X    transferring text files from a system which    contain    CR/LF line
  786. X    terminators, you must answer yes to    this question.    You should answer no
  787. X    when transferring binary files, such as executables, .arc files and    the
  788. X    like.
  789. X
  790. X    You    are prompted to    enter a    filename to send.  File    transfer progress is
  791. X    presented on a visual display.  To abort the transfer, press your
  792. X    interrupt key (usually DEL unless reset with stty(C)).
  793. X
  794. X     .--[ Send XMODEM/CRC ]----- dir: /u1/src/ecu -----------.
  795. X     |                                 |
  796. X     |    File to    send:                         |
  797. X     |    ____________________________________________________ |
  798. X     |                                 |
  799. X     |    Binary:    Y (no NL-CR/LF translation)             |
  800. X     |                                 |
  801. X     |     TAB:next  ^B:prev  END:perform    transfer  ESC:abort  |
  802. X     `-- enter file(s) to send ------------------------------'
  803. X
  804. X
  805. X
  806. X
  807. X
  808. X
  809. X
  810. X    Public Domain by wht@n4hgf                12/26/90
  811. X
  812. X
  813. X
  814. X
  815. X
  816. X
  817. X
  818. X    ECU    Technical Description                      41
  819. X
  820. X
  821. X
  822. X    4.40  SY : send via    YMODEM Batch
  823. X
  824. X    usage: sy [<file-list>]
  825. X
  826. X
  827. X    This command invokes ecusz to send file(s) to the remote system using
  828. X    YMODEM/CRC.
  829. X
  830. X    You    are prompted to    enter filename(s) to send, which may consist of    one
  831. X    or more wildcard specifications.  File transfer progress is    presented on
  832. X    a visual display.  To abort    the transfer, press your interrupt key
  833. X    (usually DEL unless    reset with stty(C)).
  834. X
  835. X     .--[ Send YMODEM/CRC ]----- dir: /u1/src/ecu -----------.
  836. X     |                                 |
  837. X     |    File to    send:                         |
  838. X     |    ____________________________________________________ |
  839. X     |                                 |
  840. X     |    Binary:    Y (no NL-CR/LF translation)             |
  841. X     |                                 |
  842. X     |     TAB:next  ^B:prev  END:perform    transfer  ESC:abort  |
  843. X     `-- enter file(s) to send ------------------------------'
  844. X
  845. X
  846. X
  847. X    4.41  SZ : send via    ZMODEM/CRC32
  848. X
  849. X    usage: sz [<file-list>]
  850. X
  851. X
  852. X    This command invokes ecusz to send file(s) to the remote system using
  853. X    ZMODEM/CRC32.
  854. X
  855. X    You    are prompted to    enter filename(s) to send, which may consist of    one
  856. X    or more wildcard specifications.  File transfer progress is    presented on
  857. X    a visual display.  To abort    the transfer, press your interrupt key
  858. X    (usually DEL unless    reset with stty(C)).
  859. X
  860. X    Note: if you specify sending only newer files and the remote receiver
  861. X    does not support the feature, it may skip (reject) all your    files.
  862. X    Retry the transfer specifying 'N' to 'Transfer only    newer files'.
  863. X
  864. X
  865. X
  866. X
  867. X
  868. X
  869. X
  870. X
  871. X
  872. X
  873. X
  874. X
  875. X
  876. X    Public Domain by wht@n4hgf                12/26/90
  877. X
  878. X
  879. X
  880. X
  881. X
  882. X
  883. X
  884. X    ECU    Technical Description                      42
  885. X
  886. X
  887. X
  888. X    |                                     |
  889. X    |  File(s) to send:                             |
  890. X    |  ckermit-5a-130                             |
  891. X    |                                     |
  892. X    |  Binary: Y (no NL-CR/LF translation)                 |
  893. X    |  Overwrite destination files: Y                     |
  894. X    |  Send full pathames:  N                         |
  895. X    |  Transfer    only newer files: N                     |
  896. X    |                                     |
  897. X    |      TAB:next  ^B:prev  END:perform transfer  ESC:abort         |
  898. X    `--    enter file(s) to send ---------------------------------------'
  899. X    `--    Y: no conversion, N: NLs converted to CR/LF -----------------'
  900. X    `--    Y: overwrite, N: protect destination files ------------------'
  901. X    `--    Y: full    pathnames, N: strip directory portion from names ----'
  902. X    `--    Y: send    only if    source newer than destination, N send all ---'
  903. X
  904. X
  905. X
  906. X    4.42  TIme : time of day
  907. X
  908. X    usage: time
  909. X
  910. X
  911. X    This command displays the local date and time as well as the current
  912. X    UTC.
  913. X
  914. X
  915. X    4.43  TTy :    console    tty name
  916. X
  917. X    usage: tty
  918. X
  919. X
  920. X    This command displays the current console tty name.
  921. X
  922. X
  923. X
  924. X    4.44  XA : hex to ascii char
  925. X
  926. X    usage: xa [<hex-val>]
  927. X
  928. X
  929. X    <hex-val> is a hexadecimal value between 0 and FF; the parity (sign) bit
  930. X    is stripped    and the    equivalent ASCII character value is displayed.
  931. X
  932. X    If no argument is supplied,    a table    of control characters is printed
  933. X    containing decimal,    octal, hex, ASCII identifiers and two-character
  934. X    control character identifier.
  935. X
  936. X
  937. X
  938. X
  939. X
  940. X
  941. X
  942. X    Public Domain by wht@n4hgf                12/26/90
  943. X
  944. X
  945. X
  946. X
  947. X
  948. X
  949. X
  950. X    ECU    Technical Description                      43
  951. X
  952. X
  953. X
  954. X    4.45  XON :    xon/xoff flow control
  955. X
  956. X    usage: xon [<arg>]
  957. X    where <arg>    is on     input and output flow control
  958. X           off     no flow control
  959. X           in     input flow control
  960. X           out     output    flow control
  961. X
  962. X
  963. X    This command enables or disables xon/xoff flow control.  If    the argument
  964. X    is omitted,    the current flow control state is displayed.
  965. X
  966. X
  967. X    4.46  ! : execute shell
  968. X
  969. X    usage: !
  970. X       !<command>
  971. X
  972. X
  973. X    The    '!' command is a shell escape.    The environment    variable SHELL is
  974. X    read to determine what shell program to execute (e.g., /bin/sh, etc).
  975. X    If '!' is entered by itself, an interactive    shell is started; press    ^D
  976. X    to exit back to ECU.  If <command> is supplied, it is executed by the
  977. X    shell with an immediate return to ECU.
  978. X
  979. X
  980. X
  981. X
  982. X
  983. X
  984. X
  985. X
  986. X
  987. X
  988. X
  989. X
  990. X
  991. X
  992. X
  993. X
  994. X
  995. X
  996. X
  997. X
  998. X
  999. X
  1000. X
  1001. X
  1002. X
  1003. X
  1004. X
  1005. X
  1006. X
  1007. X
  1008. X    Public Domain by wht@n4hgf                12/26/90
  1009. X
  1010. X
  1011. X
  1012. X
  1013. X
  1014. X
  1015. X
  1016. X    ECU    Technical Description                      44
  1017. X
  1018. X
  1019. X
  1020. X    5.    Procedure Language
  1021. X
  1022. X
  1023. X    Sample procedures are shown    in the companion document 'samplproc.man'.
  1024. X
  1025. X
  1026. X
  1027. X    5.1     Arguments
  1028. X
  1029. X
  1030. X    There are five types of arguments to procedure commands:
  1031. X
  1032. X     Switch
  1033. X     Alphabetic Token
  1034. X     Integer
  1035. X     String
  1036. X     Relational Operators
  1037. X
  1038. X    This section describes the syntax and construction of each type in turn.
  1039. X    There are separate groups of valid of relational operators for integers
  1040. X    and    strings; thus, they are    described under    the appropriate    sections.
  1041. X
  1042. X
  1043. X    5.1.1  Switches
  1044. X
  1045. X    Switch arguments begin with    a hyphen (minus, '-').    The switch argument
  1046. X    must be the    first argument after the command.  Only    one switch argument
  1047. X    is allowed on the command line.  If    switches '-a', '-b' and    '-c', are
  1048. X    available and '-a' and '-b'    are desired, '-ab' or '-ba' is entered.
  1049. X
  1050. X
  1051. X    5.1.2  Alphabetic Tokens
  1052. X
  1053. X    Alphabetic tokens, for lack    of a better term, are non-integer, non-
  1054. X    quoted terms used as arguments for certain commands, such as:
  1055. X
  1056. X     plog off
  1057. X
  1058. X    Such argument types    are fairly simple to understand    and use; they are
  1059. X    described here for completeness.
  1060. X
  1061. X
  1062. X    5.1.3  Integers
  1063. X
  1064. X    Integer values are 32-bit quantities ranging between -2147483647 and
  1065. X    2147483647.
  1066. X
  1067. X    In one case, an integer is used to store a 32-bit color mask as
  1068. X    described by the color command and the %colors integer function.
  1069. X
  1070. X
  1071. X
  1072. X
  1073. X
  1074. X    Public Domain by wht@n4hgf                12/26/90
  1075. X
  1076. X
  1077. X
  1078. X
  1079. X
  1080. X
  1081. X
  1082. X    ECU    Technical Description                      45
  1083. X
  1084. X
  1085. X
  1086. X    5.1.3.1  Constants
  1087. X
  1088. X    Integer constants are numeric strings, optionally with an initial minus
  1089. X    sign, the absolue value of which must be less than 2147483648.
  1090. X
  1091. X
  1092. X    5.1.3.2  Variables
  1093. X
  1094. X    There are 50 numbered, permanent integer variables referenced by the
  1095. X    terms '$i0'    through    '$i49'.     When ECU is started, the value    of each
  1096. X    variable is    zero.  Variables retain    their value until changed, even
  1097. X    between procedure executions.  The integer variable    number may be
  1098. X    expressed as an expression by enclosing an integer expression in
  1099. X    brackets.  For instance:
  1100. X
  1101. X     $i[4+5]      refers to    $i9
  1102. X
  1103. X     $i2=5
  1104. X     $i[20+$i2]   refers to    $i25
  1105. X
  1106. X
  1107. X    Integer variables may be created for use as    "local"    variables or to
  1108. X    promote code readability.  Refer to    the mkvar command.
  1109. X
  1110. X
  1111. X    5.1.3.3  Functions
  1112. X
  1113. X    ECU    has many built-in functions which return the value of ecu- or
  1114. X    system-related information.     A list    of the functions appears in a later
  1115. X    section.
  1116. X
  1117. X
  1118. X    5.1.3.4  Expressions
  1119. X
  1120. X    In almost any place    an integer argument is allowed,    an expression may be
  1121. X    supplied.  Expressions are composed    of two or more integer constants or
  1122. X    variables separated    by operators from the group:
  1123. X
  1124. X    +     addition
  1125. X    -     subtraction
  1126. X    *     multiplication
  1127. X    /     division
  1128. X    |     OR
  1129. X    @     MOD
  1130. X    ^     XOR
  1131. X    &     AND
  1132. X
  1133. X    Evaluation of expressions is left-to-right.     Parentheses are not
  1134. X    allowed.
  1135. X
  1136. X
  1137. X
  1138. X
  1139. X
  1140. X    Public Domain by wht@n4hgf                12/26/90
  1141. X
  1142. X
  1143. X
  1144. X
  1145. X
  1146. X
  1147. X
  1148. X    ECU    Technical Description                      46
  1149. X
  1150. X
  1151. X
  1152. X    5.1.3.5  Relational    Operators
  1153. X
  1154. X    Integer relational operators are chosen from the following group:
  1155. X
  1156. X     =     "is equal to"
  1157. X     ==     "is equal to"
  1158. X     !=     "is not equal to"
  1159. X     <>     "is not equal to"
  1160. X     >     "is greater than"
  1161. X     <     "is greater than"
  1162. X     >=     "is greater than or equal to"
  1163. X     <=     "is less than or equal    to"
  1164. X
  1165. X
  1166. X
  1167. X    5.1.4  Strings
  1168. X
  1169. X    Strings are    classic    concatenations of zero or more eight-bit characters.
  1170. X    In general,    the maximum size of a string used by ECU is 256    characters.
  1171. X    The    absolute maximum size is 5120 characters.
  1172. X
  1173. X
  1174. X    5.1.4.1  Constants
  1175. X
  1176. X    String constants are formed    by placing alphanumeric    characters between
  1177. X    single quote characters (apostrophes).  The    backslash ('\')    character is
  1178. X    used to "escape" certains characters:
  1179. X
  1180. X    '\'    one backslash
  1181. X    '0   newline
  1182. X    ''   tab
  1183. X    '''   apostrophe
  1184. X
  1185. X
  1186. X
  1187. X    5.1.4.2  Variables
  1188. X
  1189. X    There are 50 numbered, permanent string variables referenced by the
  1190. X    terms '$s0'    through    '$s49',    each possessing    a maximum length of 256
  1191. X    characters When ECU    is started, the    value of each variable is null (zero
  1192. X    length).  Variables    retain their value until changed, even between
  1193. X    procedure executions.  The string variable number may be expressed as an
  1194. X    expression by enclosing an string expression in brackets.  For instance:
  1195. X
  1196. X     $s[4+5]      refers to    $s9
  1197. X
  1198. X     $s2=5
  1199. X     $s[20+$s2]   refers to    $s25
  1200. X
  1201. X
  1202. X    String variables may be created for    use as "local" variables or to
  1203. X
  1204. X
  1205. X
  1206. X    Public Domain by wht@n4hgf                12/26/90
  1207. X
  1208. X
  1209. X
  1210. X
  1211. X
  1212. X
  1213. X
  1214. X    ECU    Technical Description                      47
  1215. X
  1216. X
  1217. X
  1218. X    promote code readability.  Refer to    the mkvar command. Created variables
  1219. X    have a life    equal to the duration of the procedure which created them.
  1220. X    Regardless of the declared size of a created string    variable, ECU will
  1221. X    automatically grow it to a maximum of 5120 characters as necessary.
  1222. X    Numbered (permanent) string    variables have a maximum size of 256 bytes.
  1223. X
  1224. X
  1225. X    5.1.4.3  Functions
  1226. X
  1227. X    ECU    has many built-in functions which return the value of ecu- or
  1228. X    system-related information.     A list    of the functions appears in a later
  1229. X    section.
  1230. X
  1231. X
  1232. X    5.1.4.4  Expressions
  1233. X
  1234. X    String expressions are formed by the concatenation of string constants,
  1235. X    variables and function return values using the '+' operator:
  1236. X
  1237. X    Example:
  1238. X       'The quick brown    fox jumped over    the '+$s0'+' dog at '+%time
  1239. X
  1240. X
  1241. X
  1242. X    5.1.4.5  Relational    Operators
  1243. X
  1244. X    String relational operators    are chosen from    the following group:
  1245. X
  1246. X     =     "is equal to"
  1247. X     ==     "is equal to"
  1248. X     !=     "is not equal to"
  1249. X     <>     "is not equal to"
  1250. X
  1251. X
  1252. X
  1253. X
  1254. X    5.2     Commands
  1255. X
  1256. X
  1257. X
  1258. X    5.2.1  baud
  1259. X
  1260. X    usage: baud    <baud-int>
  1261. X
  1262. X    This command sets the baud rate for    the attached line.  The    integer
  1263. X    argument <baud-int>    must be    one of 110, 300, 600, 1200, 2400, 4800,
  1264. X    9600, 19200    and 38400.
  1265. X
  1266. X
  1267. X
  1268. X
  1269. X
  1270. X
  1271. X
  1272. X    Public Domain by wht@n4hgf                12/26/90
  1273. X
  1274. X
  1275. X
  1276. X
  1277. X
  1278. X
  1279. X
  1280. X    ECU    Technical Description                      48
  1281. X
  1282. X
  1283. X
  1284. X    Example:
  1285. X    baud 9600
  1286. X    set $i0=2400; baud $i0
  1287. X
  1288. X
  1289. X
  1290. X    5.2.2  break
  1291. X
  1292. X    usage: break
  1293. X
  1294. X    This command is used inside    a whilei or whiles compound statement to
  1295. X    exit the loop.
  1296. X
  1297. X    Example:
  1298. X
  1299. X    whilei 1=1 #forever unless break command executed
  1300. X    {
  1301. X        echo -n 'Answer yes    or no: '
  1302. X        set    $s0=%cgets # get answer
  1303. X        ifi    %instr($s0,'y')    == 0 set $i0 = 1; break
  1304. X        ifi    %instr($s0,'n')    == 0 set $i0 = 0; break
  1305. X        # got neither 'y' nor 'n' ... keep trying
  1306. X    }
  1307. X    # now $i0 = 1 if yes, 0    if no
  1308. X
  1309. X
  1310. X    NOTE: further examples of break usage may be found in the example for
  1311. X    the    else command.
  1312. X
  1313. X
  1314. X    5.2.3  cd
  1315. X
  1316. X    usage: cd <directory-path>
  1317. X
  1318. X    This command changes ECU's current working directory.  The string
  1319. X    argument <directory-path> may contain any directory    pathname
  1320. X    specification legal    to be submitted    to the shell csh.  Wild    card
  1321. X    characters may be used, provided the expansion produces only one
  1322. X    pathname.
  1323. X
  1324. X
  1325. X    Example:
  1326. X
  1327. X    cd '~user/bin'
  1328. X    cd %envvar('HOME')+'/bin'
  1329. X
  1330. X
  1331. X
  1332. X    5.2.4  clrx
  1333. X
  1334. X    usage: clrx
  1335. X
  1336. X
  1337. X
  1338. X    Public Domain by wht@n4hgf                12/26/90
  1339. X
  1340. X
  1341. X
  1342. X
  1343. X
  1344. X
  1345. X
  1346. X    ECU    Technical Description                      49
  1347. X
  1348. X
  1349. X
  1350. X    This command clears     the attached line's transmitter XOFF state.
  1351. X    Issuing the    command    is the equivalent to receiving an XON from the
  1352. X    remote system.
  1353. X
  1354. X
  1355. X    5.2.5  cls
  1356. X
  1357. X    usage: cls
  1358. X
  1359. X    This command clears    the screen.
  1360. X
  1361. X
  1362. X    5.2.6  color
  1363. X
  1364. X
  1365. X    usage: color <normal-foreground> [<normal-background>]
  1366. X    usage: color -r <reverse-foreground> [<reverse-background>]
  1367. X
  1368. X
  1369. X    This command changes the current normal or reverse video colors in a
  1370. X    manner similar to the setcolor(C) command.    It has no effect on systems
  1371. X    using a monochrome monitor.     If the    second (background) color is
  1372. X    omitted, it    is assumed to be black.
  1373. X
  1374. X    The    command    also forces normal video mode.    Refer to the vidnorm and
  1375. X    vidrev commands.  Refer also to the    vidcolor command.
  1376. X
  1377. X
  1378. X    Color names
  1379. X       blue     magenta      brown     black
  1380. X       lt_blue     lt_magenta   yellow     gray
  1381. X       cyan     white          green     red
  1382. X       lt_cyan     hi_white     lt_green     lt_red
  1383. X
  1384. X    Example:
  1385. X
  1386. X    color lt_green    # normal video light green on black
  1387. X    color -r red white # reverse video red on white
  1388. X
  1389. X
  1390. X
  1391. X    5.2.7  continue
  1392. X
  1393. X    usage: continue
  1394. X
  1395. X    This command is used inside    a whilei or whiles compound statement to
  1396. X    skip the remainder of any commands in the loop and continue    execution at
  1397. X    the    first command in the loop.
  1398. X
  1399. X
  1400. X
  1401. X
  1402. X
  1403. X
  1404. X    Public Domain by wht@n4hgf                12/26/90
  1405. X
  1406. X
  1407. X
  1408. X
  1409. X
  1410. X
  1411. X
  1412. X    ECU    Technical Description                      50
  1413. X
  1414. X
  1415. X
  1416. X    Example:
  1417. X
  1418. X    send ''    # send ENTER to    get prompt
  1419. X    whilei 1=1 # forever unless break command executed
  1420. X    {
  1421. X        lookfor -e 'login: ' # look    for login prompt
  1422. X        ifi    $i0 == 0     # if we dont get prompt ...
  1423. X        {
  1424. X        send ''         # send    ENTER again
  1425. X        continue     # and look for    login prompt
  1426. X        }
  1427. X        send $s_name     # send    username
  1428. X        lookfor -e 'Password:'
  1429. X        send $s_password
  1430. X        get    -e 0 50         # wait    10 seconds for response
  1431. X
  1432. X        # if incorrect not found in    response, ...
  1433. X        if %instr($s0,'incorrect') < 0 # ... must have won
  1434. X        break
  1435. X
  1436. X        # garbled line?: system will send another 'login: '
  1437. X    }
  1438. X
  1439. X
  1440. X
  1441. X    NOTE: further examples of continue usage may be found in the example for
  1442. X    the    else command.
  1443. X
  1444. X
  1445. X    5.2.8  cursor
  1446. X
  1447. X    usage: cursor <row>    [<col>]
  1448. X
  1449. X    This command places    the cursor at a    specified position on the video
  1450. X    screen.  The top left of the scrren    is row 0, column 0.  If    <col> is not
  1451. X    specified, it is assumed 0 (left margin).
  1452. X
  1453. X    Example:
  1454. X
  1455. X    cls
  1456. X    $i0 = 5
  1457. X    whilei $i5 < 12
  1458. X    {
  1459. X        cursor $i5
  1460. X        echo 'This is line '+%itos($i5,2d)+' of the    display'
  1461. X    }
  1462. X
  1463. X
  1464. X
  1465. X
  1466. X
  1467. X
  1468. X
  1469. X
  1470. X    Public Domain by wht@n4hgf                12/26/90
  1471. X
  1472. X
  1473. X
  1474. X
  1475. X
  1476. X
  1477. X
  1478. X    ECU    Technical Description                      51
  1479. X
  1480. X
  1481. X
  1482. X    5.2.9  delline
  1483. X
  1484. X    usage: delline
  1485. X
  1486. X    This command deletes the current line from the video display.
  1487. X
  1488. X
  1489. X    5.2.10  dial
  1490. X
  1491. X    usage: dial    <remote>
  1492. X
  1493. X    This command causes    an outgoing call to be placed.    The string argument
  1494. X    <remote> can take one of two forms:    a numeric telephone number or an
  1495. X    alphanumeric "logical" number or system name.
  1496. X
  1497. X    A numeric phone number ('1(800)555-1212' or    '2345678') must    begin with a
  1498. X    digit and must consist entirely of digits, parentheses or hyphens.    If a
  1499. X    telephone number is    supplied, the phone number is dialed; you must first
  1500. X    have set the desired baud rate and parity using the    'baud' and 'parity'
  1501. X    commands.
  1502. X
  1503. X    If a logical name is entered, the phone directory (managed by the
  1504. X    interactive    dial command) is searched; if the entry    is found, the baud
  1505. X    rate and parity is automatically set from values in    the directory entry;
  1506. X    then, the number in    the directory entry is dialed.
  1507. X
  1508. X    See    the section on the interactive "Dial" command and the section titled
  1509. X    "Choosing a    Dialout    Line" for more information.
  1510. X
  1511. X    When the dial command returns, integer variable $i0    is set to a status
  1512. X    code and string variable $s0 has a text message (the modem verbal result
  1513. X    code if the    ECU dialer is used, a representation of    the return status
  1514. X    code if a uucp dialer is used [see below]).
  1515. X
  1516. X    Dial Command $i0 Status Codes
  1517. X
  1518. X    0  successful connect
  1519. X    1  failed to connect (call progress)
  1520. X    2  dial    interrupted by signal
  1521. X    3  modem error (non responsive or commands rejected)
  1522. X
  1523. X
  1524. X
  1525. X
  1526. X
  1527. X
  1528. X
  1529. X
  1530. X
  1531. X
  1532. X
  1533. X
  1534. X
  1535. X
  1536. X    Public Domain by wht@n4hgf                12/26/90
  1537. X
  1538. X
  1539. X
  1540. X
  1541. X
  1542. X
  1543. X
  1544. X    ECU    Technical Description                      52
  1545. X
  1546. X
  1547. X
  1548. X    Dial Command $s0 Status Messages (uucp dialer)
  1549. X
  1550. X    CONNECT    ####           #### = baud rate
  1551. X    BUSY               only some modems
  1552. X    NO ANSWER           only some modems
  1553. X    NO CARRIER           most generic "fail to connect"
  1554. X    NO DIAL    TONE           only some modems
  1555. X    !Connect bad baud rate modem reported different    rate
  1556. X    !Interrupted           call interrupted    by signal
  1557. X    !Invalid arguments     ECU error
  1558. X    !Invalid phone number  too long    or bad characters
  1559. X    !Ioctl error           should not be reported here
  1560. X    !Line in use           should not be reported here
  1561. X    !Line open error       should not be reported here
  1562. X    !Modem Error           modem did not respond
  1563. X
  1564. X    Note: if the ECU dialer is used, the actual    modem result code
  1565. X    is returned    in $s0 or one of the following two strings:
  1566. X
  1567. X    !Interrupted           call interrupted    by signal
  1568. X    !Modem Error           modem did not respond
  1569. X
  1570. X
  1571. X
  1572. X    5.2.11  do
  1573. X
  1574. X    usage: do <procname> [<arg>    ...]
  1575. X
  1576. X    This command executes a procedure whose name appears as the    command's
  1577. X    first (string) argument.  One or more arguments (up    to 19) may be passed
  1578. X    to the called procedure; an    argument may consist of    any valid string
  1579. X    expression,    provided, that,    when expanded,    the argument does not exceed
  1580. X    256    characters in length.
  1581. X
  1582. X    The    called procedure may read its arguments    using the %argv    string
  1583. X    function.  %argv(0)    is the name of the procedure.  The quantity of
  1584. X    arguments may be obtained using the    %argc integer function.
  1585. X
  1586. X
  1587. X    Example:
  1588. X
  1589. X    do 'proc' %rname %date+' '+%time %argv(0)
  1590. X
  1591. X    Note: in this example, the called procedure    is passed the name
  1592. X    of the calling procedure as    the last argument.
  1593. X
  1594. X
  1595. X
  1596. X    5.2.12  duplex
  1597. X
  1598. X
  1599. X
  1600. X
  1601. X
  1602. X    Public Domain by wht@n4hgf                12/26/90
  1603. X
  1604. X
  1605. X
  1606. X
  1607. X
  1608. X
  1609. X
  1610. X    ECU    Technical Description                      53
  1611. X
  1612. X
  1613. X
  1614. X    usage: duplex full | half
  1615. X       duplex 'full' | 'half'
  1616. X
  1617. X
  1618. X    This command specifies whether or not ECU is to locally echo characters
  1619. X    typed by you at the    keyboard.  The overwhelming majority of    remote
  1620. X    systems provide the    echo function, in which    case full duplex must be
  1621. X    used.  For the rare    occasions when the remote system does not echo your
  1622. X    keyboard input, setting half duplex    will allow you to see what you are
  1623. X    typing.
  1624. X
  1625. X    When communicating with another terminal in    a "teletype conversation",
  1626. X    setting half duplex    is generally required.    In such    cases, use of the
  1627. X    interactive    nl, nlin and nlout commands may    also be    required.
  1628. X
  1629. X    Example:
  1630. X
  1631. X    duplex full
  1632. X    $s0 = 'full'; duplex $s0
  1633. X
  1634. X
  1635. X
  1636. X
  1637. X    5.2.13  echo
  1638. X
  1639. X    usage: echo    [-n] <string>
  1640. X
  1641. X    This command prints    the contents of    the string argument <string> on    the
  1642. X    screen.  If    the -n switch is not present, a    newline    follows    the output
  1643. X    of <string>.
  1644. X
  1645. X    Example:
  1646. X
  1647. X    echo 'Procedure    '+%argv(0)+' executing at '+%time
  1648. X    echo -n    'Enter your first name:    '; $s0 = %cgets
  1649. X
  1650. X
  1651. X
  1652. X    5.2.14  eeol
  1653. X
  1654. X    usage: eeol
  1655. X
  1656. X    This command erases    the video display to the end of    the line.
  1657. X
  1658. X
  1659. X    5.2.15  else
  1660. X
  1661. X
  1662. X    This statement may follow an ifi or    ifs command to specify one or more
  1663. X    statements to be executed if the if-type command condition is false.
  1664. X    Else commands may be chained together in the traditional structured
  1665. X
  1666. X
  1667. X
  1668. X    Public Domain by wht@n4hgf                12/26/90
  1669. X
  1670. X
  1671. X
  1672. X
  1673. X
  1674. X
  1675. X
  1676. X    ECU    Technical Description                      54
  1677. X
  1678. X
  1679. X
  1680. X    usage: else    <statement>
  1681. X
  1682. X       else
  1683. X           <statement>
  1684. X
  1685. X       else
  1686. X       {
  1687. X        any kind and number of statements
  1688. X       }
  1689. X
  1690. X       else    <if> <statement>
  1691. X
  1692. X       else    <if>
  1693. X       {
  1694. X        any kind and number of statements
  1695. X       }
  1696. X
  1697. X
  1698. X    language manner.
  1699. X
  1700. X    For    the purposes of    describing this    command, <statement> is    any single
  1701. X    or compound    statement NOT containing a whilei or whiles command.  If you
  1702. X    wish to have a while-type command executed as part of an else condition,
  1703. X    the    while must occur within    braces ("{}").
  1704. X
  1705. X    <if> is an ifi or ifs command followed by an <if-condition>    (see the
  1706. X    description    of the ifi or ifs commands below).
  1707. X
  1708. X
  1709. X
  1710. X
  1711. X
  1712. X
  1713. X
  1714. X
  1715. X
  1716. X
  1717. X
  1718. X
  1719. X
  1720. X
  1721. X
  1722. X
  1723. X
  1724. X
  1725. X
  1726. X
  1727. X
  1728. X
  1729. X
  1730. X
  1731. X
  1732. X
  1733. X
  1734. X    Public Domain by wht@n4hgf                12/26/90
  1735. X
  1736. X
  1737. X
  1738. X
  1739. X
  1740. X
  1741. X
  1742. X    ECU    Technical Description                      55
  1743. X
  1744. X
  1745. X
  1746. X    Example:
  1747. X
  1748. X    #+------------------------------------------------------
  1749. X    # finger.ep    - procedure to send 'finger' to    remote
  1750. X    # BSD Unix system; print resulting lines in    different
  1751. X    # colors: uucp logins green, root red, others cyan
  1752. X    #-------------------------------------------------------
  1753. X
  1754. X    mkvar $icolor; $icolor = %colors
  1755. X    mkvar $itimeout
  1756. X    $itimeout = 50       # timeout for first line 5 secs
  1757. X    send 'ps -aux'       # send command, but do not echo
  1758. X    lookfor    '0 40     # swallow command
  1759. X    whilei 1==1       # forever, or until break
  1760. X    {
  1761. X        lgets 0 $itimeout 1    '0 #get    a line
  1762. X        ifi    $i0 = 0    break #if no chaacters read
  1763. X        $itimeout =    10 #wait 1 sec for later lines
  1764. X
  1765. X        ifi    %instr($s0,'% ') >= 0 #    if csh prompt seen
  1766. X        break              #    exit while loop
  1767. X        else ifi %instr($s0,'Login') >= 0
  1768. X        color gray
  1769. X        else ifi %instr($s0,'root')    >= 0
  1770. X        color red
  1771. X        else ifi %instr($s0,'uucp')    >= 0
  1772. X        color green
  1773. X        else color cyan
  1774. X        echo $s0
  1775. X    }
  1776. X    icolor $icolor #restore    entry colors
  1777. X    send ''           #force a    new prompt from    remote
  1778. X
  1779. X
  1780. X
  1781. X
  1782. X    5.2.16  exit
  1783. X
  1784. X    usage: exit    [<status>]
  1785. X
  1786. X    This command causes    an abrupt termination of the ECU program.  Any
  1787. X    existing connection    with a remote system is    terminated immediately.     If
  1788. X    no integer argument    <status> is found, ECU exits with a program exit
  1789. X    status of 0.  If <status> is found and the value is    zero, then ECU exits
  1790. X    with a program exit    status of 0.  If <status> non-zero,its value must be
  1791. X    in the range of 1 to 31, and ECU exits with    a program exit status of 192
  1792. X    plus <status>.  This feature allows    batch executions of ECU    by shell
  1793. X    script detect user-determined ECU execution    status.     See the section
  1794. X    titled "Exit Codes".
  1795. X
  1796. X
  1797. X
  1798. X
  1799. X
  1800. X    Public Domain by wht@n4hgf                12/26/90
  1801. X
  1802. X
  1803. X
  1804. X
  1805. X
  1806. X
  1807. X
  1808. X    ECU    Technical Description                      56
  1809. X
  1810. X
  1811. X
  1812. X    5.2.17  expresp
  1813. X
  1814. X    usage: expresp [-v[v...]] <exp-resp-str> [<timeout_msecs>]
  1815. X
  1816. X    This command emulates the uuchat function as described in the SCO HDB
  1817. X    UUCP documentation and in the /usr/lib/uucp/Dialers    file.
  1818. X
  1819. X    -v causes the expect-respond conversation between ECU and the remote
  1820. X    system to be displayed on the screen.  This    switch is automatically
  1821. X    enabled if procdedure tracing is enabled.
  1822. X
  1823. X    multiple v's (e.g.,    -vv, -vvv) up to 3 'v's    produce    more verbose debug
  1824. X    output. -vv    causes each base level expect and respond string to be
  1825. X    displayed. -vvv causes a hexadecimal dump of each  interpreted expect
  1826. X    string to be displayed.
  1827. X
  1828. X    <exp-resp-str> is as defined in /usr/lib/ecu/Dialers.
  1829. X
  1830. X       Meaning of some of the escape characters:
  1831. X    - pause    (approximately 1/4-1/2 second delay)
  1832. X
  1833. X    - delay    (2 seconds)
  1834. X       D - phone number/token
  1835. X       T - phone number    with Dialcodes and character translation
  1836. X       N - null    byte
  1837. X       K - insert a BREAK
  1838. X       E - turn    on echo    checking (for slow devices)
  1839. X       \--carriagefreturnchecking
  1840. X       - send new-line
  1841. X    n - send octal number
  1842. X       m## - delay ## milliseconds (NOT    SUPPORTED BY DIALERS;
  1843. X        SEE BELOW)
  1844. X       ~t[##] -    set timeout to ## seconds (see below)
  1845. X       ~m[##] -    set timeout to ## milliseconds (see below)
  1846. X       Speed - Hayes-specific speed-adaptive connect handler
  1847. X
  1848. X
  1849. X    <timeout_msecs> specifies an optional timeout in milliseconds for
  1850. X    waiting on expect strings;    it defaults to 10,000 milliseconds (10
  1851. X    seconds).  The resolution for timeouts is limited to the basic tick    time
  1852. X    of your system (HZ,    10 msec    for UNIX/386, 20 msec for XENIX/386 and
  1853. X    XENIX/286).     The timeout for 'Speed' expects is fixed at 90    seconds.
  1854. X
  1855. X    \m### causes a ### millisecond delay.  Note    this adds an ambiguity to
  1856. X    the    syntax of the send string: you may not follow an m delay with a
  1857. X    literal digit to send.  For    example, suppose you wish to delay 300
  1858. X    missileconds then send "4A".  \m3004A will delay for 3004
  1859. X    (approximately) milliseconds, then send an "A".
  1860. X
  1861. X    Integer variable $i0 is set    to one if the expect-respond script fails,
  1862. X    else it is set to 0.
  1863. X
  1864. X
  1865. X
  1866. X    Public Domain by wht@n4hgf                12/26/90
  1867. X
  1868. X
  1869. X
  1870. X
  1871. X
  1872. X
  1873. X
  1874. X    ECU    Technical Description                      57
  1875. X
  1876. X
  1877. X
  1878. X    5.2.18  fchmod
  1879. X
  1880. X    usage: fchmod <mode> <file>
  1881. X
  1882. X    This command sets the mode of <file> to <mode>.  The <mode>    argument
  1883. X    takes one of two forms, a nine-character mode string (e.g.,    'rwxr-xr-x')
  1884. X    or an integer value    (0755).     The <file> argument is    either a string
  1885. X    value forming a filename or    an integer file    number representing a file
  1886. X    opened with    the fopen command.
  1887. X
  1888. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  1889. X    associated system call (refer to the %errstr string    function and/or
  1890. X    /usr/include/sys/errno.h).
  1891. X
  1892. X
  1893. X    Example:
  1894. X
  1895. X    fopen 1    '/tmp/123'; fchmod 'rwxrwxrwx' 1
  1896. X    fchmod 'rwxrwxrwx' '/tmp/123'
  1897. X    fopen 1    '/tmp/123'; fchmod 0777    1
  1898. X    $i0 = 0777; fchmod $i0 '/tmp/123'
  1899. X
  1900. X    All    of the above example result in the same    result.
  1901. X
  1902. X
  1903. X
  1904. X    5.2.19  fclose
  1905. X
  1906. X    usage: fclose <file>
  1907. X
  1908. X    This command closes    <file>.     The <file> argument is    an integer file
  1909. X    number representing    a file opened with the fopen command.
  1910. X
  1911. X    The    command    is ignored if <file> is    not open.  No integer variable is
  1912. X    modified by    fclose.
  1913. X
  1914. X
  1915. X    Example:
  1916. X
  1917. X    fclose 1
  1918. X
  1919. X
  1920. X
  1921. X    5.2.20  fdel
  1922. X
  1923. X    usage: fdel    <file>
  1924. X
  1925. X    This command removes a file.
  1926. X
  1927. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  1928. X    associated system call (refer to the %errstr string    function and/or
  1929. X
  1930. X
  1931. X
  1932. X    Public Domain by wht@n4hgf                12/26/90
  1933. X
  1934. X
  1935. X
  1936. X
  1937. X
  1938. X
  1939. X
  1940. X    ECU    Technical Description                      58
  1941. X
  1942. X
  1943. X
  1944. X    /usr/include/sys/errno.h).
  1945. X
  1946. X
  1947. X    Example:
  1948. X
  1949. X    fdel '/tmp/123'
  1950. X
  1951. X
  1952. X
  1953. X    5.2.21  fgetc
  1954. X
  1955. X    usage: fgetc <file>    <destination>
  1956. X
  1957. X    This command reads a character from    <file>.     The <file> argument is    an
  1958. X    integer file number    representing a file opened with    the fopen command.
  1959. X
  1960. X    The    argument <destination> is either a string variable or an integer
  1961. X    variable.  If the file has reached end of file: an integer variable
  1962. X    receives -1; a string variable is returned null.  Otherwise, the
  1963. X    character's    numeric    value (0-255) is placed    in an integer variable or a
  1964. X    string variable is returned    with a length of one with the file character
  1965. X    as its only    character.
  1966. X
  1967. X
  1968. X    Example:
  1969. X
  1970. X    fgetc 1    $s0
  1971. X    fgetc 1    $i_input
  1972. X
  1973. X
  1974. X
  1975. X    5.2.22  fgets
  1976. X
  1977. X    usage: fgets <file>    <strvar>
  1978. X
  1979. X    This command reads a character from    <file>.     The <file> argument is    an
  1980. X    integer file number    representing a file opened with    the fopen command.
  1981. X
  1982. X    The    argument <strvar> is a string variable.     If the    file has reached end
  1983. X    of file, <strvar> is returned null and integer variable $i0    is set to 1.
  1984. X    Otherwise, the <strvar> receives input from    the file minus the trailing
  1985. X    newline and    $i0 is returned    zero.
  1986. X
  1987. X
  1988. X    Example:
  1989. X
  1990. X    fgets 1    $s0
  1991. X
  1992. X
  1993. X
  1994. X
  1995. X
  1996. X
  1997. X
  1998. X    Public Domain by wht@n4hgf                12/26/90
  1999. X
  2000. X
  2001. X
  2002. X
  2003. X
  2004. X
  2005. X
  2006. X    ECU    Technical Description                      59
  2007. X
  2008. X
  2009. X
  2010. X    5.2.23  fkey
  2011. X
  2012. X    usage: fkey    <str>
  2013. X
  2014. X    This command selects a function key    definition from    the ~/.ecu/keys
  2015. X    file.
  2016. X
  2017. X
  2018. X    5.2.24  flush
  2019. X
  2020. X    usage: flush
  2021. X
  2022. X    This command causes    any characters received    by the system from the line,
  2023. X    but    not yet    read by    the procedure to be "forgotten"    or flushed.
  2024. X
  2025. X
  2026. X    5.2.25  fopen
  2027. X    usage: fopen [-switches] <filenum> <filename>
  2028. X
  2029. X    This command opens a file named by the string argument <filename> and
  2030. X    associates it with the user-chosen file number <filenum> (which must be
  2031. X    an integer value between 0 and 4, inclusive).
  2032. X
  2033. X    The    argument switches govern how a file is opened and must be chosen
  2034. X    from this list:
  2035. X
  2036. X    -r       The file is opened read-only; if it does not    exist, an
  2037. X           error occurs.
  2038. X
  2039. X    -r+       The file is opened for reading and writing; if it does
  2040. X           not exist, an error occurs.
  2041. X
  2042. X    -w       The file is opened for writing (any previous    contents of
  2043. X           the file are    lost); if it does not exist, it    is created.
  2044. X
  2045. X    -w+       The file is opened for reading and writing (any previous
  2046. X           contents of the file    are lost); if it does not exist, it
  2047. X           is created.
  2048. X
  2049. X    -a       The file is opened for appending (writes to the file    are
  2050. X           added to the    previous file contents); if it does not
  2051. X           exist, it is    created.  All writes are appended to the
  2052. X           file    (the fseek command has no effect).
  2053. X
  2054. X    The    switches parameter may be omitted; in such cases, the file is opened
  2055. X    as though '-r' had been supplied.  However,    if procedure tracing is
  2056. X    enabled (see the description of the    interactive and    procedure command
  2057. X    ptrace), a warning message will be issued.
  2058. X
  2059. X    The    command    sets $i0 = 0 if    successful, else to the    errno from the
  2060. X    associated system call (refer to the %errstr string    function and/or
  2061. X
  2062. X
  2063. X
  2064. X    Public Domain by wht@n4hgf                12/26/90
  2065. X
  2066. X
  2067. X
  2068. X
  2069. X
  2070. X
  2071. X
  2072. X    ECU    Technical Description                      60
  2073. X
  2074. X
  2075. X
  2076. X    /usr/include/sys/errno.h).
  2077. X
  2078. X    Example:
  2079. X
  2080. X    fopen 0    -r '/etc/passwd'
  2081. X    fopen 1    -w+ '/tmp/123'
  2082. X    fopen 2    -a 'tranact.log'
  2083. X
  2084. X
  2085. X
  2086. X    5.2.26  fputc
  2087. X
  2088. X    usage: fputc <file>    <char>
  2089. X
  2090. X    This command writes    character <char> into <file>.  The <file> argument
  2091. X    is an integer file number representing a file opened with the fopen
  2092. X    command.  Argument <char> is a integer value of which the lower eight
  2093. X    bits are used or a string value of which the first character is used.
  2094. X
  2095. X    If a write error occurs, procedure execution is terminated.
  2096. X
  2097. X    Example:
  2098. X
  2099. X    $s0='abc'; fputc 1 $s0          writes 'a'
  2100. X    $i0=0x30 ; fputc 1 $i0          writes '0'
  2101. X
  2102. X
  2103. X
  2104. X    5.2.27  fputs
  2105. X
  2106. X    usage: fputs [-n] <file> <str>
  2107. X
  2108. X    This command writes    the string <str> into <file>.  The <file> argument
  2109. X    is an integer file number representing a file opened with the fopen
  2110. X    command.
  2111. X
  2112. X    If the switch '-n' is omitted, a newline is    appended after <str> in    the
  2113. X    file; if present, no newline is written.
  2114. X
  2115. X    If a write error occurs, procedure execution is terminated.
  2116. X
  2117. X    Example:
  2118. X
  2119. X    $s0='abc'; fputc 1 $s0          writes 'a'
  2120. X
  2121. X
  2122. X
  2123. X    5.2.28  fseek
  2124. X
  2125. X    usage: fseek <file>    <position>
  2126. X
  2127. X
  2128. X
  2129. X
  2130. X    Public Domain by wht@n4hgf                12/26/90
  2131. X
  2132. X
  2133. X
  2134. X
  2135. X
  2136. X
  2137. X
  2138. X    ECU    Technical Description                      61
  2139. X
  2140. X
  2141. X
  2142. X    This command sets the file position    of <file> to <position.     The
  2143. X    corresponding integer function %ftell may be used to determine the
  2144. X    current file position.
  2145. X
  2146. X    Note: if <file> is open for    append ('-a'), then the    fseek command will
  2147. X    have no effect.
  2148. X
  2149. X
  2150. X    5.2.29  getf
  2151. X
  2152. X
  2153. X    usage: getf    -x <int-var-spec> <offset>
  2154. X
  2155. X    where: -x ==
  2156. X       -b byte
  2157. X       -w word (little-endian)
  2158. X       -W word (big-endian)
  2159. X       -l 32-bits (little-endian)
  2160. X       -L 32-bits (big-endian)
  2161. X
  2162. X
  2163. X
  2164. X    5.2.30  gosub
  2165. X
  2166. X    usage: gosub <label>
  2167. X
  2168. X    This command transfers control of procedure    to a statement other than
  2169. X    the    one immediately    following.  The    <label>    argument may be    literal    text
  2170. X    or may be a    string,    allowing a "computed gosub" feature.
  2171. X
  2172. X    When the next return statement is executed,    control    is returned to the
  2173. X    next statement after the gosub.
  2174. X
  2175. X
  2176. X
  2177. X
  2178. X
  2179. X
  2180. X
  2181. X
  2182. X
  2183. X
  2184. X
  2185. X
  2186. X
  2187. X
  2188. X
  2189. X
  2190. X
  2191. X
  2192. X
  2193. X
  2194. X
  2195. X
  2196. X    Public Domain by wht@n4hgf                12/26/90
  2197. X
  2198. X
  2199. X
  2200. X
  2201. X
  2202. X
  2203. X
  2204. X    ECU    Technical Description                      62
  2205. X
  2206. X
  2207. X
  2208. X    Example:
  2209. X
  2210. X    gosub GET_NEXT
  2211. X    gosub 'GET_NEXT'
  2212. X    gosub 'GET'+'_NEXT'
  2213. X    $s0 = 'GET_NEXT'; gosub    $s0
  2214. X    $s0 = 'NEXT'; gosub 'GET_'+$s0
  2215. X
  2216. X    Note: all the above    examples cause transfer    to the label GET_NEXT.
  2217. X
  2218. X    Example:
  2219. X
  2220. X    #---------------------
  2221. X    # gosub.ep
  2222. X    #---------------------
  2223. X    echo 'main'; gosub SUB;    echo 'back to main'
  2224. X    return
  2225. X
  2226. X    SUB
  2227. X    echo 'sub'
  2228. X    gosub SUB2
  2229. X    echo 'back to sub'
  2230. X    return
  2231. X
  2232. X
  2233. X    SUB2
  2234. X    echo 'sub2'
  2235. X    return
  2236. X
  2237. X
  2238. X
  2239. X
  2240. X    5.2.31  gosubb
  2241. X
  2242. X    usage: gosubb <label>
  2243. X
  2244. X    This command serves    the same function as the gosub command except the
  2245. X    programmer is signifying that the label is behind the current statement,
  2246. X    resulting in slightly faster execution.  (The label    is not REQUIRED    to
  2247. X    be at any specific location    in the procedure relative to the gosubb
  2248. X    statement.)
  2249. X
  2250. X
  2251. X    5.2.32  goto
  2252. X
  2253. X    usage: goto    <label>
  2254. X
  2255. X    This command transfers control of procedure    to a statement other than
  2256. X    the    one immediately    following.  The    <label>    argument may be    literal    text
  2257. X    or may be a    string,    allowing a "computed goto" feature.
  2258. X
  2259. X
  2260. X
  2261. X
  2262. X    Public Domain by wht@n4hgf                12/26/90
  2263. X
  2264. X
  2265. X
  2266. X
  2267. X
  2268. X
  2269. X
  2270. X    ECU    Technical Description                      63
  2271. X
  2272. X
  2273. X
  2274. X    Example:
  2275. X
  2276. X    goto GET_NEXT
  2277. X    goto 'GET_NEXT'
  2278. X    goto 'GET'+'_NEXT'
  2279. X    $s0 = 'GET_NEXT'; goto $s0
  2280. X    $s0 = 'NEXT'; goto 'GET_'+$s0
  2281. X
  2282. X    Note: all the above    examples cause transfer    to the label GET_NEXT.
  2283. X
  2284. X
  2285. X    5.2.33  gotob
  2286. X
  2287. X    usage: gotob <label>
  2288. X
  2289. X    This command serves    the same function as the goto command except the
  2290. X    programmer is signifying that the label is behind the current statement,
  2291. X    resulting in slightly faster execution.  (The label    is not REQUIRED    to
  2292. X    be at any specific location    in the procedure relative to the gotob
  2293. X    statement.)
  2294. X
  2295. X
  2296. X    5.2.34  hangup
  2297. X
  2298. X    usage: hangup
  2299. X
  2300. X    This command causes    Data Terminal Ready (DTR) to be    dropped    momentarily,
  2301. X    causing (hopefully)    the termination    of any current connection to a
  2302. X    remote system. This    command    is only    effective if the attached Data
  2303. X    Communications Equipment is    configured to terminate    its connection on
  2304. X    loss of DTR.
  2305. X
  2306. X    If no line is attached, the    command    is ignored (a warning is generated
  2307. X    if procedure tracing is enabled).
  2308. X
  2309. X
  2310. X    5.2.35  hexdump
  2311. X
  2312. X    usage: hexdump [-s]    <str>
  2313. X       hexdump -t[s] <str1>    <str>
  2314. X
  2315. X
  2316. X    <str> buf to dump <str1> title (if -t) -s short (terse) dump
  2317. X
  2318. X    This command prints    a hexadecimal dump of <str> on the screen (and to
  2319. X    the    procedure log file, if logging enabled with the    ptrace command).
  2320. X
  2321. X    The    switch '-t' signifies that <str1> is a title to    be printed
  2322. X
  2323. X
  2324. X
  2325. X
  2326. X
  2327. X
  2328. X    Public Domain by wht@n4hgf                12/26/90
  2329. X
  2330. X
  2331. X
  2332. X
  2333. X
  2334. X
  2335. X
  2336. X    ECU    Technical Description                      64
  2337. X
  2338. X
  2339. X
  2340. X    Example:
  2341. X
  2342. X    $s0='The quick brown fox jumped    over the lazy dog's back'
  2343. X    hexdump    -t 'Example hex    dump' $s0
  2344. X    ---------------------------- Example hex dump ----------------------------
  2345. X    0000  54 68    65 20 71 75 69 63 6B 20    62 72 6F 77 6E 20 | The    quick brown  |
  2346. X    0010  66 6F    78 20 6A 75 6D 70 65 64    20 6F 76 65 72 20 | fox    jumped over  |
  2347. X    0020  74 68    65 20 6C 61 7A 79 20 64    6F 67 27 73 20 62 | the    lazy dog's b |
  2348. SHAR_EOF
  2349. true || echo 'restore of doc/ecu.man failed'
  2350. echo 'End of ecuman3 part 2'
  2351. echo 'File doc/ecu.man is continued in part 3'
  2352. echo 3 > _shar_seq_.tmp
  2353. exit 0
  2354. --------------------------------------------------------------------
  2355. Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
  2356. Hacker Extraordinaire  d' async PADs,  pods,  proteins and protocols
  2357.  
  2358. exit 0 # Just in case...
  2359. -- 
  2360. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  2361. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  2362. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  2363. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  2364.