Classic Computer Magazine Archive START VOL. 3 NO. 5 / DECEMBER 1988

Clipboard

Tips and Tricks for the ST Owner

Compiled by Heidi Brumbaugh,
START Programs Editor


More on DESKTOP.INF

The Clipboard got a great response to a tip on the DESKTOP.INF file (Special Issue #4); we heard from quite a few readers who have tweaked this file and figured out what nearly every line does. Since this is definitely a hot topic, well continue to explore how this file works and how to customize it.

clipboard.jpg
Desktop Practical Jokes: Will the real trash can
please stand up?
Both Don Reeder of Eugene, Oregon and Robert Withoff of Bemidji, Minnesota pointed out that the #M and #T lines in DESKTOP.INF determine the Disk and Trash icons. The first two numbers are the location of the icon on the screen; the third represents the system icons, numbered 00-04:
  • 00-The standard floppy icon.
  • 01- Folder icon.
  • 02-Trash can icon.
  • 03-Program icon.
  • 04-File icon.
  • Don says he uses the a folder icon to represent a RAMdisk; Robert says the program icon is a good way to represent a cartridge (which must be installed with a lowercase "c").

    One final tip: When you're editing your DESKTOP.INF file, turn off your hard disk! Put the experimental files on floppy disks and use them to boot. You can't hurt your computer by trying different values in this file but you can lock up the system at boot time. You're better off booting from a floppy disk, so if your computer locks up you can simply boot from another disk and then go in and correct the problem.


    Notes On GFA Optimization

    Variables in GFA BASIC can be either strings (A$), reals (A), integers (A%) or booleans (A!). Using these variable types efficiently will improve your programs performance--often dramatically. Here are some benchmarks to give you an idea of the improvements to expect, but note: I ran the benchmarks first under the interpreter, then compiled. Separate times are given for each test (the first is interpreted, the second, compiled). The statement Tmstart=Timer was directly before each of these segments; after each segment was Tmstop=Timer and Tmdiff=(Tmstop-Tmstart)/200*60. All times are in Jiffies.

    For I%=1 to 1000 ! 2.4, 0.9
    Next I%

    For I=1 to 1000 ! 6.6, 3.3
    Next I

    Here's another performance tip: the Inc function increases the value of a variable by one--and is much faster than normal addition:

    Count%=0
    For I%=1 to 1000 ! 16.5,1.5
    Count% = Count% + 1
    Next I%

    Count% = 0
    For I%=1 to 1000 ! 4.S, 1.2
    Inc Count%
    Next I%

    Here are the same loops using reals instead of integers:

    For I%=1 to 1000 ! 14.1, 4.8
    Count= Count+ 1
    Next I%

    For I%=1 to 1000 ! 8.4, 3
    Inc Count
    Next I%

    If you're interested in how boolean assignments stack up, here are the results of an assignment loop and logical operation loop:

    Count! =False!
    For I%=1 To 1000 ! 6.9, 0.9
    Count! =True!
    Next I%

    Count! = False!
    For I%=1 To 1000 ! 12.9, 1.5
    Count!=Not Count!
    Next I%

    Got an ST trick or tip to share? Send it to Clipboard, START Magazine, 544 Second St., San Francisco, CA 94107.