home *** CD-ROM | disk | FTP | other *** search
/ Fujiology Archive / fujiology_archive_v1_0.iso / !MAGS / !BONUS / COVERDSK / STFORMAT / STF14.ZIP / STF14.MSA / STARTUP_STARTUP.DOC < prev    next >
Text File  |  1987-04-21  |  9KB  |  229 lines

  1.  .......................................................
  2. /         :                    \
  3. :   STARTUP.PRG  :  Batch Startup Program Version 1.1    :
  4. :         :    by Murray Levine        :
  5. :         :    CIS # 74435,1015        :
  6. :         :                    :
  7. \................:....................................../
  8.  
  9.     STARTUP.PRG is a Batch Startup program that executes commands
  10. from the file startup.inf upon booting your ST.  STARTUP.PRG must be placed
  11. in the \AUTO\ folder on boot drive (usually A).  It first looks for the 
  12. file STARTUP.INF in the same directory and if it can't find it, it tries to
  13. locate it in the main directory (ex. A:STARTUP.INF).  From now on, these
  14. two files can be the only files you need in the AUTO directory because all
  15. other files to be executed can be located in their original drive and folder
  16. and can even have parameters past to them.  You no longer have to make sure
  17. of the order that you copied your files to the AUTO directory because
  18. STARTUP executes programs as they are listed in STARTUP.INF.
  19.  
  20.     The format for pragrams to be executes is to list the complete program
  21. name followed by any parameters to be passed.  any command or program name
  22. can be followed by a comment.  Any text on a line that follows a ';' will
  23. be treated as a comment.  For example,
  24.  
  25. a:\supboot.prg            ; Supra Hard Drive driver program
  26. c:\bin\touch.prg a:startup.inf    ; Update timestamp for info file
  27.  
  28. would first load the hard drive driver program supboot,prg from drive A: and
  29. then update the timestamp for teh file a:startup.inf.
  30.  
  31.     There are a few unix-like commands that are used in the STARTUP.INF
  32. file as well as some other special commands.  All commands must be in lower
  33. case, however, the filenames may be in lower or upper case.  The allowable
  34. commands are as follows:
  35.  
  36. Copy Files:
  37.     cp file1 file2    - copy file1 to file2
  38.     cp file1 ... dir    - copy file1 and other files to the directory dir
  39.  
  40.     The cp command is useful for copying files to a ramdisk.  Wildcards
  41.     are also accepted.
  42.  
  43.     cp b:\src\*.c c:\        ; Copy source files to ramdisk c:
  44.  
  45. Remove files:
  46.     rm file ...
  47.  
  48.     The rm command removes the listed files.  As with cp, wildcards are
  49.     also accepted.  Be carefull, though, about doing an   rm *.*
  50.     so you don't wipe out a disk by accident.
  51.  
  52. Create directory
  53.     mkdir dir ...
  54.  
  55.     The mkdir command creates the subdirectory dir.
  56.  
  57. Remove directories
  58.     rmdir dir ...
  59.  
  60.     The rmdir command removes the specifies subdirectories.  An error will
  61.     occur if the specified subdirectory is not empty or does not exist.
  62.  
  63. Display files:
  64.     cat file ...
  65.  
  66.     The cat command displays the listed files on the console.  Useful for
  67.     displaying any title screen information.  Once again, wildcards are
  68.     accepted.  Pressing ctrl-C during the display of a file aborts displaying
  69.     that file and goes  on to the next file if there is one.
  70.  
  71. Change directory:
  72.     cd dir
  73.  
  74.     The cd command changes the default directory to either a disk drive or
  75.     a subdirectory.
  76.  
  77.     cd b:    ; changes default drive to b:
  78.     cd b:\auto  ; change to drive b:, subdirectory auto
  79.  
  80.     The cd command is usefull if when running prgrams you don't wan't to list
  81.     the complete filename (drive and directory) and if the program being
  82.     executed expects to find certain files (data files) in the default 
  83.     directory.
  84.  
  85. Display text:
  86.     echo string
  87.     echo -n string
  88.     echo -i string 
  89.  
  90.     The echo command displays the following string (list of words) on the
  91.     screen followed by a carriage return.  If the -n option is used, the
  92.     carriage return is not printed.  If the -i option is used, the string
  93.     is printed in inverse video.  The echo command is useful for 
  94.     displaying what is happening at different points of the boot process.
  95.  
  96.     As an example, I use the following:
  97.  
  98.     echo -n The time is
  99.     c:\bin\date.prg        ; display the current time
  100.  
  101.     This will display:  The time is Sat Jan 24 1987 12:24pm
  102.  
  103. Setting variables
  104.     set var = string    - set variable var to string
  105.     set var = $<    - set variable var to a string entered from keyboard
  106.     set            - display all variables
  107.  
  108.     The set command allows the user to set up to 20 variables whose variable
  109.     names can be up to 8 characters in length.  If string is to be more than
  110.     than one word then it should be in quotes, e.g. "This is a string".  If
  111.     The string is $<, then the variable waits for a string to be entered from
  112.     the keyboard.  This string can then be tested later using the if command.
  113.     Using set without any arguments will display all of the variables and
  114.     the string values associated with them.
  115.  
  116. Conditional statements
  117.     if (string1 cond string2) then
  118.     commands
  119.     endif
  120.     if (string1 cond string2) then
  121.     commands
  122.     else
  123.     commands
  124.     endif
  125.  
  126.     The if command is used to compare two strings based on the specified
  127.     condition cond.  If the comparison is true, the commands follwing the
  128.     then statement will be executed.  An optional else statement can be
  129.     used if the comparision is false.  The if command must end with the
  130.     endif statement.  There can be as many as 9 nested if statements,
  131.     however be sure that there are enough endif statements to match them.
  132.     String1 and string2 can be either strings or variables.  The possible
  133.     conditions are as follows:
  134.  
  135.     ==    is equal to
  136.     !=    is not equal to
  137.     <    is less than
  138.     >    is greater than
  139.     <=    is less than or equal to
  140.     >=    is greater than or equal to
  141.  
  142. The special commands used by Startup are as follows:
  143.  
  144. Use medium or low resolution:
  145.     res medium
  146.     res low
  147.  
  148.     The res command will set a color system to medium resolution or low
  149.     resolution during the boot process.  On monochrome systems this command
  150.     has no effect.
  151.  
  152. Turn the cursor on or off:
  153.     cursor on
  154.     cursor off
  155.  
  156.     The cursor command turns the cursor on or off again.  Since during the
  157.     boot process TOS dosn't turn on the cursor, you can now see where the
  158.     cursor is for entering text.  You can even turn it back off again after
  159.     running a certain program if you wish.
  160.  
  161. Turn the keyclick on or off:
  162.     keyclick on
  163.     keyclick off
  164.  
  165.     The keyclick command trurns off the keyclick if you get annoyed by it
  166.     while entering input and let's you turn it back on if you want after
  167.     running a certain program.
  168.  
  169. Clear the screen:
  170.     clear
  171.  
  172.     The clear command clears the screen and places the cursor in the upper
  173.     left hand corner.  This can be followed by the cat command to display
  174.     a title page.
  175.  
  176. Display of each line
  177.     display on
  178.     display off
  179.  
  180.     The display command turns on or of the display flag.  When the display
  181.     is on, the each line will be displayed in full including comments until
  182.     the display is turned off.  The default is display off.
  183.  
  184. Ask if program should be run
  185.     ask filename [arg ...]
  186.  
  187.     The ask command asks the user if he wishes to run the program denoted
  188.     by filename.  The output is as follows:
  189.     Execute autotime.prg (Y/N)? 
  190.     Typing a Y will execute the program, any other key will skip the
  191.     execution of the program.  This can be useful for example if a user
  192.     does not wish to load GDOS when he boots up, but wishes to load GDOS
  193.     the next time he boots teh system.
  194.  
  195. System variables
  196.     $res    - contains the screen resolution ("low","medium","high")
  197.     $desktop    - contains the screen resolution in the desktop.inf
  198.           file ("low","medium","high").  If the desktop.inf
  199.           file does not exist, the variable is set to "none". 
  200.     $cwd    - current working directory or pathname
  201.  
  202. The following sample startup.inf file is the one I currently use during my
  203. boot process.
  204.  
  205. res medium            ; Use meduim res when booting in color
  206. cursor on
  207. display on
  208. c:\supboot.prg            ; Supra Hard Disk booting program
  209. d:\rtx\rtxboot.prg        ; Micro RTX kernal
  210. d:\utility\hdaccel.prg        ; Hard Disk Accellorator
  211. d:\utility\autotime.prg        ; Logikhron Clock Card time retriever
  212. display off
  213. if ($res != $desktop) then    ; Check desktop.inf resolution
  214.   echo copying desktop.inf for $res resolution
  215.   if ($res == high) then
  216.     cp c:\desktop.hi c:\desktop.inf    ; set desktop.inf for high res settings
  217.   else
  218.     cp c:\desktop.med c:\desktop.inf    ; set desktop.inf for med res settings
  219.   endif
  220. endif
  221. echo -n The date is
  222. c:\bin1\date.prg
  223. ask e:\degelite\auto\gdos.prg    ; GDOS 1.1 for Degas Elite
  224.  
  225.  
  226. Any comments or suggestions for a future version are welcome.
  227.  
  228.         Murray Levine   CIS # 74435,1015
  229.