Chapter 3 Using DMENU.BA DMENU.BA is the central application program of POWR-DOS. It is a menu program that simplifies your access to the disk. Once you acquaint yourself with DMENU's features and conveniences, you may find it the most-used program in your computer. This chapter first presents how you can use DMENU to perform the most basic operation involving disk and RAM; then it describes some of the convenient DMENU features. Finally, it discusses the errors that can occur during the program. If is important from the outset to realize two aspects of DMENU.BA. First, it is simply a BASIC program. It uses POWR-DOS commands to access the disk just as any other program could. So, if you remove DMENU, you can still access the disk using the techniques described in Chapter 2. Second, DMENU operates in two phases. In the first phase, you select files you want to operate on and the operation (either Load, Save, or Kill). In the second phase, DMENU "types" in the commands into your computer's PASTE buffer and "pushes" the PASTE key. At this point, you will see the commands appear on the computer screen; you could just as easily have typed these commands yourself, with the same results. Further, if you "break" the PASTE" buffer by pressing SHIFT-BREAK, you will be in BASIC; simply enter the RUN command to resume DMENU. Page 15 Chapter 3 Using DMENU.BA Page 16 Basic Procedures Viewing Files When you run DMENU, the first screen it shows you is a display of the files in RAM: ---------------------------------------- |Src:PDD Free: 23030 Type: BA | |08/22/86 09:05:27 | | DOS+ EPSON FLOPPY FLOPPY IMAGE | | LFILES LOAD LOADER MAP MENU | | MENU0 MENUP MRELO DP-FLP POWR | | POWR-D RELO RELO RESTOR SAVE | | | | Sel Load Kill Len. Page RAM All Menu | ---------------------------------------- (Note: The Tandy 200 screen is slightly different.) There are a few terms specific to the menu program. The source is simply RAM or PDD, depending on whether you are looking at files in RAM or files on disk, respectively. The message line is the penultimate line on the screen, which is reserved for prompts and messages from DMENU. The widebar cursor is the "bar" of inverse video that appears over a file name. The arrow keys and the space bar move the widebar cursor just a s with your computer's main menu. Finally, a file is selected when its name appears in inverse video. The file name with the wide-bar cursor is always selected; more than one file can be selected, as shown later. You can change the source from RAM to PDD by pressing [F6]. When the source is PDD, pressing [F6] again will change the source back to RAM. If you are looking at PDD files and you change diskettes, press [F6] twice to change the files to RAM and back to PDD; this "double switch" refreshes the display with file names on the new diskette. The file names on the screen appear without the extension names. There are two ways to see the extension name of a file. First, by moving the widebar cursor over a file. The extension appears in the upper right-hand corner of the screen. Second, by pressing [F4]. The full name of the file under the widebar cursor will appear on the message line, along with its length. Chapter 3 Using DMENU.BA Page 17 Saving a File to Disk To save a file to disk, set the source to RAM. Move the widebar cursor to the file you wish to save, then press [F2]. If the files does not already exist on disk, DMENU will save it immediately. However, if the file already exists on disk, you will see the question "Overwrite 0:file.xx (y/n)" appear on the message line. (instead of file.xx, you will see the file name you are saving.) Press a "y" if you wish to overwrite the existing file on disk; otherwise, press "n". There is no need to press [ENTER] because DMENU will react as soon as you press the key. Loading a file into RAM To load a file from disk into RAM, set the source to PDD. From then on, follow the exact procedure above for saving files to disk. You will notice that the bottom LCD line shows "Save" over the [F2] label when the source is RAM, and "Load" when the source is PDD. Killing a File To kill a file, select the file with the widebar cursor, then press [F3]. DMENU will always prompt you with the message "Kill ext:file.xx (y/n)?" where "ext" is the extension (either RAM: or 0: for RAM or disk, respectively). If you press a "y" DMENU will kill the file; if you press an "n" it will ignore the [F3] you pressed. If the source is RAM, the file killed will be a RAM file; if the source is PDD, the file killed will be a disk file. Leaving DMENU Pressing [F8] will return you to your computer's main menu regardless of the source. Chapter 3 Using DMENU.BA Page 18 Notes and Options Multiple Pages On the Model 100 version (only), it is possible that there will be more files on disk than will fit on one screen. When this happens, you can use [F5] to toggle between two pages of files. Whenever there is another page to be displayed, the bottom LCD line will show the word "Page" over the [F5] label. Selecting Multiple Files DMENU is most effective when you can select multiple files to load, save, or kill. You can reduce the number of keystrokes and time for these three operations whenever you want them done for more than one file. Get into the habit of looking over all the files before loading, saving, or killing. Select all the files for the operation, then press [F2] or [F3] as required. As noted above, the widebar cursor is always over one selected file. Moving the widebar cursor normally "unselects" one file and selects another. However, pressing [F1] will leave a file selected even after you move the cursor. For example, if you press [F1] and then the space bar, the screen shown above will as follows: ---------------------------------------- |Src:PDD Free: 23030 Type: BA | |08/22/86 09:05:27 | |[DOS+ ][EPSON] FLOPPY FLOPPY IMAGE | | LFILES LOAD LOADER MAP MENU | | MENU0 MENUP MRELO DP-FLP POWR | | POWR-D RELO RELO RESTOR SAVE | | | | Sel Load Kill Len. Page RAM All Menu | ---------------------------------------- (brackets indicate reverse video) Chapter 3 Using DMENU.BA Page 19 You now have selected two files. You can repeat the process to select as menu files as you like. In addition, you can use the [F1] key to quickly select all the files or "unselect" all the files. If you press [F1] repeatedly without moving the widebar cursor, the following sequence will occur: * The first [F1] will permanently select the file under the widebar cursor; * The second [F1] will select all the files on the screen (it will not select files on the second page, if there is one. * The third [F1] will "unselect" all the files on the screen. Then fourth [F1] acts like the first did, and so on. Once you have selected many files on the display, it can become difficult to tell where the widebar cursor is, or what the extension of a particular file is. When this happens, use [F4] to printout the filename; [F4] always prints out the full filename (and length) of the file under the widebar cursor. Operations with Multiple Files Load, Save, and Kill operations proceed almost identically with multiple files as with single files. The only differences involve checking for overwrites. The simplest multiple-file operation to perform is Kill. Whenever you have multiple files selected and press [F3], DMENU will print the question, "Kill all (y/n/a)?" on the message line. Respond with one of the following letters: * "y" will kill all the selected files without further pause. * "n" will abort the multiple kill entirely. All the files will remain selected. * "a" will make DMENU display each of the selected files one by one and ask you either to kill it or not.