Amiga World Official AmigaDOS 2 Companion - eBook-ENG

Page 235

Delving into AmigaDOS

2* 1 /

The question is, do you want to make impure commands resident? If you make commands that are not re-entrant and reexecutable resident, you're ask ing for software failure. Avoid forcing any impure command to be resident. How do you tell if a command is pure? Just look at the output of the List com mand. A pure command has its p (for Pure) protection bit set. If you enter: LIST C:

all the commands with p as one of their protection bits are pure. Avoid the temptation to use the Protect command to set the pure bit on a command that isn't. Setting the bit doesn't make a command pure — only proper develop ment and extensive testing can ensure that. Unless you are an accomplished programmer and software tester, don't mess with the p protection bit or force nonpure commands to be resident.

The final option for the Resident command is SYSTEM/S. When used alone, this argument lists those pieces of code (they aren't always commands) that have been added to the system software. For example, enter: RESIDENT SYSTEM

Figure 8-6 shows the results ofthis command. Unlike normal resident and internal commands, files labeled System can't be removed from the resident list.

When used with a command pathname, the SYSTEM/S option adds the file to the system list. Commands you add to the system list stay resident until you reboot. You should avoid using this option, which is intended primarily for important system software.

If you have a lot of memory, you should make any commands you use often resident. Because resident commands don't have to be loaded from disk, they execute much faster. If you have a single-drive system, you should also consider making the more popular commands like Dir and Copy resident to free you from disk swapping. The default Startup-sequence for AmigaDOS 2.0 already makes Assign, List, and Execute resident. Resident lets you add to these three.

The CD Command In Chapter 7, you saw how you could move about the AmigaDOS file struc ture simply by entering the name of a directory. For example, if you are in the root directory of your system disk, you can move to the Utilities directory by entering:

UTILITIES


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.