Desk Accessory
Encyclopedia
A desk accessory is a small helper-type application that can be run concurrently with any other application on the system. Early examples, such as SideKick
SideKick
SideKick was an early Personal Information Manager software application by Borland launched in 1983 under Philippe Kahn's leadership. It was notable for being a Terminate and Stay Resident program, which enabled it to load into memory then return the computer to the DOS command prompt, allowing...

 and Macintosh desk accessories, used special programming models to provide a small degree of multitasking
Computer multitasking
In computing, multitasking is a method where multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for...

 on a system that initially did not have any other multitasking ability.

Personal information managers

Early personal information managers, such as Norton Desktop and Borland's SideKick
SideKick
SideKick was an early Personal Information Manager software application by Borland launched in 1983 under Philippe Kahn's leadership. It was notable for being a Terminate and Stay Resident program, which enabled it to load into memory then return the computer to the DOS command prompt, allowing...

, provided pop-up calculator, alarm, calendar and other functions for single-tasking operating systems like MS-DOS using terminate and stay resident
Terminate and Stay Resident
Terminate and Stay Resident is a computer system call in DOS computer operating systems that returns control to the system as if the program has quit, but keeps the program in memory...

 techniques.

Apple Macintosh

Introduced in 1984, as part of the operating system
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

 for the Apple Macintosh computer, a desk accessory (DA) was a piece of software, originally written as a device driver, conforming to a particular programming model. The purpose of this model was to permit very small helper-type applications to be run concurrently with any other application on the system. This provided a small degree of multitasking
Computer multitasking
In computing, multitasking is a method where multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for...

 on a system that initially did not have any other multitasking ability.

Within the OS, the DA was in fact implemented as a special class of driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

. It was installed in the driver queue, and given time periodically and co-operatively as a result of the host application calling SystemTask within its main loop. A DA was permitted to have a user interface as long as it was confined to one main window. A special appearance of window frame was reserved for the use of DAs so that the user could distinguish it from the windows of the hosting application.

Typical early DAs included the Calculator and Alarm Clock. Third-party DAs such as spelling checkers could be purchased. It was considered hard to write a DA, especially early on when there was little in the way of developer tools. However, since on the early Mac OS drivers did not have any special privileges, writing a DA was, with practice, no more difficult than any other application.

A special Font/DA Mover utility was used to change the configuration of DAs. Because DAs were not installed or launched in the same way that applications were, the user could not drag and drop DAs into or out of the system. They resided in the System file's 'DRVR' resources
Resource fork
The resource fork is a construct of the Mac OS operating system used to store structured data in a file, alongside unstructured data stored within the data fork. A resource fork stores information in a specific form, such as icons, the shapes of windows, definitions of menus and their contents, and...

, like actual drivers, though they could theoretically be installed in any file whose resources were loaded into the memory, and were stored in "suitcases" when not installed in the system file. As a resource numbering scheme was implemented for marking resources as belonging to another resource of some particular type and number in the same file, such as a DA ('DRVR'), it was possible for desk accessories to have a limited "resource fork" of their own within the file they were contained in; the mover utility recognised such resources and moved them along with the actual DA code resource they were associated with.

With the advent of System 7
System 7 (Macintosh)
System 7 is a single-user graphical user interface-based operating system for Macintosh computers. It was introduced on May 13, 1991 by Apple Computer. It succeeded System 6, and was the main Macintosh operating system until it was succeeded by Mac OS 8 in 1997...

, which included a standard co-operative multitasking feature, the need for DAs diminished greatly, and developers were encouraged to develop small applications instead. The system continued to run DAs (and still does up to Mac OS 9
Mac OS 9
Mac OS 9 is the final major release of Apple's Mac OS before the launch of Mac OS X. Introduced on October 23, 1999, Apple positioned it as "The Best Internet Operating System Ever," highlighting Sherlock 2's Internet search capabilities, integration with Apple's free online services known as...

.x) for backward compatibility. The icon
Icon (computing)
A computer icon is a pictogram displayed on a computer screen and used to navigate a computer system or mobile device. The icon itself is a small picture or symbol serving as a quick, intuitive representation of a software tool, function or a data file accessible on the system. It functions as an...

 for a desk accessory program under System 7 and later is roughly a reversed version of the application icon, with the writing hand on the left side instead of the right.

A similar mechanism to allow small utility programs to run along with regular applications was also present in the operating system for the Apple IIGS
Apple IIGS
The Apple , the fifth and most powerful model in the Apple II series of personal computers produced by Apple Computer. The "GS" in the name stands for Graphics and Sound, referring to its enhanced graphics and sound capabilities, both of which greatly surpassed previous models of the line...

.

GEM

GEM
Graphical Environment Manager
GEM was a windowing system created by Digital Research, Inc. for use with the CP/M operating system on the Intel 8088 and Motorola 68000 microprocessors...

 resembled the Macintosh closely in many respects, and one of them was the presence of desk accessories, for the same reason: to allow multiple programs to be used in a system that only supported one full application at a time.

From a programming point of view, desk accessories were implemented, like other GEM applications, as DOS .EXE files
DOS executable
The DOS MZ executable format is the executable file format used for .EXE files in DOS.The file can be identified by the ASCII string "MZ" or the hexadecimal 4D 5A at the beginning of the file . "MZ" are the initials of Mark Zbikowski, one of the developers of MS-DOS...

, with names ending with .ACC (Accessory) rather than .APP (Application). Each .ACC file could support multiple accessories; all three of the standard GEM accessories (Calculator, Clock and Print Spooler) were provided by CALCLOCK.ACC. Installation was simply a matter of placing the .ACC in the correct directory - \GEMBOOT in earlier versions, and \GEMAPPS\GEMSYS in GEM/3 and later.

Since each DA loaded reduced the amount of memory available for programs, one technique for temporarily increasing available space was to rename one or more .ACC files to have a different suffix (usually .ACX) and restart GEM. On the Amstrad
Amstrad
Amstrad is a British electronics company, now wholly owned by BSkyB. As of 2006, Amstrad's main business is manufacturing Sky Digital interactive boxes....

 PC-1512
PC-1512
The Amstrad PC1512 was Amstrad's mostly IBM PC-compatible computer system, first manufactured in 1986. It was later succeeded by the PC1640.It launched for £499 and sold very well, as it was one of the first cheap PCs in Europe...

, for example, the Snapshot accessory was shipped as SNAPSHOT.ACX and had to be renamed to .ACC if required.

Desk accessories continued to be supported in ViewMAX
ViewMAX
ViewMAX is the file manager supplied with DR DOS versions 5.0 and 6.0. It is based on a cut-down version of the GEM GUI.-Versions:ViewMAX/1 was distributed with DR DOS 5.0. It had a very similar appearance to previous GEM desktops – two fixed-size windows...

, the DR-DOS
DR-DOS
DR-DOS is an MS-DOS-compatible operating system for IBM PC-compatible personal computers, originally developed by Gary Kildall's Digital Research and derived from Concurrent PC DOS 6.0, which was an advanced successor of CP/M-86...

file manager, which was supplied with almost unchanged versions of Calculator and Clock.

PalmOS

For much the same reason as desk accessories were used in Mac OS and in GEM, namely to allow more than one simultaneous program on a system that did not support multitasking, the concept of desk accessories was extended to PalmOS by third-party developers. DA are applets launched by an application or hack serving as a DA launcher. The DA launcher may watch for keystrokes or other system events and pop up a pre-defined desk accessory. Many general purpose PalmOS launcher applications are capable of launching DAs as well.

A desk accessory program is a Palm resource database of type 'DAcc', specified to include a single 'code' #1000 resource that contains the binary code implementing the desk accessory. Global or static variables are not available, but a DA can call user interface APIs. It is possible for a DA to have user interface resources in its database. The desk accessory launcher transfers execution to the first byte of the 'code' #1000 resource.

DAs provide a modicum of multitasking. However, unlike in Mac OS and GEM, after the user is done working with the DA, it must be closed to return to the underlying application. It is possible to pop a DA up over another DA, though this might deplete stack space.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK