PB Dos by Peter Barella Chapter. . . . . . . . . . . Number Booting PB Dos . . . . . . . 1 Control Keys . . . . . . . . 2 The First Commands . . . . . 3 Commands for Your Drive. . . 4 Printer Commands . . . . . . 5 Modem Input and Output . . . 6 Almost a Full Screen Editor. 7 The PB Dos timer . . . . . . 8 Defkeys file . . . . . . . . 9 The DOS. . . . . . . . . . . 10 Chapter 1: Booting PB Dos If you have a 1.1 disk ROM or later version: Place the PB Dos disk into drive 0. Type 'DOS' and press (enter). When the Disk Extended Color BASIC message comes on again, Type 'RUN "PBDOS"' and press (enter). If you have a 1.0 disk ROM: Place the PB Dos disk into drive 0. Type 'RUN"+"' and press (enter). When the Disk Extended Color BASIC message comes on again, Type 'RUN"PBDOS"' and press (enter). Chapter 2: Control keys PB Dos has 2 control keys. They are the Clear and break keys. Pressing Clear in combination with any letter key on the keyboard will cause a whole command word to be typed. The most used are: D-Dir E-Edit G-Load" L-List R-Run S-Save" Z-Cls Pressing clear with break resets the computer. Break also is a control key and subtracts 64 from the ASCII value of any key pressed in combination with it. The other use of the break key is with the number keys and colon (:). This causes PB Dos to enter a mode, set the timer, and other things. Below is a table of what each key does. 1. Disable input from the modem. 2. Enable input from the modem. 3. Unused. 4. Unused. 5. No echoing to the modem. 6. Do echo to the modem. 7. Unused. 8. Unused. 9. Add 1 minute to the time. 0. Zero the type ahead buffer. : Subtract 1 minute from the time. Chapter 3: The first Commands This section covers the easiest commands and commands which do not fit in other sections. (n) is a number between 0 and 256. (line) is a number between 0 and 63999. AUTO (line),(n)- Causes auto line numbering. Press Break-7 to exit. The reset button will not exit for you! Line and n are optional, both default to 10 if not included. CURSOR (n)- Sets the cursor to character n. Cursor 0 inverts the character under the cursor. CLICK (n)- Adjusts the tone of the click the speaker makes when you press a key. Zero turns the click off. CLOCK (ON,OFF)- Turns the time of day clock on or off. HERTZ (n)- Adjusts the timer to the local power supply. It is a good idea to insert a HERTZ command at the beginning of a BBS so when the drives are running the timer won't get slow. When the user logs off you can set it back to 60. LNG (n)- Sets the length of the text which may be entered at an INPUT or LINE INPUT command. TYPE "text"- Inserts the text into the type ahead buffer. If there is a semicolon (;) after the close quote, no carriage return is entered. SCROLL (3-16)- Adjusts how many lines which can scroll. ZERO- Erases any text in the type ahead buffer. Chapter 4: Commands for Your Drive RATE (1-4)- Instructs PB Dos to use a different stepping rate. The chart below shows the number for the stepping rate. 1- 6 milliseconds (fastest) 2- 12 milliseconds 3- 20 milliseconds 4- 30 milliseconds (slowest) TRACKS (n)- Allows PB Dos to access the number of tracks specified by n. ߯Chapter 5: Printer Commands CROSSREF (variable)- Displays all the lines where the specified variable is used. Commands may also be specified. Spaces are ignored. Searching for 'H I' will find 'HI', and searching for 'HI' will find 'H I' also. DUAL (ON,OFF)- This command turns dual printing to the screen and printer simultaniously on or off. LPRINT- This is the equivelent of PRINT #-2. Chapter 6: Modem Input and Output BEGIN (ON,OFF)- Causes PB Dos to RUN "LOGON/BAS:0" when a carrier tone is lost if ON. BREAK (ON,OFF)- When on, break codes [CHR$(3)] sent from the modem are accepted, when off, they are ignored. BSB (ON,OFF)- If ON and a backspace character is sent to the modem, PB Dos sends a Backspace - Space - Backspace pattern to erase any character. ECHO (ON,OFF)- When on, PB DOS will send (echo) all text printed on the screen to the modem. FEED (ON,OFF)- Controls line feeds to the modem. When ON, line feeds are sent after each carriage return, when OFF, they are not. INKEY$(n)- This command works the same as in Color Basic. If (n) is specified and PORT 1 is selected, the computer waits (n) interupts for a character to be received. If (n) is not specified, it waits until a character is received. If PORT 0 is being used, there is no delay, even if (n) is specified. LOCAL- This causes the computer to ignore all input from the modem. PORT (n)- This command selects either the RS-232 Communications Pak or the DIN port in the back of the computer. (n) ranges from 0 to 1, 0 being the RS-232 Pak, 1 being the DIN port. Note that if PORT 1 is selected and ECHO is on or TERMINAL is selected, all output to the printer is ignored. TERMINAL- This causes PB Dos to accept characters from the modem. They are inserted into the type-ahead buffer. Chapter 7 Almost a Full Screen Editor PB Dos has a small editor that allows you to edit lines as you type them. There are 3 keys involved: The left, right, and down arrows. LEFT ARROW ( <--- ) This key allows you to back up over text that is already entered. RIGHT ARROW ( ---> ) This key allows you to get back what you back up over with the left arrow. DOWN ARROW- This key allows you to back up over and delete text. After it is deleted the right arrow will not get it back. After backspacing with the left arrow you can add to a line by typing something then pressing the right arrow. Chapter 8 The PB Dos Timer The time of day timer is on at all times in the upper left hand corner. To set the minutes press (Clear)-: to subtract 1 minute or (Clear)-9 to add 1 minute. When you are booting PB Dos, you are asked to set the timer. If for some reason you wish to set this timer with another program, you will need the following pokes: Unit Hex address Decimal address Seconds $FEF1 65265 Minutes $FEF2 65266 Hour $FEF3 65267 Day $FEF4 65268 Month $FEF5 65269 Year $FEF6 65270 Time on system Seconds $FEFA 65274 Minutes $FEFB 65275 Hours $FEFC 65276 Chapter 9: Errors ERL- Returns the line number the last error occured in. 65535 represents the command mode. ERR- Returns the number of the last error which occured. ERROR (n)- Causes an error specified by n. [ON] ERROR GOTO (line)- Sets up an error trap. If an error occurs, control is transfered to the specified line. If 0 is specified, the error trap is removed. ON is optional, it is standard to use ON ERROR GOTO, although in PB Dos ERROR GOTO is accepted. The table below shows the DOS error number*, error number, and type of errors which occur. # DOS# Error type 00 01 NEXT without FOR. 02 02 Syntax 04 03 RETURN without GOSUB 06 04 Out of DATA 08 05 Illegal function call 10 06 Overflow 12 07 Out of memory 14 08 Undefined line 16 09 Bad subscript 18 10 Redimensioned array 20 11 Division by zero 22 12 Illegal direct 24 13 Type mismatch 26 14 Out of string space 28 15 String too long 30 16 String formula too complex. 32 17 Can not continue 34 18 Bad file data 36 19 Path already open 38 20 Bad device number 40 21 Input Output 42 22 Bad file mode 44 23 Path not open 46 24 Input past end of file 48 25 Direct statement in file 50 26 This error does not exist 52 27 File not found 54 28 Bad record number 56 29 Disk full 58 30 Out of buffer space 60 31 Disk write protected 62 32 Bad file name 64 33 File structure 66 34 File already exists 70 35 Field overflow 72 36 Non-fielded string 74 37 I/O past end of record 76 38 Hang up (Loss of carrier) 78 39 No error * The DOS error number is the number the DOS responds with. Chapter 10: The DOS This section is divided into many smaller sections. The commands covered above were for using PB Dos BASIC, which is Disk Extended Basic with the added commands. The DOS is just a BASIC program that preforms many functions. This chaptertalks about these commands. Parameters inside of < and > signs are required. Parameters inside of [ and ] signs are optional. ATTRIB Forms: ATTRIB ,
This command changes the type of file and the format it is in. The tupe may be either: BASIC - A BASIC program. DATA - A data file generated by a BASIC program. MACHINE - A machine language program. SOURCE - The source code to a machine language program. The form may be either A (ASCII) or B (Binary) BASIC Forms: BASIC [Filename] This command enters PB Dos BASIC. If a filename is specified, it loads the program and runs it. BBS Forms: BBS This command will prompt for a BBS disk to be inserted into drive 0 and to press a key. When you press a key it will attempt to run a program called 'LOGON/BAS:0'. If the file is not present an ERROR 24 is reported. COPY Forms: COPY COPY The first form of this command will copy a file from the first file to the second file. The second form of this command will copy a file from the first file and create a file with the same name on the specified drive number. If the drive numbers are the same, source and destination disks are prompted. The source disk should be in the drive when this command is called. DIR Forms: DIR [:drive number] [extension] [PTR] This command displays a directory of the disk in the last specified drive (Drive 0 on entry). If an extension is specified only files with that extension are displayed. If PTR is added, the directory is printed on the printer as well as the screen. If the disk has a name, the name will be displayed at the top of the screen. If the disk has not been named, nothing is displayed. DOWNLOAD Forms: DOWNLOAD This command allows error checking downloads of text files or BASIC programs from another PB Dos terminal. The file name of the program is received from the terminal sending the file. DUAL Forms: DUAL [OFF] This command turns simotaneous printing on the printer and the screen at the same time on or off. If OFF is not specified, default is ON. FREE Forms: FREE [:drive] [PTR] This command displays a free space map of the specified drive. an X represents a used granule, a . represents a free granule. If a drive is not specified, drive 0 is defaulted. If PTR is added, the map is displayed on the printer as well as the screen. HELP Forms: HELP [Command] This command displays help on the specified command. If no command is specified, a list of commands help is available for is displayed. KILL Forms: KILL This command deletes (scratches, deletes) the specified file from the directory and deallocates all granules it takes up. LIST Forms: LIST This command lists the specified file. NAME Forms: NAME [:drive number] This command names a disk in the specified drive or default drive 0 to the specified disk name. If the disk has not already been dated, the current date is written to the disk. RENAME Forms: RENAME This command changes the file specified by the firstname to a file named the second filename. SETIME Forms: SETIME This command allows entry of the date and time. SETMDM Forms: SETMDM This command sets the parameters of the modem. These parameters are: BAUD=baud rate baud rate maybe be 300, 600, 1200, 2400, 4800, or 9600. SETPTR Forms: SETPTR This command sets the parameters of the printer. These parameters are: BAUD=baud rate baud rate may be 300, 600, 1200, 2400, 4800, or 9600. WIDTH=print width COMMA=comma field width - The number of characters to print before starting the next field when using a comma in a LPRINT or PRINT #-2 statement. UPLOAD Forms: UPLOAD This command uploads (sends) a file to a receiving PB Dos terminal. This only works on BASIC programs if they are saved in ASCII format. It will also download text files, but they can not contain lines longer than 249 characters. This command must be executed before the receiving terminal executes the download command.