MORE ABOUT STARTUP-SEQUENCES  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  [Have a look at the other articles in this drawer for more about Startup-Sequences (called SUS from now on in this article) and look also at "Ed-Reference" in the REFERENCE drawer, or in the POP_UP_HELP! drawer for a listing of all the commands for ED, the CLI text editor Have a look also at the programs SWITCH and SELECT on MD8, which were devised specifically to give you more control over your SUS - SWITCH to let you incorporate YES/NO choices, and SELECT to let you choose from about 10 different SUS.] In "Startup-Sequences1" in this drawer, we had a look at a standard vanilla SUS, such as appears in a virgin Workbench disk in the S directory (where all "scripts" or "batch files" are kept for convenience, since the EXECUTE command automatically looks in the S directory when run). If your Word Processor can save text files as ASCII (ie, straight text without hidden formatting commands - check your manual), then it's best to use it to edit batch files. Otherwise, use ED which lives in your C directory.  A USEFUL 1.3 SUS  This is the SUS I use on my second A1000 - we'll go through it below to see why what is done when....Note that the numbers at the beginning of each line are there only for reference in this article - don't put numbers in your own SUS. This particular SUS doesn't claim to be the be-all and end-all, but it works fine to set up a Recoverable Ram Disk using the 1.3 Operating System software.  A SUS LISTED BY LINE NUMBERS  1 Addbuffers df0: 20 2 addbuffers df1: 20 3 c:SetPatch >NIL: ;patch system functions 4 cd c: 5 echo "Release 1.3 version 34.19*N" 6 addmem 400000 5fffff 7 Sys:System/FastMemFirst ; move C00000 memory to last in list 8 failat 30 9 assign >nil: RAD: exists 10 if warn 11 echo "Mounting RAD:" 12 mount RAD: 13 endif 14 if not exists RAD:C 15 sys:system/diskcopy NIL: -0 27 resident CLI L:Shell-Seg SYSTEM pure add 28 resident c:Execute pure 29 mount newcon: 30 ; 31 failat 11 32 run newshell from s:StartupII 33 wait >NIL: 5 mins 34 path ram: c: sys:utilities sys:system s: sys:prefs add 35 LoadWB delay 36 ;c:popcli >nil: 300 newshell "NEWCON:0/10/640/200/ Megadisc " 37 run wicon -w 38 endcli >NIL:  WHAT THE LINES MEAN:   Lines 1 & 2  Addbuffers df0: 20 addbuffers df1: 20 The ADDBUFFERS command lets you add a number of "buffers" to the list of "sector caches" for any particular drive - in other words, your most recent commands are kept in memory, so that if you try a command again (such as > dir df1: opt a or whatever), it'll be faster because the machine has remembered it and doesn't have to go to the disk to drag it off again. Note that each buffer takes 512 bytes, and that unless you're running a hard disk with the FastFileSystem, more than 20 or 25 is unnecessary. You could also use other methods to speed up disk access - Megadisc9 contains a number of ways to do this, including the use of FACCII by ASDG (a commercial program) which is probably the best way to do it.  Line 3  c:SetPatch >NIL: There are a few bugs in both 1.2 and 1.3 Kickstart ROMs (Read Only Memory chips, such as the 1.3 Kickstart ROM that A500/2000 owners can get changed), and SETPATCH fixes these - make sure it's about the first thing in the SUS. The REDIRECTION of ">nil:" addition is a bit confusing - to AmigaDos, this means that if a command has some kind of "output", such as the author's message or whatever, it will be sent to never-never land and you won't see it. Various programs, such as POPCLI or CONMAN are improved by using this, since you don't have your SUS filled with messages. Likewise the last line of many SUS say "endcli >nil:" in case there's some message about processes ending, I guess.  Line 4  cd c: This line simply changes directory to the C: "logical device" - i.e., something recognised by the system as a device, just as a disk drive is a physical device (e.g., df0:). The C: logical device is usually the C directory of your system disk, but could be ASSIGNed to practically anywhere (see later). This line could just as well have read: cd sys:c Have a look at "About_Devices" and the description of the ASSIGN command for more about this thorny subject.  Line 5  echo "Release 1.3 version 34.20*N" The ECHO command can be used to display any message you like - you could enter something like: echo "Good morning, sunshine!" , and if you wanted to you could enter a SAY statement so that the machine speaks to you. Generally, ECHO statements are a bit of a waste of time in a SUS. An alternative to ECHO, if you want to tell yourself things, is to simply create a text file and then TYPE it in the SUS, followed perhaps by WAIT (see description) so you have a bit of time to read it.  Line 6  addmem 400000 5fffff Because I have a non-autoconfiguring (ie, you need to tell the system explicitly that it's there, unlike autoconfigure Ram, such as the A501) 2-megabyte Ram board on the system, this command adds the extra Ram to a particular address (described in hexadecimal format here) in memory. Of course, if your memory expansion is AUTO-CONFIGURING (such as the A500/2000 extra half Megabyte), you don't need such a line.  Line 7  Sys:System/FastMemFirst Normally the Amiga uses, in sequence, $C00000 Ram (such as the A501 Ram); then Fast Ram (such as my 2-meg board), then Chip Ram (the 512K that comes with the machine and is accessible by the custom chips for graphics, etc, and therefore should be conserved when possible). FASTMEMFIRST rearranges this sequence of memory use to Fast Ram, $C00000 Ram, then Chip Ram. This results in faster operation of the system. *** Note well - A2000 users will find their systems functioning much faster if they put this command in at the top after SETPATCH and before BINDDRIVERS. See "RAD_Ramdisk" on this disk for more information.  Line 8  failat 30 FAILAT is a command which sets the level at which a batch file fails to be executed - some simple errors (which aren't really errors) may cause the SUS to stop. This command makes sure it continues. Check the description of FAILAT and related commands in this drawer.  Lines 9 - 13  assign >nil: RAD: exists if warn echo "Mounting RAD:" mount RAD: endif Line 9 tests for the existence of the logical device RAD: (ie, the Recoverable Ram Disk). The 1.3 ASSIGN command has the keyword EXISTS which does the checking. If RAD: doesn't exist, which is denoted by the next line, IF WARN, then the system tells you on screen that it's "mounting RAD:", and goes ahead and does it. Specifically, RAD: is like hard disks in that it must be "MOUNTed", meaning that in the MOUNTLIST, a text file in the DEVS directory, there must be an entry for RAD:, telling the system the specifications for it. On the 1.3 Workbench release disk this entry will automatically be there - however, you can change the size of the RAD: to whatever you like, depending on how you want to use it and how much memory you've got to play with. In the case of this particular SUS, I've changed the HIGHCYL Value to 79, meaning that I've set RAD: up to be exactly the same size as a floppy disk (80 tracks, 0 to 79), so that I can DISKCOPY my entire Workbench disk to RAD:, and then dispense with the disk altogether, thus freeing up a disk drive and giving me a lot more speed of system operation. But it is possible to set HIGHCYL for example to about 20 or so (giving you a RRD of about 220Kbytes), and just copy specific CLI commands into it and then ASSIGN the logical device C: to RAD: . Note that Lines 10-13 constitute an IF-ENDIF loop - don't forget the Endif.  Lines 14 - 16  if not exists RAD:C sys:system/diskcopy assign C: df1:c [Check "Hints&Tips" for more info about ASSIGN.] On the other hand, you could simply enter something like: Path df1:c add at any time to access anything in the C directory of df1:, without having to transfer control to that directory.  Line 25  BindDrivers BINDDRIVERS simply configures automatically any expansion hardware drivers that are found in the Expansion directory of the System disk, usually as icons set up by the makers of the device. Now that I come to think of it, totally unnecessary on this startup-sequence since I don't even have an expansion drawer, much less anything in it! Out it goes!  Line 26  FF >NIL: -0 FF is "FastFonts" by Charlie Heath, a program which turns on Fast text display routines if used with the "argument" -O as here; or to turn it off use -N; or give a Font name for a 8X8 pixel font to replace the system font if you wish, such as Pearl Font on the public domain (see our Fonts Theme disk).  Line 27  resident CLI L:Shell-Seg SYSTEM pure add This command activates the CLI SHELL, by invoking SHELL-SEG in the L directory - the RESIDENT command is used to invoke it under the name CLI, and once started, each new SHELL which is triggered from either the NEWSHELL command or by clicking the SHELL icon will be a SHELL CLI, with all the added features - command history, command editing, resident commands, aliases, prompt features, and script features. Note that every time you open a new SHELL, it will automatically look at the SHELL-STARTUP file in the S directory of your system disk to find out what ALIASES you've set up, so you can edit that file to contain all the ALIASES you always use - see the article on "1.3_SHELL" on this disk for more info.  Line 28  resident c:Execute pure Here the command EXECUTE is being made resident, meaning that the command can be executed without having to be reloaded each time, giving faster functioning and reduced memory usage when multi-tasking. You can only do this with the SHELL. Note that only commands with certain properties can be made resident - they have to be REENTRANT, meaning that they can be used by 2 or more programs at the same time; and RE-EXECUTABLE, meaning that they are able to be re-used without remembering anything from the previous use. Commands with these capabilities will have the PURE bit set in the Protection Field - this gobbledygook means that if you LIST the program, instead of just the old RWED bits (readable, writable, executable, deletable), you'll also be able to see P for PURE. Most C commands in 1.3 can be made resident, and it's probably worth doing to the most common ones if you've got a fair bit of memory, and do a lot of CLI work. More info in "RESIDENT" in the NEW_COMMANDS drawer of 1.3_INFO.  Line 29  mount newcon: Next NEWCON: is mounted (check its MOUNTLIST entry in the DEVS: directory of your Workbench1.3, by entering > type devs:mountlist ); NEWCON: windows have more flexibility than the old CON: windows that you may be used to, and allow for the extra facilities of the NEWSHELL command. See also "1.3_SHELL".  Lines 30 & 31  ; failat 11 You can always leave a space in a batch file, or put in a semi-colon, followed by a comment of your own if you like, to remind you of something. And FAILAT pops up again just in case there's a simple error.  Line 32  run newshell from s:StartupII This line executes a whole new batch file called StartupII from the S directory in a new SHELL (and you can use this same technique of opening a New CLI from a particuar batch file elsewhere, along the lines of > newcli from sys:s/myBatchFile), and it looks like this, as cut straight in from WB 1.3: resident c:Resident pure resident c:List pure resident c:CD pure resident c:Mount pure resident c:Assign pure resident c:Makedir pure makedir ram:t assign T: ram:t ;set up T: directory for scripts makedir ram:clipboards ;set up CLIPS: assign assign CLIPS: ram:clipboards mount speak: mount aux: mount pipe: break 1 C ;signal to other process its ok to finish Here we make a few commands resident for speed of the system; make and assign the T and clipboards directories in Ram (could be RAD:); mount the SPEAK: (see "DEVICES" for how to use it), AUX: (for adding a new keyboard for input to your Amiga), and PIPE: devices; and then tell the original Startup-Sequence process to continue. Line 33 WAITs until it's told to carry on by this last command.  Line 34  path ram: c: sys:utilities sys:system s: sys:prefs add This line adds a number of directories to the PATH that the system looks in when you enter a command - so now you can open NOTEPAD straight from the CLI by entering its name, because we've added the directory SYS:UTILITIES, where NotePad lives, to our search path. A good technique using Path is to copy a bunch of much used C commands to RAM: and then enter > path RAM: add There are many variations on this theme, found elsewhere on this disk.  Line 35  LoadWB delay This command loads Workbench and with the DELAY option it waits 3 seconds before exiting, to allow disk activity to stop before execution continues.  Line 36  ;c:popcli >nil: 300 newshell "NEWCON:0/10/640/200/ Megadisc " This line doesn't operate in this startup-sequence simply because there is a semi-colon at the beginning of the line, which effectively says "ignore this line". I left it in to show you can do that to any line, which you may want to do to test a SUS which you're working on - it's better to slip a semi-colon in and out than removing or retyping a line again. Likewise, at the end of any command in a batch file, you can whack in a semi-colon followed by any text comments you want to put in to, say, remind yourself of why it's in or whatever. In this particular case, it seemed that POPCLI (which is a handy little program which pops up a CLI whenever you press Left_Amiga & ESC, as well as having a SCREEN-BLANKER) caused the 1.3 system to hang!?*, rather annoying, but I thought it could be re-instituted when I found out why I was wrong about it. If you're still running 1.2 when you read this and want to use POPCLI, use the following syntax: c:popcli >nil: 300 newcli "CON:0/10/640/200/ Megadisc " Of course, you can put any text in there instead of "Megadisc" and you can change the size of the window that pops up by changing the numbers, providing you keep within the limits of your 640X256 (or 640X512 in Interlace) screen resolution. Note the quote marks, necessary whenever you have spaces in most commands in AmigaDos.  Line37  run wicon -w This simply runs the excellent program by Sydney programmer Steve Sweeting which was on MD8 - it allows you to click on any window and reduce it to a small icon which can be re-activated at any time - use it, you'll love it! (especially if you've got a bit of extra Ram.)  Line 38  endcli >NIL: Finally, ENDCLI...Note that you don't have to include this statement, if you want the CLI window to hang around for immediate use.  A FEW OTHER NOTES:  MULTIPLE COPY & PATH COMMANDS - both COPY and PATH can take multiple files or directories, which speeds up and shortens your SUS. So if you're copying a few commands to RAM: for example, you can do them all at once, as follows: copy (cd|copy|execute|dir|list) ram: and you don't really need the brackets. Likewise, as noted above, you can add several PATHs in one line. DOSKWIK - although the new RAD: lets you do a diskcopy to it, which is pretty fast, you might just like to load a limited number of things into it. COPYing them individually is slow and grinds the gears, so you can use the public domain programs READKWIK and RITEKWIK to prepare a bunch of files for copying from say df1:. Very speedy - check our PD library. Final note - if you've got any interesting techniques for Startup-Sequences or Batch Files we'd like to get them for eventual updates of Megados, or for Megadisc, so send them in! I'm sure many people could improve on this SUS.  !!!!!!!!!!!!!!!!!!!!!!!! END OF STARTUP-SEQUENCES2 !!!!!!!!!!!!!!!!!!!!!