MAKEFAST.PRG by Ken Badertscher Copyright 1989, Atari Corp. NEW TOS FEATURE! ================ One of the new features of Rainbow TOS is the ability to set a program for "fastload." This is accomplished by setting a bit in the program file which tells TOS that the program can be loaded without having all of memory cleared for it. Setting programs for fastload is most useful on machines like Mega 4's with a lot of memory. Clearing 4 megabytes of memory can take a significant amount of time - a program set for "fastload" can start up to a second faster. That may not sound like much, but when you're running a program which runs other programs (in, for example, a programming environment) saving a second on each program load can add up. And it makes your ST feel much faster when everything is loaded seemingly instantaneously. Wot's a fastloadbit? ==================== Now, we could have told everyone which bit was the fastload bit and watched everyone whip out their handy sector editors and flip that bit in each of their programs - but we're not that sadistic. MAKEFAST is a program which will set the fastload bit on any program. It is one in a series of what I like to call "AlertWare," that is, a program which does everything via the simplest AES call that exists: form_alert(). It is sort of a pain to wade through all those alert boxes, but it's quick and dirty to program, and it gets the job done. You do have an alternative with my AlertWare, though - I try to make things run from command lines as well as from the desktop. From the desktop... =================== When you run MAKEFAST from the desktop, it presents you with (surprise!) an alert box. The first one asks you if you want to Continue or Quit. If you bravely select Continue, you are then presented with an alert which asks you which function you want to perform: MakeFast (set a program's fastload bit), MakeSlow (clear a program's fastload bit), or Check (see if a program is set for fastload). Make a selection, and use the file selector which appears to select the program to check. Don't worry if you make a mistake and select a Spectrum picture instead of a program - MakeFast won't do anything with files that aren't executable. It will let you know if you selected a file which was not an executable program. Also, if you try to MakeFast a program which is already set for fastload (or MakeSlow one which is not set for fastload), MakeFast will leave the program alone and tell you that there was no change. After the function is complete, you're back to the "Continue/Quit" alert box. On a command line ================= When installed as a TOS Takes Parameters application, or run from a command line shell, MAKEFAST can be used to manipulate more than one file at a time. From a command line shell, type: makefast -h to get a message describing the usage. Long after you've lost this doc file, you'll still be able to use makefast -h to remind you how to run makefast. Note that if you are using makefast as a TTP application, you don't have to type "makefast" at the beginning of the command line - the desktop fills in that part of the command for you. To set the fastload bit in file1, file2, and file3, use the command: makefast file1 file2 file3 To clear the fastload bit in filea and fileb, use the -Slow option: makefast -s filea fileb To check the fastload bit in all files in a directory, use the -Check option: makefast -c *.* If any of the files are not executable, MAKEFAST will inform you of that fact. Note that filename wildcards will NOT be expanded if you are running makefast from the Desktop TTP dialog. If you are using the TTP dialog, you must type out all the filenames to check. Why MakeSlow? ============= Fastloading works because almost all programs don't require that all of memory be set to zeros when they start up. What Rainbow TOS does when it sees a file with the fastload bit set is it only clears as much memory as the program needs cleared. The rest of memory is left alone. The operative word here, though, is "almost." Some programs insist on having all of memory cleared for them, among them is Microsoft Write. Don't try to MakeFast Microsoft Write, because it won't work correctly. Also, using MakeFast on desk accessories yields mixed results. BE VERY CAREFUL when using MakeFast to speed up desk accessory loading. If you run into a problem, you can always use MakeSlow to clear the offending program's fastload bit. !IMPORTANT!IMPORTANT!IMPORTANT!IMPORTANT!IMPORTANT!IMPORTANT!IMPORTANT! !IMPORTANT> If you use MakeFast to set the fastload bit on any program, DO NOT EXPECT THE PROGRAM TO LOAD ANY FASTER IF YOU DO NOT HAVE A RELEASE VERSION OF RAINBOW TOS. Other versions of TOS do NOT know about the fastload bit, so setting the bit will have NO EFFECT.