DESKSEL - THE DIGITAL INSANITY DESKTOP SELECTOR
by Stefan Posthuma
Boy, am I in trouble this time. Slayer, one of my highly-trained
killer Stick Insects broke out of his tungsten-carbide cage last
night and killed six cats, destroyed two brand new cars (one
being a police car) and set off nine burglar alarms. I found him
this morning sleeping with Mad Butcher, the Pitbull Terrier of
If you have two monitors and a hard disk, like I do, there is a
need to be able to select a desktop at boot time. I mean if I
want to play around with Degas Elite, I want low-res, my Degas
window open at the right spot and my icons neatly arranged. On
the other hand, if I want to do a little programming, I want my
Develop folder open plus my ST NEWS folder. I also want mid-res.
If I want to write some articles, I want to do that in Monochrome
and I want my WordPlus and my ST NEWS document folders opened.
You can't possible do all that with just one DESKTOP.INF file, so
I decided to write a little program that allows me to select a
desktop at boot time.
First, I created some nice desktops and every time, after the
'Save Desktop' command, I renamed the DESKTOP.INF file to a file
with a meaningful filename, like DEGAS.INF or DEVELOP.INF or
WORDPLUS.INF. After that, I wrote a GfA program that selected all
the .INF files from the boot drive and allowed me to select one.
After selecting, it just copied the selected file to DEKSTOP.INF
and viola! my desktop was booted neatly.
Wait a moment, Soulcrusher (one of my other Combat Killer Stick
Insects) is getting restless.
Here, some meat for you...
(Ripping and slobbering noises, followed by howling and banging
against tungsten carbide bars)
Oh you want more?
(Sound of footsteps on the stairs, heavy doors being unlocked,
sound of hollow footsteps in a freezer cell, heavy dragging
noises, doors closing, ever heavier dragging noises on the
stairs, wet thud, carving and sawing noises, loud howling and
banging, another wet thud immediately followed my ever louder
ripping and slobbering)
Boy, ever seen a stick-insect devour a whole cow?
Of course, I don't want to select a desktop every time I boot.
(During a programming session, my computer is likely to crash
lotsa times, and I DON'T want to be bothered by desktop selectors
or any other foolish auto-boot program). So the first thing I do
is check if the left shift key has been pressed. If this is true,
my little program will come alive.
So, how do I check the left shift key?
Fortunately there is a system call that will do it for you, the
Bios(11) call. This one will set or return the values for the
special keys like Shift, Control and Alternate. The following
call will return a bit-mapped value:
The following bits correspond to the following keys:
0 right shift
1 left shift
4 caps lock enabled
5 right mouse key (ALT-CLR/HOME)
6 left mouse key (ALT-INSERT)
So by ANDing the value with 2^1, you can see whether the left
shift key is pressed or not:
If (Xbios(11,-1) And 2)<>0
(loud burping, clanging of bones against tungsten-carbide,
SOULCRUSHER!, SLAYER! SHUT UP!!
The next thing we have to do is to read all .INF files into an
array and allow the user to select one of these files. For the
selection of file, we use the Fsfirst and Fsnext calls. Pretty
standard stuff, so I am not going to spill it out again. Check
out the source if your memory needs refreshing.
The next thing we do it to display all the files on the screen,
the first one highlighted. Then we read the keyboard to see if
the user presses arrow-up or arrow-down. If he does this, we move
the highlight by displaying the previously highlighted file
normal again and the new file in reverse video. Using the VT-52
escape codes (escape-p for reverse-on and escape-q for reverse
off) this is a piece of cake.
When the user presses return or selects a file immediately by
pressing one of the function keys (files 1-10) or one of the
numeric keys (files 11-20), it is time to install the selected
desktop and exit the program.
We open the wanted file, determine its length, create a string
large enough to hold the entire file (to my knowledge, there are
no desktop files larger than 32K, so we can use this method!),
read the file and write the file from the string to DESKTOP.INF
After that, we leave the program and the ST will boot with the
If you think about it, it is all very simple. For documented GfA
source, take a look in the PROGRAMS folder on this disk. It will
contain the DESKSEL.BAS file (amongst some other interesting
stuff) ready for you to be compiled and placed in the AUTO
This program also offers some sort of a solution to the WordPlus
info file bug. Just create two info files for WordPlus, one for
monochrome and one for medium res. Depending on the resolution
and the selected desktop, this program can install the right
If you like the idea behind this program, STRIKE-a-LIGHT has
created a program called BOOTSTART which is similar to DeskSel,
only it also allows you to install accessories, auto-booting
programs and more stuff. For more info:
Grote Berg 85
5611 KJ Eindhoven
To conclude this article, I would like to tell y...*(*1ij)U(&*!!"
OH NO! I forgot to feed Slayer!
(Loud banging noises and growling, breaking of tungsten-carbide,
drooling and slurping noises)
NO...BACK OFF SLAYER!!
(Sounds of flesh being torn, ripping claws and snapping fangs.
The loud cries of pain end abruptly)
The text of the articles is identical to the originals like they appeared in old ST NEWS issues. Please take into consideration that the author(s) was (were) a lot younger and less responsible back then. So bad jokes, bad English, youthful arrogance, insults, bravura, over-crediting and tastelessness should be taken with at least a grain of salt. Any contact and/or payment information, as well as deadlines/release dates of any kind should be regarded as outdated. Due to the fact that these pages are not actually contained in an Atari executable here, references to scroll texts, featured demo screens and hidden articles may also be irrelevant.