home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 712 / tcli / tcli.doc < prev    next >
Encoding:
Text File  |  1993-06-16  |  48.8 KB  |  1,453 lines

  1.  
  2.  
  3.  
  4.  
  5.                       TCLI - TOS Command Line Interpreter
  6.                       -----------------------------------
  7.  
  8. With the recent success of graphical user interfaces, many people have turned
  9. their backs on command-oriented interfaces.  A significant number, however,
  10. still prefer the familiar MS-DOS-style command line interpreter (CLI); to these
  11. people, typing "DIR" is an instinctive and often subconscious reflex when they
  12. want to display a directory of the files on a disk.  Window-oriented
  13. environments often hinder these users, as well as prohibit access to some
  14. functions that CLI users take for granted.  The TOS Command Line Interpreter
  15. (TCLI) is a program for the Atari ST/STE/TT lines of computers that brings much
  16. of the functionality and familiarity of MS-DOS to the Atari world.
  17.  
  18. To use TCLI, copy the files in this archive to a newly formatted disk, or to
  19. your hard drive.  It is also suggested that you print out this documentation,
  20. for instruction now and for future reference.  Now, go into the directory you
  21. just copied the files to and double-click on the file COMMAND.PRG.  TCLI should
  22. now be up and running, and you should be presented with a prompt like "A>" or
  23. "C>" depending on where you ran the program from.  At this point, you will be
  24. able to enter TCLI commands, which are described in detail below, or you can
  25. run an external program.  First, however, we will describe the format of
  26. filenames as TCLI interprets them.
  27.  
  28.  
  29. FILENAME FORMAT
  30. ---------------
  31.  
  32. The file structure of the Atari ST is very similar to MS-DOS.  This was a smart
  33. move on Atari's part, as it facilitated porting of commercial software over to
  34. the ST.  If you are familiar with MS-DOS, you may want to skip this section and
  35. move on to "Running External Programs" below.
  36.  
  37. NOTE: Quotation marks are used throughout this documentation to clarify
  38.       exactly what the user should enter at the TCLI prompt.  The one
  39.       exception is in the FIND command, in which quotes are a part of the
  40.       command's syntax.  In all other cases, the quotes are NOT to be
  41.       typed by the user.
  42.  
  43. For the following discussion, let's assume that your C drive has the following
  44. file structure:
  45.  
  46. \                    - root directory
  47. \FILES\              - subdirectory containing some files
  48. \FILES\SOURCE\       - source code
  49. \EXECS\              - executable programs
  50.  
  51. The main (root) directory on the ST is referred to as "\"; for example, the
  52. root direcory on drive C is "C:\".  All other directories are stored underneath
  53. the root directory.  For example, a subdirectory called "FILES" under the root
  54. directory on drive C would be accessed as "C:\FILES\".  The drive letter
  55. displayed at the prompt indicates what the current drive is.  If the file(s)
  56. you want to access are on the current drive, you need not specify the drive
  57. letter or colon in the filename (i.e., "\FILES\" would access subdirectory
  58. "FILES" on drive C's root directory).
  59.  
  60. The current drive described above is the drive displayed in the command prompt.
  61. To make another drive the current drive, simply enter the drive letter,
  62. followed by a colon (:), on a line by itself.  For example, to make drive A the
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. current drive, you would enter:
  72.  
  73.    A:
  74.  
  75. on a line by itself.  The command prompt should change to reflect the new
  76. current drive.
  77.  
  78. Another important concept here is the current directory.  This is the directory
  79. that is searched for all programs and data files, unless another path is
  80. specified.  To display the current directory, enter the command "PWD" with no
  81. parameters at the prompt, and press RETURN.  This will be the directory from
  82. which TCLI was started.  If you now try to execute an external program, TCLI
  83. will look in this directory for it.  Using our example file system above, if
  84. your current directory is "C:\FILES\", and you want to access a file in the
  85. SOURCE directory, you would use "C:SOURCE\MYFILE.DAT" to access it.  This means
  86. 'On the C drive, use the current directory, move down to the subdirectory
  87. "SOURCE", and the file I want to access is called "MYFILE.DAT"'.  If your
  88. current drive is C, then the above file could also be referenced simply as
  89. "SOURCE\MYFILE.DAT".
  90.  
  91. Using this scenario, if you want to run a file called "MYFILE.PRG" in the
  92. "EXECS" directory, you would enter "C:\EXECS\MYFILE.PRG" at the command prompt.
  93. This is interpreted as 'Using drive C, start at the root directory, go into the
  94. "EXECS" directory, and execute the file called "MYFILE.PRG"'.  Again, if drive
  95. C is the current drive, you could equivalently enter "\EXECS\MYFILE.PRG" to
  96. accomplish the same task.
  97.  
  98. In summary, to reference a file in or below the current directory, do not enter
  99. a backslash (\) before the file specificier; to access a file that is not in or
  100. below the current directory, use a backslash followed by the path from the root
  101. directory.  If the drive letter is not specified, the current drive is used.
  102.  
  103. Two other directories that should be mentioned are "." and "..".  These refer
  104. to the current directory and the parent directory, respectively.  The current
  105. directory specifier is rarely stated directly, as it is implied in all cases in
  106. TCLI.  However, the parent directory specifier is used to "back up" a
  107. directory, moving up to the parent of the current directory.  For example, if
  108. the current directory is "\FILES\SOURCE", and you want to access a program
  109. called "PROGRAM.PRG" in the "FILES" directory, you could use "..\PROGRAM.PRG",
  110. instead of entering the complete path from the root directory.
  111.  
  112.  
  113. RUNNING AN EXTERNAL PROGRAM
  114. ---------------------------
  115.  
  116. To run an external program, simply type the first part of the filename,
  117. followed by a space and any parameters for the command.  For example, to run a
  118. program entitled "PROG.PRG" in the current directory, enter "PROG".  TCLI will
  119. look for the file names ending in ".PRG", ".TTP", and ".TOS" to find the
  120. program you want to run.  You can eliminate this search by specifying the
  121. extension as well (i.e., enter "PROG.PRG" at the prompt).
  122.  
  123. The way TCLI decides what files to attempt to load first depends on the
  124. presence of parameters.  If there are parameters present, TCLI first looks for
  125. the ".TTP" extension, followed by ".PRG" and finally ".TOS".  If there are no
  126. parameters, TCLI looks first for a ".PRG" extension, then ".TOS", and finally
  127. ".TTP".
  128.  
  129.  
  130.  
  131.                                  TCLI - Page 2
  132.  
  133.  
  134.  
  135.  
  136.  
  137. If the program you want to run is a .TOS or .TTP program, TCLI will not clear
  138. the screen before or after the program is run; this way, commands can be
  139. "added" to TCLI by simply writing the programs and giving them a .TOS or .TTP
  140. extension.  The RAMdisk program VDISK.TTP supplied as part of TCLI is an
  141. example of such a program.  As long as these programs rely on textual input and
  142. output, they will integrate themselves seamlessly into the TCLI environment.
  143. If you want the screen to be cleared before and after a .TOS or .TTP program is
  144. run, enter "/C" on the line as a parameter.  Note that this is not a good idea
  145. if the program you are running has a "/C" option and you want to use that
  146. option, since TCLI will not pass the "/C" as a parameter to the executing
  147. program (this can be circumvented by specifying "/C" twice, once for TCLI and
  148. once for the other program).
  149.  
  150. On the other hand, .PRG programs will generally corrupt the text display in
  151. many ways.  Recognizing this,  TCLI will always clear the screen before and
  152. after such programs run.
  153.  
  154. Parameters passed through TCLI will be converted to upper-case, and will be
  155. placed in the command line buffer for the program being executed.
  156.  
  157.  
  158. OTHER GENERAL INFORMATION
  159. -------------------------
  160.  
  161. TCLI is based on the MS-DOS command set, but it also has some aliases for each
  162. command that are shorter and easier to remember, and it also contains some UNIX
  163. command aliases (the format of the command still follows the MS-DOS prototype,
  164. however).
  165.  
  166.  
  167. INTERNAL COMMANDS
  168. -----------------
  169.  
  170. This section contains descriptions of all of TCLI's internal commands.  To
  171. execute an internal command, simply enter the command and any necessary
  172. parameters.  Each command's syntax is described in its section.  Necessary
  173. parameters are listed after the command, and optional parameters are listed
  174. within square brackets ([]); a "|" symbol is used to indicate that one
  175. parameter or the other should be specified, but not both.  Filenames are
  176. indicated by "fname", pathnames by "path", and drive letters by "n".
  177.  
  178. When filenames are used in TCLI commands, wildcards can be implied by the
  179. context in which the filenames are specified.  If a filename ends in a
  180. backslash (\), wildcards are implied at the end of it.  For example, if
  181. "\EXECS\" is specified as a filename, the actual filename that TCLI would use
  182. is "\EXECS\*.*".  If, however, the filename "\EXECS" is specified, only the
  183. directory "\EXECS" would be interpreted as the filename.
  184.  
  185. The commands are presented in alphabetical order, according to the MS-DOS alias
  186. (i.e., the directory command will be listed under DIR, not LS).
  187.  
  188.  
  189. Command:  ATTRIB
  190. Function: Displays and modifies file attribute flags.
  191. Syntax:   ATTRIB [+A|-A] [+H|-H] [+R|-R] [+S|-S] [path][fname]
  192. Aliases:  ATTR, CHMOD
  193.  
  194. The ST file system supports four user-modifiable flags for each file/directory.
  195.  
  196.  
  197.                                  TCLI - Page 3
  198.  
  199.  
  200.  
  201.  
  202.  
  203. ATTRIB allows you to modify these flags.  The "+" sign indicates that the flag
  204. is to be set, and "-" indicates that the flag is to be reset.
  205.  
  206. If no filename is specified, but flags are, TCLI assumes all files in the
  207. current directory on the current drive are to be modified.  If no flags or
  208. filenames are specified, ATTRIB will display the attributes of the files in the
  209. current directory on the current drive.  The format of the display is
  210.  
  211.    ahrs filename.ext
  212.  
  213. where a, h, r, and s indicate the appropriate flags.  If a letter appears next
  214. to a filename, it indicates that the corresponding flag is set; if, instead, a
  215. dash (-) appears, it indicates that the flag is not set.
  216.  
  217. +A/-A: Archive Flag
  218. -------------------
  219.  
  220. The first flag is the archive bit, which is reset every time a file is written
  221. to.  This is useful when developing a project from a RAMdisk, or when you want
  222. to keep an updated copy of your source code on a floppy.  For example, let's
  223. assume that a project is being developed on drive C, written in C.  This
  224. project spans many files, which we would like to back up on a floppy whenever
  225. we change the source code.  To begin, we would set the archive bits on all of
  226. our source files like this:
  227.  
  228.    ATTRIB +A C:\SOURCE\*.C
  229.  
  230. At the end of our development session, we would use the COPY command to back up
  231. only those files that have been modified, by using this command:
  232.  
  233.    COPY C:\SOURCE\*.C A:\BACKUP\ /R
  234.  
  235. This tells TCLI to copy all unarchived .C files from C:\SOURCE\ to the \BACKUP
  236. directory on drive A, and to reset the archive bits of those files that were
  237. successfully backed up.  (See the COPY command description for more
  238. information)
  239.  
  240. +H/-H: Hidden Flag
  241. ------------------
  242.  
  243. The hidden flag determines whether the file specified should be visible to the
  244. normal directory search.  If a file is hidden (+H), TCLI will not display it in
  245. its directory listing; however, it can still be accessed by TCLI commands, and
  246. by most other programs.  The GEM desktop doesn't support the hidden flags, so
  247. these files will still appear in the desktop window.
  248.  
  249. +R/-R: Read-only Flag
  250. ---------------------
  251.  
  252. The read-only flag enables the user to write-protect the file(s) specified by
  253. setting the read-only bit.  When a write is attempted to a read-only file, an
  254. "access denied" error message is returned.  To regain write access to the file,
  255. you must reset the read-only bit.
  256.  
  257. +S/-S: System File Flag
  258. -----------------------
  259.  
  260. The system file flag, for all practical purposes, performs the same task as the
  261.  
  262.  
  263.                                  TCLI - Page 4
  264.  
  265.  
  266.  
  267.  
  268.  
  269. hidden flag.  As with the hidden flags, the GEM desktop does not support the
  270. system file flags.
  271.  
  272.  
  273. Command:  BG
  274. Function: Changes/displays the background color.
  275. Syntax:   BG [color]
  276.  
  277. The default color configuration of TCLI is white text on a black background.
  278. These colors can easily be changed to any of the 512 colors that the ST
  279. supports.  The BG command is used to change the background, while FG is used to
  280. change the foreground (text) color (see below).
  281.  
  282. BG accepts either a named color that is predefined within TCLI, or a
  283. three-character string of the form "RGB", where R, G, and B are digits between
  284. "0" and "7", inclusive.  R, G, and B indicate level of the red, green, and blue
  285. color components, with "0" being the absence of that color, and "7" being the
  286. maximum presence of the respective color.
  287.  
  288. The predefined colors that BG recognizes are as follows:
  289.  
  290.     Aqua                     Green
  291.     Black                    LightBlue
  292.     Blue                     Orange
  293.     Brown                    Pink
  294.     DarkBlue                 Purple
  295.     DarkRed                  Red
  296.     ForestGreen (Forest)     White
  297.     Gray (Grey)              Yellow
  298.  
  299. The names in parentheses indicate alternative names for the respective colors.
  300.  
  301. If BG is executed without a parameter, it will display the current RGB
  302. settings.
  303.  
  304. Examples:
  305.  
  306.     BG WHITE
  307.     BG 777
  308.  
  309. These two commands both set the background color to white.  If the BG command
  310. were then executed without parameters, TCLI would display:
  311.  
  312.     BG = 777
  313.  
  314.  
  315. Command:  BUFFER
  316. Function: Toggles keyboard buffering on/off.
  317. Syntax:   BUFFER [ON|OFF]
  318.  
  319. This command toggles the keyboard buffering.  When it is OFF, TCLI intercepts
  320. all keyboard input, and provides protection against accidentally exiting TCLI
  321. by pressing CONTROL-C.  However, keystrokes are not buffered; you have to wait
  322. until the current process is finished before you can enter the next command.
  323.  
  324. When BUFFER is ON, the keyboard input is buffered, but pressing CONTROL-C while
  325. anything is being displayed on the screen will abort TCLI, with no questions
  326. asked.
  327.  
  328.  
  329.                                  TCLI - Page 5
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336. Using BUFFER with no parameters displays the current setting.
  337.  
  338.  
  339. Command:  CAPS
  340. Function: Turns the uppercase conversion of characters on/off.
  341. Syntax:   CAPS [ON|OFF]
  342.  
  343. This command allows you to change whether TCLI capitalizes your input or not.
  344. This can be useful when you're dealing with variables and don't care if the
  345. output of the ECHO command is capitalized or not.
  346.  
  347. When CAPS is ON, all input is capitalized; when it's off, the command line
  348. parameters for certain commands (ECHO, etc.) is left unchanged.
  349.  
  350. Using CAPS by itself displays the current setting.
  351.  
  352.  
  353. Command:  CD
  354. Function: Changes the current working directory.
  355. Syntax:   CD path
  356. Alias:    CHDIR
  357.  
  358. The CD command changes the current directory for the specified drive, or the
  359. current drive if none is specified.  The current directory can be displayed by
  360. using the PWD command (see below), or by using the $P option in the command
  361. prompt (see PROMPT below).
  362.  
  363.  
  364. Command:  CHKDSK
  365. Function: Displays information on the drive specified.
  366. Syntax:   CHKDSK [n:]
  367.  
  368. The CHKDSK command displays information about the disk specified, or the
  369. current disk.  The first item it displays is the disk size; this is the total
  370. amount of storage space on the disk (in bytes).  Next, it displays the number
  371. of hidden files, directories, and user files, as well as separate totals of the
  372. number of bytes in each of these groups.  Next, the number of bytes available
  373. on the disk is displayed, and finally, the total amount of RAM in the computer
  374. and the total amount of free RAM available.
  375.  
  376.  
  377. Command:  CLS
  378. Function: Clears the screen.
  379. Syntax:   CLS
  380.  
  381. The CLS command can be used to clear the screen.  It is especially useful after
  382. a batch file has executed, to clean up the display.
  383.  
  384.  
  385. Command:  COPY
  386. Function: Copies/moves files from one place to another.
  387. Syntax:   COPY [n:][path]from [[n:][path]to] [/A|/R] [/M]
  388. Alias:    CP
  389.  
  390. The COPY command copies or moves files from one location to another.  In the
  391. simplest case, one file is copied directly to another place:
  392.  
  393.  
  394.  
  395.                                  TCLI - Page 6
  396.  
  397.  
  398.  
  399.  
  400.  
  401.    COPY EXECS\FILE.DAT B:\
  402.  
  403. When a single file is copied, it can also be renamed in the process:
  404.  
  405.    COPY EXECS\FILE.DAT B:\NEWFILE.DAT
  406.  
  407. Wildcards may be specified in the source, but in this case, the destination
  408. must be ONLY a path name, so renaming is not possible:
  409.  
  410.    COPY EXECS\*.C B:\FILES\
  411.  
  412. The following command will copy all files in the C:\EXECS directory to the
  413. current directory on the B drive:
  414.  
  415.    COPY EXECS\*.* B:
  416.  
  417. By using the /A option, COPY will only copy files that do not have their
  418. archive bit set (see ATTRIB above).
  419.  
  420. By using the /R option, COPY will only copy files whose archive bit is not set,
  421. but it will then set the archive bit if the copy was successful.  If the /R
  422. option is used, the /A option does not have to be specified.  For example, to
  423. archive all files under C:\SOURCE onto the current directory on drive B:,
  424. automatically flagging the archived files as archived, this command would be
  425. used:
  426.  
  427.    COPY C:\SOURCE\ B: /R
  428.  
  429. The /M option is used to move files from one disk to another.  The specified
  430. files are copied to the new disk, then deleted from the old one if the copy was
  431. successful.  This option can be combined with the /A option, or, equivalently
  432. in this case, the /R option.
  433.  
  434. The following example will move all .C files from C:\SOURCE to D:\SOURCE:
  435.  
  436.    COPY C:\SOURCE\ D:\SOURCE\ /M
  437.  
  438.  
  439. Command:  CURSOR
  440. Function: Defines the flash rate for the cursor.
  441. Syntax:   CURSOR [x]      (where "x" is an integer between 1 and 255)
  442.  
  443. To make the cursor flash, use the CURSOR command.  By entering a number between
  444. 1 and 255, the cursor will start flashing at the desired rate (which depends on
  445. your monitor).  The lower the number, the faster the cursor will flash.  To
  446. stop the cursor from flashing, enter the CURSOR command with no parameters.
  447.  
  448. NOTE:  Sometimes there is a delay between the execution of this command
  449.        and the actual change in the cursor's flash rate.
  450.  
  451.  
  452. Command:  DA
  453. Function: Allows access to Desk Accessories.
  454. Syntax:   DA
  455.  
  456. This command allows you to access desk accessories. When you invoke DA, the
  457. screen is cleared, and a menu bar appears at the top of the screen.  Run the
  458. appropriate desk accessory, then choose "Return to TCLI" to exit back to TCLI.
  459.  
  460.  
  461.                                  TCLI - Page 7
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469. Command:  DATE
  470. Function: Displays/sets the system date.
  471. Syntax:   DATE [month-day-year]
  472.  
  473. To display the system date, enter the DATE command with no parameters.  To set
  474. the system date, specify the date in the format described above.  The day and
  475. month can be any valid day and month, and the year can be in either a two-digit
  476. or four-digit format.  The following two commands set the date to February 1,
  477. 1993:
  478.  
  479.    DATE 2-1-1993
  480.         and
  481.    DATE 2-1-93
  482.  
  483.  
  484. Command:  DIR
  485. Function: Displays a directory of files on a disk.
  486. Syntax:   DIR [n:][path][fname] [/P] [/W]
  487. Alias:    LS
  488.  
  489. To display a listing of the files on a disk (or in a directory), use the DIR
  490. command.
  491.  
  492. The default directory will be displayed in a format that displays the filename,
  493. extension, size, and time and date of creation or last modification.  This
  494. listing will be sorted first on the file's extension, and secondly on the
  495. filename.  At the end of the directory, the number of files and the amount of
  496. free space on the disk are displayed.
  497.  
  498. If a filename is specified, the directory will be scanned for files matching
  499. the filename; wildcards are, of course, permitted.  Only files matching the
  500. specified name will be displayed.  For example, the following command will
  501. display all filenames in C:\SOURCE\ ending in .C:
  502.  
  503.    DIR C:\SOURCE\*.C
  504.  
  505. If the /P option is specified, the directory contents are displayed one
  506. screenful at a time.  When the screen fills up, you will be told to press any
  507. key to continue; do so, and the next page will be displayed.
  508.  
  509. If the /W option is specified, the directory is displayed in a compressed
  510. format.  Only the filenames are displayed; directories are identified by a
  511. backslash (\) before their names.
  512.  
  513.  
  514. Command:  ECHO
  515. Function: Turns batch command echo on or off; displays messages.
  516. Syntax:   ECHO [ON|OFF|Message]
  517.  
  518. The ECHO command is used to turn off or turn on the display of batch file
  519. commands as they are executed.  To supress the display of batch file commands,
  520. use ECHO OFF; to resume display of the commands, use ECHO ON.
  521.  
  522. If anything other than ON or OFF is passed into ECHO as a parameter, that
  523. string is displayed on the screen.  If no parameters are specified, a blank
  524. line is printed.  This can be useful in a batch file to keep the user updated
  525.  
  526.  
  527.                                  TCLI - Page 8
  528.  
  529.  
  530.  
  531.  
  532.  
  533. on what is happening; enter "ECHO ON" as the first line in the batch file, then
  534. use subsequent ECHO commands to display status information.
  535.  
  536.  
  537. Command:  EDLIN
  538. Function: Allows the user to create a line-oriented text file.
  539. Syntax:   EDLIN [n:][path]fname
  540. Alias:    ED
  541.  
  542. The EDLIN command can be used to create a short text file from within TCLI (to
  543. create large files or to edit existing files, use a full-fledged text editor).
  544. EDLIN will only accept lines up to 78 characters as input to the file.  The
  545. current line can be edited by using BACKSPACE on that line; once RETURN is
  546. pressed, however, the line is added to the file.  To end EDLIN, press RETURN on
  547. a blank line.
  548.  
  549. If the file specified exists, you will be asked if you want to overwrite the
  550. file; enter 'Y' (or 'y') to overwrite it and create a new file, or anything
  551. else to abort EDLIN.
  552.  
  553. EDLIN is of most use as a quick editor when creating short batch files or very
  554. small programs.
  555.  
  556.  
  557. Command:  ERASE
  558. Function: Removes the file(s) specified from a disk.
  559. Syntax:   ERASE [n:][path]fname
  560. Aliases:  ERA, DELETE, DEL, RM
  561.  
  562. To erase a file or group of files, use the ERASE command.  ERASE does not
  563. prompt you before deleting files unless you are deleting all files on a disk or
  564. in a directory (i.e., "ERASE *.*"), so be sure that you do want to delete the
  565. files before you press RETURN.
  566.  
  567. It is a good idea to have an "unerase" utility around, in case you do
  568. accidentally erase a file you need.  If you do inadvertently erase a file, DO
  569. NOT write to the disk!  If you write to the disk after deleting a file, the
  570. file will probably be rendered unrecoverable.
  571.  
  572. If you attempt to erase all the files in a directory, ERASE will ask you if
  573. you're sure you want to do that.  If you do, enter "Y" or "y", and the files
  574. will be erased; otherwise, the ERASE will be aborted.
  575.  
  576.  
  577. Command:  EXIT
  578. Function: Returns to the program that called TCLI.
  579. Syntax:   EXIT
  580. Aliases:  QUIT, BYE
  581.  
  582. To leave TCLI and return to the desktop (or whatever program called TCLI), use
  583. the EXIT command.
  584.  
  585.  
  586. Command:  FG
  587. Function: Sets/displays the foreground (text) color.
  588. Syntax:   FG [color]
  589.  
  590. The FG command sets TCLI's text color.  It works exactly the same as BG (see
  591.  
  592.  
  593.                                  TCLI - Page 9
  594.  
  595.  
  596.  
  597.  
  598.  
  599. above).
  600.  
  601.  
  602. Command:  FIND
  603. Function: Searches the file(s) specified for the indicated search term.
  604. Syntax:   FIND "string" [n:][path]fname
  605. Alias:    GREP
  606.  
  607. The FIND command is provided to search through line-oriented text files for a
  608. specific search term.  Only the first 128 characters in each line is actually
  609. searched; this should pose no problem for the average text file.
  610.  
  611. FIND displays each occurence of the search term in the file by displaying the
  612. line number and the line itself.  It then displays the total number of
  613. occurences of the string in the file.  The search is not case-sensitive, since
  614. FIND converts everything to upper-case as it searches for the string.
  615.  
  616. By using wildcard characters, a group of files can be searched for the string.
  617. In this case, FIND displays the name of each file being searched, the lines in
  618. which the search term is found, the total number of occurences of the string
  619. within each file, and finally, the total number of occurences found within the
  620. group of files.
  621.  
  622. As an example, suppose you want to search all Pascal source files in the
  623. current directory for the term "PROCEDURE".  You would enter a command like
  624. this:
  625.  
  626.    FIND "Procedure" *.PAS
  627.  
  628. It is often useful to redirect the output of the FIND command to a disk file or
  629. the printer.  To redirect output to a file called "PROC.FND", for example, you
  630. would enter:
  631.  
  632.    FIND "Procedure" *.PAS >PROC.FND
  633.  
  634. Having done that, you can browse through the file, display it using the TYPE
  635. command (see below), or print it out.  See the section on I/O Redirection for
  636. information on how to do this.
  637.  
  638.  
  639. Command:  FORMAT
  640. Function: Format a floppy disk.
  641. Syntax:   FORMAT [n:] [/T:tracks] [/N:sectors] [/1]
  642.  
  643. The FORMAT command is used to format a floppy disk.  By specifying the number
  644. of tracks (80-82) and the number of sectors per track (9-11), you can generate
  645. a variety of disk formats for the ST.  The default format uses both sides of
  646. the disk, 80 tracks, and 10 sectors per track, yielding approximately 800K of
  647. storage space per disk.  These defaults can be changed by using the "/T:"
  648. option to specify tracks, "/N:" to specify sectors per track, and "/1" to force
  649. a single-sided format.  For example, to format a disk in drive A to 80 tracks,
  650. 9 sectors per track, single sided, you would enter:
  651.  
  652.    FORMAT A: /N:9 /1
  653.  
  654. To format the same disk to double-sided, simply leave off the "/1":
  655.  
  656.    FORMAT A: /N:9
  657.  
  658.  
  659.                                  TCLI - Page 10
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666. To format a disk to 81 tracks, 11 sectors per track (not a recommended format,
  667. but possible), use the following:
  668.  
  669.    FORMAT A: /T:81 /N:11
  670.  
  671. Be aware that formatting a disk will erase everything on it.  To help guard
  672. against this, TCLI will prompt you when you try to format a disk.
  673.  
  674.  
  675. Command:  FREE
  676. Function: Toggles the display of disk free space for DIR command.
  677. Syntax:   FREE [ON|OFF]
  678.  
  679. This command allows you to turn off the display of free space in the DIR
  680. command.  When you execute the DIR command, the amount of free space left on
  681. the disk is displayed.  This causes a delay while the computer tries to figure
  682. out how much space is left, especially if the disk is a floppy.  Turn this
  683. feature off with the FREE OFF command.
  684.  
  685. If FREE is invoked with no parameters, the current setting is displayed.
  686.  
  687.  
  688. Command:  GOTO
  689. Function: Goes to a specified line in a batch file.
  690. Syntax:   GOTO label
  691.  
  692. This command, executable only from within a batch file, transfers execution of
  693. the batch file to the specified label.  The label must exist somewhere in the
  694. batch file, on a line by itself, preceded only by a colon (":").
  695.  
  696. In the following batch file, the ECHO statement is never executed:
  697.  
  698.    REM Batch file starts here...
  699.    GOTO CONT
  700.    ECHO This is never displayed.
  701.    :CONT
  702.    REM Batch file continues here...
  703.  
  704. Obviously, this command is most useful with a conditional statement (see the IF
  705. command, below).
  706.  
  707.  
  708. Command:  IF
  709. Function: Allows conditional execution of commands.
  710. Syntax:   IF [NOT] expression command
  711.  
  712. This command, only available from within batch files, allows the batch file to
  713. conditionally execute commands.
  714.  
  715. The "expression" statement must be one of these two forms:
  716.  
  717.    string1==string2
  718.          or
  719.     exist filename
  720.  
  721. For example, the COPY command below is executed ONLY if the source file exists,
  722. and the destination file doesn't exist:
  723.  
  724.  
  725.                                  TCLI - Page 11
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.    if not exist c:file.dat goto no_copy
  733.    if exist a:file.dat goto no_copy
  734.    copy c:file.dat a:
  735.    goto continue
  736.    :no_copy
  737.    echo Error - Source doesn't exist, or destination does exist.
  738.    :continue
  739.    rem Batch file continues here.
  740.  
  741. You can also compare strings with IF, which will substitute any variables that
  742. are included:
  743.  
  744.    :loop
  745.    echo 1. ST-Writer
  746.    echo 2. Personal Pascal
  747.    echo 3. Laser C
  748.    echo 4. Quit
  749.    echo
  750.    echo Enter your choice:
  751.    read c
  752.    if %C==1 goto do_stwriter
  753.    if %C==2 goto do_pascal
  754.    if %C==3 goto do_laserc
  755.    if %C==4 goto end
  756.    echo Bad choice! Try again.
  757.    goto loop
  758.    :do_stwriter
  759.    cd \stwriter
  760.    stwriter
  761.    goto loop
  762.    :do_pascal
  763.    cd \pascal
  764.    pascal
  765.    goto loop
  766.    :do_laserc
  767.    cd \laser_c
  768.    laser
  769.    goto loop
  770.    :end
  771.    echo Later, dude!
  772.  
  773. Note that the variable name "C" MUST be capitalized when the CAPS option is
  774. turned off; if CAPS is ON, there will be no problem if it is not capitalized,
  775. since TCLI will capitalize it for you.
  776.  
  777.  
  778. Command:  LC
  779. Function: Returns a line count of the file(s) specified.
  780. Syntax:   LC [n:][path]fname
  781.  
  782. The LC command can be used to count lines in text files.  This is useful when
  783. developing a large project that spans several files; you can simply use the
  784. command
  785.  
  786.    LC *.C
  787.  
  788. to count the number of lines of source code you have in your project.  LC will
  789.  
  790.  
  791.                                  TCLI - Page 12
  792.  
  793.  
  794.  
  795.  
  796.  
  797. display line counts for each file matching the filename, then it will give a
  798. cumulative total at the end.
  799.  
  800.  
  801. Command:  LET
  802. Function: Assigns a value to a variable.
  803. Syntax:   LET x=[string]
  804.  
  805. This command allows a variable to be changed.  There are twenty-six available
  806. variables, the letters A through Z.  It doesn't matter in the LET command
  807. whether the variable name is capitalized.  However, it DOES matter when the
  808. variable name is used elsewhere.
  809.  
  810. The following batch file illustrates the use of the LET command.
  811.  
  812.    echo What's your first name?
  813.    read f
  814.    echo What's your last name?
  815.    read l
  816.    let n=%F %L
  817.    echo Your name must be %N!
  818.  
  819. Notice that when the variables are referenced, they MUST be capitalized.
  820.  
  821. Variables are global; once they are set to a value, other batch files can
  822. access the variable's value.  This is a convenient way to pass values back and
  823. forth between batch files.
  824.  
  825.  
  826. Command:  MKDIR
  827. Function: Creates a directory.
  828. Syntax:   MKDIR [n:][path]dirname
  829.  
  830. To create a directory on a disk, use the MKDIR command.  Give the new directory
  831. name as a parameter, and, if possible, the new directory will be created on the
  832. drive specified, or on the current drive, if none is specified.
  833.  
  834.  
  835. Command:  MODE
  836. Function: Switches between low and high resolution.
  837. Syntax:   MODE [40|80]
  838.  
  839. If you will be using a low-resolution drawing program, or any other program
  840. that only runs in low resolution, you will have to switch to low resolution at
  841. the desktop, then run TCLI.  But a command line interpreter is not well suited
  842. to a 40-column display; the screen tends to get cluttered, and text files can't
  843. be viewed correctly.  TCLI solves this problem by enabling you to switch to
  844. another resolution, without changing the "actual" resolution of the system.  To
  845. do this, use the desktop to switch to low resolution.  Next, run TCLI, and
  846. enter this command:
  847.  
  848.    MODE 80
  849.  
  850. When you do, the screen should be switched to high resolution.  But the ST is
  851. not really in high-res mode; only text-based .TOS and .TTP programs will run in
  852. high resolution.  .PRG programs will revert back to low resolution, so you
  853. could then run your drawing package, then exit back to TCLI in high
  854. resolution.
  855.  
  856.  
  857.                                  TCLI - Page 13
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864. You can also switch to low resolution from high by entering "MODE 40", but all
  865. .PRG programs will still execute in high resolution.
  866.  
  867.  
  868. Command:  MORE
  869. Function: Displays a text file, one screenful at a time.
  870. Syntax:   MORE [n:][path]fname
  871. Aliases:  PG, PAGE
  872.  
  873. The MORE command allows the user to view a text file, one screen at a time.
  874. When the screen fills up, a message telling you to strike a key will appear.
  875. Press any key, and more of the file will be displayed.
  876.  
  877.  
  878. Command:  PATH
  879. Function: Specifies a path to be searched for programs.
  880. Syntax:   PATH [path;][path;]...[path]
  881.  
  882. When an unknown command is entered into TCLI, it looks in the current directory
  883. for the file.  If it is not found there, it will search through the directories
  884. contained in PATH to find the program.
  885.  
  886. PATH defaults to ";", which is the null path, indicating that no path other
  887. than the current one should be checked.  If you have a directory called EXECS
  888. on drive C, in which some executable programs are stored, you can enter
  889.  
  890.    PATH C:\EXECS\
  891.  
  892. and TCLI will search that directory every time it fails to find a program in
  893. the current directory.  If you have several directories, you could enter:
  894.  
  895.    PATH C:\EXECS\;C:\FILES\
  896.  
  897. Each of these directories will be searched when a program is not found in the
  898. current directory.
  899.  
  900. If you have an existing path and would like to append directories to it, enter
  901. a semicolon (;) before the first path in it.  For example, if we had executed
  902. the last example above, and we wanted to add "C:\EDITORS\" to our search path,
  903. we would enter
  904.  
  905.    PATH ;C:\EDITORS\
  906.  
  907. and our path would now be
  908.  
  909.    C:\EXECS\;C:\FILES\;C:\EDITORS\
  910.  
  911. If you will always be working with one drive, you can omit the drive letters
  912. and colons from the path names; however, if you will be using other drives, it
  913. is a good idea to leave the drive names in place.  This is because, if no drive
  914. is specified, TCLI will search through the PATH directories using the current
  915. drive; if another drive is made to be the current drive, then the paths
  916. probably won't exist there, and you'll get an error message.
  917.  
  918. To display the current PATH, enter PATH with no parameters.
  919.  
  920. NOTE: Although programs can be executed from the alternate paths, their
  921.  
  922.  
  923.                                  TCLI - Page 14
  924.  
  925.  
  926.  
  927.  
  928.  
  929.       resource files, data files, etc., can only be accessed if they are
  930.       in the CURRENT directory.
  931.  
  932.  
  933. Command:  PAUSE
  934. Function: Pauses a batch file, asking the user to press a key.
  935. Syntax:   PAUSE
  936.  
  937. This command enables a batch file to stop execution, and wait for the user to
  938. press any key.  When the user presses a key, the batch file continues where it
  939. left off.
  940.  
  941.  
  942. Command:  PRINT
  943. Function: Print a file on the printer.
  944. Syntax:   PRINT filename
  945.  
  946. This command prints the specified file on the printer.  It is functionally
  947. equivalent to "TYPE filename >PRN:"
  948.  
  949.  
  950. Command:  PROMPT
  951. Function: Changes the command prompt.
  952. Syntax:   PROMPT [string]
  953.  
  954. The PROMPT command enables the user to customize the TCLI prompt.  The default
  955. prompt is the current drive followed by a greater-than sign (">"), but PROMPT
  956. allows this to be modified to include the time, date, current path, and other
  957. items.
  958.  
  959. The prompt string can contain any text the user wants; the following control
  960. characters serve special purposes and display the data indicated:
  961.  
  962.     $b     "|" character
  963.     $d     Date
  964.     $e     ESC
  965.     $h     Backspace
  966.     $g     ">" character
  967.     $l     "<" character
  968.     $n     Current drive
  969.     $p     Current directory
  970.     $q     "=" character
  971.     $t     Current time
  972.     $v     TCLI version
  973.     $$     "$" character
  974.     $X     CR/LF (where "X" is any character other than those listed above)
  975.  
  976.  
  977. If no string is specified, the prompt is reset to the default string.
  978.  
  979. PROMPT Examples:
  980. ---------------
  981.  
  982.    Prompt String                      Prompt Displayed
  983.    -------------                      ----------------
  984.  
  985.    $n:$p\                             C:\CURRENT\PATH\
  986.    $p$g                               \CURRENT\PATH>
  987.  
  988.  
  989.                                  TCLI - Page 15
  990.  
  991.  
  992.  
  993.  
  994.  
  995.    It's $t, okay?                     It's 1:30:10 PM, okay?
  996.    It's $t on$x$d. The current$x      It's 1:30:10 PM on
  997.       path is $n:$p\ $g               7-20-1992. The current
  998.                                       path is C:\CURRENT\PATH\ >
  999.  
  1000. By using "$e" (ESC) in the command line, you can access the ST's built-in VT52
  1001. emulator routines.  To see "$e" in action, try the following command:
  1002.  
  1003.    prompt $ej$eH$epDrive: $n:  Path: $p\  Time: $t  Date: $d$eK$eq$ek==$g
  1004.  
  1005. This command changes the command prompt to display the current drive, path,
  1006. time and date at the top of the screen, in reverse video.  It works like this:
  1007. "$ej" saves the current cursor position, "$eH" takes the cursor to the home
  1008. position, without clearing the screen, and "$ep" causes all text to be
  1009. displayed in reverse video.  The text string, along with the PROMPT variables,
  1010. is then displayed.  "$eK" clears the rest of the line, "$eq" restores normal
  1011. video output, "$ek" returns the cursor to its saved position, and the prompt
  1012. that is displayed is changed to "==>".
  1013.  
  1014.  
  1015. Command:  PWD
  1016. Function: Displays the current directory.
  1017. Syntax:   PWD [n:]
  1018.  
  1019. To display the current directory of a disk drive, use the PWD command.  This is
  1020. of most use when you don't have the prompt set up to display the current
  1021. working directory.
  1022.  
  1023.  
  1024. Command:  READ
  1025. Function: Allows a batch file to read input from the user.
  1026. Syntax:   READ x
  1027.  
  1028. This command reads input from the user, from within a batch file.  It assigns
  1029. whatever the user enters to the variable specified; variables are simply
  1030. letters of the alphabet.  When used with the READ command, variable names do
  1031. not have to be capitalized.
  1032.  
  1033. Variable names are global, so once a variable has been set, other batch files
  1034. can use the same variable, with its contents unchanged.
  1035.  
  1036. Command:  RENAME
  1037. Function: Renames a file.
  1038. Syntax:   RENAME [n:][path][fname]
  1039. Aliases:  REN, MOVE, MV
  1040.  
  1041. The RENAME command allows the user to rename a file on disk.  Wildcards are not
  1042. allowed; only one specific file can be renamed at one time.
  1043.  
  1044. For example, the following command renames the file "C:\PATH\FILE.DAT" to
  1045. "NEWFILE.DAT":
  1046.  
  1047.    RENAME C:\PATH\FILE.DAT NEWFILE.DAT
  1048.  
  1049. Note that the second filename does not need the drive or path specified to
  1050. perform a rename.
  1051.  
  1052. The RENAME command can also be used to move a file from one directory to
  1053.  
  1054.  
  1055.                                  TCLI - Page 16
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061. another.  To do this, simply specify the destination path (with respect to the
  1062. current directory) along with the second filename.  Even in this case, the
  1063. second filename is REQUIRED!  The following command moves the file "FILE.DAT"
  1064. from \PATH\ to \NEWPATH\FILES\:
  1065.  
  1066.    MV \PATH\FILE.DAT \NEWPATH\FILES\FILE.DAT
  1067.  
  1068. The file can easily be renamed in the course of a MOVE:
  1069.  
  1070.    MV \PATH\FILE.DAT \NEWPATH\FILES\NEWFILE.DAT
  1071.  
  1072. This command can not be used to move files between disks; see the COPY command
  1073. for details on how to do that.
  1074.  
  1075.  
  1076. Command:  RMDIR
  1077. Function: Deletes an empty directory.
  1078. Syntax:   RMDIR [n:][path][dirname]
  1079.  
  1080. The RMDIR command allows the user to delete empty directories.  If this command
  1081. is attempted on a directory that contains files, an error (access denied) will
  1082. be returned.
  1083.  
  1084. For example, to remove a directory called "C:\FILES\SUBDIR", enter:
  1085.  
  1086.    RMDIR C:\FILES\SUBDIR
  1087.  
  1088.  
  1089. Command:  SUBST
  1090. Function: Allows the substitution of paths by drive letters.
  1091. Syntax:   SUBST [n:] [[n:]path]
  1092.  
  1093. The SUBST command allows the user to replace commonly used path names by a
  1094. simple drive letter.  For example, suppose a user wants to easily access files
  1095. under a directory called "\SOURCE\FILES\" on drive C.  The following command
  1096. could be entered:
  1097.  
  1098.    SUBST Z: C:\SOURCE\FILES\
  1099.  
  1100. and from then on, the files under that directory could be accessed as Z:fname.
  1101. If a file called "FILE.DAT" existed under this directory, it could then be
  1102. accessed as "Z:FILE.DAT".  The command
  1103.  
  1104.    COPY Z:FILE.DAT B:
  1105.  
  1106. would copy the file C:\SOURCE\FILES\FILE.DAT to the current directory on drive
  1107. B:.
  1108.  
  1109. The substitutions are performed internally by TCLI, before parameters are
  1110. passed to the called program.  This way, if the filename "Z:FILE.DAT" is
  1111. entered as a parameter to an external program, the actual filename (i.e.,
  1112. "C:\SOURCE\FILES\FILE.DAT") would be passed to the program.  Substitutions are
  1113. not valid within any called programs, however; a "drive not valid" error will
  1114. likely be returned if an attempt is made to access a SUBSTituted drive.
  1115.  
  1116. If no drive is specified, the current drive is inserted into the substituted
  1117. filename.
  1118.  
  1119.  
  1120.  
  1121.                                  TCLI - Page 17
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127. The CD command can not be use with a SUBSTituted drive; using it shouldn't
  1128. cause any problem, but no error indicating that it failed will be returned.
  1129.  
  1130. To release a substituted drive, simply enter "SUBST n:".
  1131.  
  1132. To display a list of SUBSTituted drives/paths, enter SUBST with no parameters.
  1133.  
  1134.  
  1135. Command:  TIME
  1136. Function: Displays/sets the current time.
  1137. Syntax:   TIME [[h]h:mm[:ss] [AM|PM]]
  1138.  
  1139. The TIME command is used to set the computer's internal clock.  At least one
  1140. "hours" digit is necessary, as well as both "minutes" digits; seconds are
  1141. optional, as is an AM/PM designation.  If neither AM nor PM is specified, the
  1142. time is interpreted in a twenty-four hour format.  Examples:
  1143.  
  1144.    TIME 1:30 PM
  1145.    TIME 01:30:00 PM
  1146.    TIME 13:30
  1147.    TIME 13:30:00
  1148.  
  1149. All four of these commands set the clock to 1:30 PM.
  1150.  
  1151. If TIME is entered with no parameters, the current time is displayed, and the
  1152. user is prompted for the current time.  To change the time, enter the new time;
  1153. otherwise, press RETURN, and the time will not be modified.
  1154.  
  1155.  
  1156. Command:  TREE
  1157. Function: Displays a directory tree of the disk/directory specified.
  1158. Syntax:   TREE [n:][path] [/F]
  1159.  
  1160. The TREE command is used to display a visual interpretation of the directory
  1161. structure on a disk.  If no drive is specified, the current drive is used.  If
  1162. no path is specified, the tree display begins with the current path on the
  1163. drive being scanned.
  1164.  
  1165. By default, the TREE command will display only the directories that it
  1166. encounters during its disk traversal.  To force TREE to also display files
  1167. contained in the directories, specify the "/F" option.
  1168.  
  1169. This command displays the directory structure under the current directory on
  1170. drive C:
  1171.  
  1172.    TREE C:
  1173.  
  1174. This command displays drive C:'s entire directory structure, regardless of the
  1175. current directory:
  1176.  
  1177.    TREE C:\
  1178.  
  1179.  
  1180. Command:  TYPE
  1181. Function: Displays a file on the screen.
  1182. Syntax:   TYPE [n:][path][fname]
  1183. Alias:    CAT
  1184.  
  1185.  
  1186.  
  1187.                                  TCLI - Page 18
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. The TYPE command is used to display the contents of a text file.  Wildcards can
  1194. be specified; each file matching the wildcard specification will be displayed
  1195. on the screen.
  1196.  
  1197.  
  1198. Command:  VER
  1199. Function: Display the version of TCLI.
  1200. Syntax:   VER
  1201.  
  1202. The VER command simply displays the version number of TCLI, and the amount of
  1203. installed and free RAM on your computer.
  1204.  
  1205.  
  1206. Command:  VERIFY
  1207. Function: Toggles the Write Verify feature on/off.
  1208. Syntax:   VERIFY [ON|OFF]
  1209.  
  1210. By default, when the ST writes a sector to a disk, it immediately reads that
  1211. sector back into memory, and compares it to the one it just wrote.  If they
  1212. match byte for byte, then the sector was successfully written.  This is the
  1213. ST's way of verifying that files are correctly written to the disk.  Bad
  1214. sectors are, fortunately, a rare occurrence.
  1215.  
  1216. The TOS Command Line Interpreter offers you the option to turn off the
  1217. write-verify feature, which will result in noticeably faster disk writes, at
  1218. the expense of some reliability.  Since disk write errors are so rare, turning
  1219. write-verify off can usually result in better productivity.
  1220.  
  1221. To turn off write-verify, use the command VERIFY OFF; to turn it back on, enter
  1222. VERIFY ON.
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.                                  TCLI - Page 19
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.                                 OTHER FEATURES
  1260.  
  1261. I/O Redirection
  1262. ---------------
  1263.  
  1264. TCLI supports output redirection for each command it can execute.  When
  1265. redirection is activated, all output that would normally go to the screen will
  1266. be sent to the specified file/device instead.  When the command has completed
  1267. execution, output will be directed back to the screen.
  1268.  
  1269. To specify output redirection, use the greater-than sign (">"), followed
  1270. immediately by a filename:
  1271.  
  1272.    dir *.txt >c:\dir.lst
  1273.  
  1274. This command will display a directory of all of the files in the current
  1275. directory that end with ".txt", and redirect that listing to the file "dir.lst"
  1276. on the root directory of drive C.
  1277.  
  1278. If you would like to send output to the printer instead of a file, use PRN:
  1279. instead of the filename:
  1280.  
  1281.    dir *.txt >prn:
  1282.  
  1283. will send the same directory listing as above to the printer.
  1284.  
  1285. Input redirection is supported only in the form of batch files.  Batch files
  1286. are identified by the ".BAT" extension, and consist of a set of commands to
  1287. execute when the batch file is called.  Batch files may be passed up to nine
  1288. parameters, each of which can be accessed within the batch file as %n, where
  1289. "n" is the parameter number.
  1290.  
  1291. For example, suppose the following lines were contained in a batch file called
  1292. "MAKE.BAT":
  1293.  
  1294.    cc %1.c -o %1.o -i\includes\headers\
  1295.    link -o %1.prg \includes\init.o %1.o
  1296.  
  1297. This batch file will compile and link the file specified (this is an arbitrary
  1298. C compiler - this batch file would most likely need to be modified before it
  1299. could be used).  To call this batch file to compile and link the program
  1300. PROG.C, the following would be entered on the command line:
  1301.  
  1302.    make prog
  1303.  
  1304. and the batch file will substitute the filename into the correct places in both
  1305. the compile and link commands.  Note that if the compile fails, no object file
  1306. should be produced, so the linker would simply abort the link operation.
  1307. Otherwise, the object file would be linked, and an executable named "PROG.PRG"
  1308. would be produced on the current drive.
  1309.  
  1310. When using batch files, it is important that all instructions, including the
  1311. last one in the file, be followed by a carriage return.  Otherwise, TCLI will
  1312. not read in the entire command line, and an error will usually result.
  1313.  
  1314. When TCLI is run, a special batch file called "AUTOEXEC.BAT" is searched for in
  1315. the directory from which TCLI was started.  If one is found, it is loaded and
  1316. executed before control is returned to the user.  This can be used to set up
  1317.  
  1318.  
  1319.                                  TCLI - Page 20
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325. the environment before you start a working session with TCLI.  For example, the
  1326. following batch file, if named AUTOEXEC.BAT, will switch to 80-column mode,
  1327. create a RAMdisk, copy all of the files in the C:\FILES\ directory to the
  1328. RAMdisk, set the attributes of the copied files to "archived," and finally
  1329. clear the screen (to clean up the display):
  1330.  
  1331.    echo off
  1332.    mode 80
  1333.    echo Setting up RAMdisk as drive G:...
  1334.    vdisk g 800
  1335.    cp c:\files\ g:
  1336.    attr +a g:*.*
  1337.    echo on
  1338.    cls
  1339.  
  1340. After this file has executed, you could edit the files on the RAMdisk, then use
  1341. COPY with the /A or /R option to copy only those files that were changed back
  1342. to drive C:; this could also be done with another batch file (let's call it
  1343. SAVE.BAT):
  1344.  
  1345.    copy g:\ c:\files\ /r
  1346.  
  1347. You could then enter "SAVE" as a command, and your modified files will be
  1348. written back to the hard disk.  This batch file will also reset the archive
  1349. bit, so that if you make any other changes to the files, you can simply
  1350. re-execute the SAVE batch file, and it will copy only those files changed since
  1351. the last SAVE.
  1352.  
  1353.  
  1354. Control Keys
  1355. ------------
  1356.  
  1357. TCLI supports the three major control keys for text displays: ^S, ^Q, and ^C.
  1358. By pressing CONTROL-S, the user can halt the screen display, to read what's on
  1359. the screen before it scrolls off; CONTROL-Q continues the display.  CONTROL-C
  1360. will stop the display entirely.
  1361.  
  1362.  
  1363. RAMdisk
  1364. -------
  1365.  
  1366. TCLI includes a short RAMdisk program called "VDISK.TTP".  It can be run from
  1367. the desktop, but was intended for use mainly with TCLI.
  1368.  
  1369. To set up a RAMdisk, enter the following command:
  1370.  
  1371.    vdisk n size
  1372.  
  1373. where "n" is an unused drive letter and "size" is the size of the RAMdisk, in
  1374. kilobytes.  If the RAMdisk was set up successfully, you will be told so; if
  1375. not, you will be alerted to the problem.
  1376.  
  1377. Once set up, the RAMdisk acts like any other disk drive, only much faster.
  1378. Files can be written to it and read from it.  However, since the files are
  1379. stored in RAM, you should not rely on it to store important files.  If you do,
  1380. you should periodically back those files up to a real disk.
  1381.  
  1382. To use VDISK.TTP from the desktop, double-click on VDISK.TTP.  Then enter "n
  1383.  
  1384.  
  1385.                                  TCLI - Page 21
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391. size" when the dialog box appears, and press RETURN.  After the program
  1392. executes, click once on an existing drive icon, then select "Install Disk
  1393. Drive" from the "Options" menu.  A dialog box will then appear; change the
  1394. drive letter displayed to the drive letter that you named the disk drive, and
  1395. click on "Install".  Your new disk icon will appear on the desktop, where it
  1396. can be accessed just like the other disks.
  1397.  
  1398. If you install the disk drive from within TCLI, then return to the desktop, the
  1399. disk drive will still exist, and you can perform the above steps to install the
  1400. disk icon, starting with clicking an existing drive icon.
  1401.  
  1402. By re-executing VDISK.TTP, you can install multiple RAMdisks.  As long as they
  1403. are given different drive letters, and you have enough free RAM, the drives
  1404. will install and operate properly.
  1405.  
  1406. The RAMdisks installed by the VDISK program will remain in memory until you
  1407. turn the power off or reboot the computer.
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.                                  TCLI - Page 22
  1452.  
  1453.