-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- PCM Online August 1995 - BBSCON Edition FEATURES Contents: [] Bay Program Loader: A Good DOS Shell in Only 161 Lines of BASIC Code? You Bet! PCM's Programming Contest Winner [] Search and Destroy: Battle in the Briny with this Battleship-type game Entire contents copyright 1995 by Falsoft, Inc. PCM -- The Premier Personal Computer Magazine -- is intended for the private use and pleasure of its subscribers, and reproduction by any means is prohibited. *NOTE: The BASIC/QBASIC listings for these programs are contained in the file PCMO9508.ZIP. If you cannot find this file in the usual file-downloads area of your BBS, ask your SysOp for the file's location. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Bay Program Loader ~~~~~~~~~~~~~~~~~~ < Look for them in the file PCMO9508.ZIP. Ask your SysOp for the location of this file.> What you need to run the program: BASIC or QBASIC "A good DOS shell in only 161 lines of BASIC code? You bet! The first- prize winner in PCM's programming contest " BAY PROGRAM LOADER by Billy A. Younger Bay Program Loader is a utility program that makes it a very simple task to load any program that is loadable from either BASIC or the DOS command line. The minimum requirements are a Tandy/IBM-compatible computer with 384K (640K is preferable), Version 2.11 of MS-DOS/BASIC or higher, a color monitor and one disk drive. This program should be loaded from an AUTOEXEC.BAT file so that it will start automatically when the computer system is first turned on or rebooted. To create an AUTOEXEC.BAT file, first make sure the computer is at the DOS prompt, then type the following, pressing ENTER at the end of each line: COPY CON AUTOEXEC.BAT QBASIC BAYLOAD F6 If a compiled version of Bay Program Loader is used [look for BAYLOAD.EXE in the file PCMO9508.ZIP], create the AUTOEXEC.BAT file by typing the following: COPY CON AUTOEXEC.BAT BAYLOAD F6 The F6 in the above examples is the F6 function key; it saves the AUTOEXEC.BAT file to disk. If your computer system has a hard disk, Bay Program Loader should be placed in the root directory or in a directory pointed to by the PATH statement. When Bay Program Loader is loaded and executed, the screen clears and the directory of the disk is displayed. The first filename is displayed in white letters on a red background. The function keys and commands for each are displayed at the bottom of the screen. The four arrow keys are used to move the cursor left, right, up and down. When one of the arrow keys is pressed, the filename that is one column or one line in the direction of the arrow is displayed in white letters on a red background; the previous filename is shown in gray letters on a black background. When the desired program is displayed in white letters on a red background, you can press the ENTER key to load and run the program. After you press ENTER, the program name is shown and you can type any other necessary parameters or entries needed to load the program. If no other parameters are required, just press ENTER. Programs with the file extensions of .EXE, .COM, .BAS and .BAT are the only program types that can be executed from Bay Program Loader. In order to load a BASIC program, the BASIC.EXE (or BASICA, or QBASIC, etc.) program should be on the same disk as the BASIC program (or in the PATH). The BASIC.EXE program is loaded first and then the BASIC program is loaded. Bay Program Loader can load most DOS programs. When .EXE, .BAS, .BAT and .COM programs are ended, Bay Program Loader is functional again, ready to let you load another program. To display the subdirectories of a current directory, press the ALT and F5 keys. To change directories, move the cursor to the desired subdirectory and press the F9 key. If you want to return to the parent directory of a subdirectory, press the F10 key. To display files beginning with a particular letter -- F, for example -- press the letter F on the keyboard and all files beginning with F are shown. Pressing any letter, A to Z, show files beginning with that letter. If no files exist, the program goes to the error-trapping routine and beeps. The full directory is then displayed. Approximately 65 files can be displayed on the screen. The filenames scroll off the screen when the number of files is higher. To compensate for this, the function keys F5 through F8 can be pressed to display only the files with the extensions .BAS, .COM, .EXE or .BAT. Pressing letters A through Z also display only the files that begin with the letter pressed. The COMMAND.COM program should be on the disk of the default drive at all times. (The default drive is Drive A unless you are using a hard disk.) This is because the SHELL command used in this program looks for COMMAND.COM only in the default drive. To print a copy of the function-key commands, press the ALT and F1 keys while the program is working. After the Help menu is shown, turn on the printer, then press the SHIFT and PRINT keys. Here are the function-key commands: F1 Displays the directory of the disk in Drive A F2 Displays the directory of the disk in Drive B F3 Displays the directory of Drive C F4 Displays the directory of Drive D F5 Displays all .COM files in assigned drive F6 Displays all .BAT files in assigned drive F7 Displays all .BAS files in assigned drive F8 Displays all .EXE files in assigned drive F9 Changes to a child directory. Move the cursor to the desired child directory and press F9 F10 Changes back to the parent directory ALT-F1 Displays the Help menu ALT-F5 Displays all subdirectories in the current directory ALT-F8 Goes to a DOS shell (type EXIT to return) Up Arrow Moves cursor up one line Down Arrow Moves cursor down one line Right Arrow Moves cursor right to next column of filenames Left Arrow Moves cursor left to next column of filenames ESC Clears the screen and exits the program ENTER Loads the highlighted program Letters A-Z Displays the files beginning with the selected letter -=*=- Billy Younger, some of whose other programs in BASIC and dBASE have been published in PCM, works in cargo statistics for a major airline. -=------------- -=*=- -=*=- -=*=- -------------=- Search and Destroy ~~~~~~~~~~~~~~~~~~ < Look for them in the file PCMO9508.ZIP. Ask your SysOp for the location of this file.> What you need to run the program: MS-DOS "A two-player game (like Battleship) whose object is to sink all the enemy's warships before he can do the same to your own" SEARCH AND DESTROY: TO THE BATTLESTATIONS by Tim Hoefling It is the dead of night and war has been declared. Unfortunately radar has not yet been invented; in order to find and destroy your opponent, you must painstakingly search briefly throughout the sea for all his ships. Battleship is a game for two people. After you enter and run the program, a title screen appears. [Note: you don't need to type in this program, because both the Pascal listing and the compiled version are supplied in the PCMO9508.ZIP file.] At that time you can toggle the sound on and off by pressing S. A condensed version of the instructions can be displayed on the screen with a press of the letter I. Pressing any other key starts the game. At any time throughout game play, pressing ESC halts the game and returns you to DOS. >>[ Placing Your Ships ]<< As the commander of the navy, you have to power to strategically place your ships anywhere in the sea, which consists of a 10-by-10 grid. To enter the ships, have your opponent turn his head away from view of the monitor and keyboard while you type in each coordinate. The coordinates are entered by typing the letter and then the number of the first block of the ship. The computer then prompts you to place the ship across (enter A) or down (enter D). If the ship you place runs over the edge of the grid or crosses over another ship, the computer prompts you to reenter the coordinates. After you enter all your ships, your opponent enters his in the same manner. To help place the ships, refer to the follow table: Ship Number of Units in Length Carrier 5 Battleship 4 Cruiser 3 Submarine 3 Destroyer 2 >>[ Playing the Game ]<< To play the game, each player takes turns guessing an opponent's ship location. If you hit an opponent's ship, an H appears on your opponent's grid and you are allowed an additional turn. If you miss, an O appears in the grid. When you find and destroy all parts of the ship, you are told that you have sunk that particular ship. The word Sunk now appears on the Condition Report Bulletin. The game continues until all of either your or your opponent's ship are sunk. At that time all remaining ships are displayed as X's. After a short pause the title screen reappears. -=*=- Tim Hoefling lists skiing and stage lighting among his non-computer hobbies. He also enjoys playing percussion instruments. -=------------=- T-H-E E-N-D F-O-R N-O-W -=------------=-