100 rem this file was auto-generated from a html document
110 print "{clr}";
120 gosub 300: gosub 200
130 print "{clr}You have reached the end of the document."
140 print "Read again from start (y/n)?"
150 get k$: if k$<>"y" and k$<>"n" then 150
160 if k$="y" then run
170 print "{clr}";
180 end
190 :
200 print "{down}Press any key to continue...{up}"
210 get k$: if k$="" then 210
220 print "{clr}";
230 return
240 :
300
print"CBM DOS Wedge
print"
print"Issuing arbitrary Commodore DOS commands to a connected disk drive directly
print"from the BASIC command line
print"     ------------------------------------------------------------------
print"
print"Table of Contents
print"
print"     * Installation
print"     * Command descriptions
print"     * Wedge activation signs
print"     * Setting the default device
print"     * Displaying the directory
print"     * Reading the disk drive error channel
print"     * Loading a program
print"     * Loading and running a program
print"     * Sending DOS commands
print"     * Downloads
print"
print"Installation
print"
print"   The wedge is compatible with Commodore BASIC 2 and BASIC 4 and consumes
print"   only 389 bytes RAM.
gosub 200
print"
print"   Load and start the wedge installer just like any other program:
print"
print"   BASIC 2:
print"          LOAD";chr$(34);"WEDGE";chr$(34);",8
print"          RUN
print"
print"   BASIC 4:
print"          dL";chr$(34);"wedge
print"          run
print"
print"   The wedge installer is a ";chr$(34);"universal binary";chr$(34);" containing a couple of
print"   resident wedge versions. The wedge installer tries to auto-detect your
print"   BASIC version first and installs the appropriate version of the
print"   resident wedge afterwards (if any).
print"
print"   BASIC 2 and BASIC 4 are fully supported. The installer can detect BASIC
print"   1 (PET 2001), but this BASIC version is unsupported. The CBM-II series
print"   aren't supported at all, but you can use Michael Pleban's CBM-II DOS
print"   Wedge instead.
print"
print"Command descriptions
print"
gosub 200
print"   [ ] Square brackets are used to enclose information which is optional
print"   to the command syntax. The brackets themselves are not part of the
print"   command.
print"
print"   < > Angle brackets act as a placeholder that will be replaced by an
print"   applicable value. The brackets themselves are not part of the command.
print"
print"   ... Three dots indicate that the last parameter can given several
print"   times. Usually this applies for filenames where the operation can
print"   applied to a single file or multiple files.
print"
print"   Device - usually a floppy disk drive connected to your PET using the
print"   IEEE bus. In this context, device means the unique device address that
print"   is used to communicate with the device. If you load a program by
print"   LOAD";chr$(34);"PRG";chr$(34);",8 your device has the address 8. A device may contain a
print"   single drive like the 2031, or two drives like the 8050.
print"
print"   Drive - a dual floppy like the 8050 is a single device with two drives.
print"
print"Wedge activation signs
print"
print"   Wedge commands are only available in direct mode. You cannot use them
print"   in your programs. The wedge is a BASIC extension that is activated by
gosub 200
print"   one of the magic characters #@>/^ at the beginning of the line when
print"   you enter a command in direct mode. The greater than > has the same
print"   function as the at @, so e.g. @$ and >$ do the same. In the following
print"   text, only the @ is used to simplify things.
print"
print"   Leading spaces are omitted.
print"
print"   Here's an overview of each wedge activation sign's purpose that will be
print"   discussed later:
print"
print"   @ and >
print"          Displaying the directory
print"          Reading the disk drive error channel
print"          Sending DOS commands
print"
print"   #
print"          setting the default device
print"
print"   /
print"          loading a program
print"
print"   ^
print"          loading and running a program
gosub 200
print"
print"Setting the default device
print"
print"   #<unit number> sets the default drive,
print"   # without unit number shows the current default drive.
print"
print"   The default device is initialized with 8.
print"
print"   #9 sets the default drive to 9.
print"
print"   # will show you the default drive was really set to 9.
print"
print"   #8 sets the default drive back to 8.
print"
print"Displaying the directory
print"
print"   @$[ [drive] : filename ] displays the disk's directory.
print"
print"   Typing @$ without filename displays the entire directory. @$ followed
print"   by a colon and a filename will display the specified file in the
print"   directory listing (if it exists). A selective listing can be displayed
print"   by using pattern patching or wild cards as part of the filename.
print"
gosub 200
print"   Press  Space Bar  to pause the listing and any other key to continue
print"   it.
print"
print"   Abort the listing with the STOP-key.
print"
print"   @$ displays the entire directory.
print"
print"   @$1: displays the directory of default's device drive 1 only. Do not
print"   confuse drive and device.
print"
print"   @$:N* displays all files having a ";chr$(34);"N";chr$(34);" as the first letter in their
print"   filename.
print"
print"Reading the disk drive error channel
print"
print"   @ without any parameters reads and displays the disk drive error
print"   message channel. If everything is okay, you'll get your DOS version at
print"   startup and 00, OK, 00, 00 afterwards.
print"
print"Loading a program
print"
print"   /filename loads a program.
print"
gosub 200
print"   /GARY loads the program called GARY, but doesn't start it. So you can
print"   list and edit it afterwards.
print"
print"Loading and running a program
print"
print"   ^GAME loads and runs a game. Probably. But it wouldn't be very clever
print"   to save it on disk using this name.
print"
print"   If you're using BASIC 2 and try to load a non-existent file, these load
print"   commands act just in the same way the normal BASIC-2-LOAD does: it
print"   hangs and tries to load forever. Use the STOP-key to get back to BASIC
print"   then.
print"
print"Sending DOS commands
print"
print"   @<DOS command string> sends your command to the device's command
print"   channel. This text is not interpreted by the wedge, so the result
print"   depends on what your drive understands.
print"
print"   Usually this are the Commodore DOS commands:
print"
print"   @C:newfile=existingfile Copy a file on the same diskette
print"   @I Initialize the disk drive. Rarely needed as the drive usually does
gosub 200
print"   this on its own if it has a door switch.
print"   @N:diskname New a disk that was already formatted
print"   @N:diskname,id Format (new) a diskette, giving it an index at your
print"   choice
print"   @R:newname=oldname Rename a file
print"   @S:file1[,file2 ...] Scratch a file (or files). Wild cards are allowed!
print"   Read the status channel with @ to see how many files were scratched.
print"   @UJ Reset the disk drive. Read the status channel with @ to get the DOS
print"   version string.
print"   @V Validate a disk: reconcile the BAM with the disk directory, allocate
print"   all used blocks and free all blocks not being used by files, and delete
print"   all unclosed files from the directory.
print"   @D1=0 Duplicate an entire disk. Only available in dual drive units. The
print"   target(!) drive number comes first, then the source drive number.
print"
print"
print"
print"   http://petsd.net/wedge.php
print"
return
