DSK, the Disk Shell program

MIRE comes with an application called DSK/CMD which allows manipulation of the files on the SD card.

	DSK [-F script_file]

DSK is a command-line utility; if "script_file" is specified, commands are read and executed from that file. This feature makes it easy to switch between commonly-used emulated floppy configurations.

You can type ? or HELP to get a list of commands, and typing "?command ..." will return a brief description of the specified command(s) along with usage information. Type QUIT to exit DSK.

Many of DSK's commands are Unix-like. Type LS to get a listing of files on the SD card. The -L switch will provide long-listing format including file sizes. -S and -H will include files marked System and Hidden. A directory name can be specified as well.

Other Unix-like commands include CD (change directory), CP (copy), MKDIR (make directory), MV (move/rename), PWD (print working directory), and RM (remove/delete). DSK's pathname handling is currently fairly primitive; for example if you want to copy a file called README.TXT into a subdirectory called MYDIR, you have to type "CP README.TXT MYDIR/README.TXT"--you have to include the destination filename, not just the directory. This inconvenience will be addressed in a future release of DSK.

The STAT command shows the current status of DMK files mounted as emulated floppy drives. Use the MOUNT and UMOUNT commands to mount and unmount DMK files as desired. Both of these commands have optional switches -B and -A which stand for Before and After. If Before is specified, the image will be mounted/unmounted but the FLOPPYn.DAT file will not be altered, so after reboot that drive will revert to its previous state. If After is specified, the image will not be mounted immediately but the FLOPPYn.DAT file will be updated (or deleted by UMOUNT) for the next reboot. This is useful for switching DOS images on drive 0. The default is both -B and -A.

The SWAP command allows re-mapping of external floppy drive numbers. For example if you have one external floppy drive, configured as drive 0, and would like to be able to access it while emulated SD floppies are mounted as drives 0 and 1, the command "SWAP 0 2" will accomplish this. All accesses to physical drive number 2 will thereafter be redirected to your external floppy drive 0. The current mapping is stored in the file DRIVEMAP.DAT on the SD card. Delete this file and reboot to immediately restore the original configuration.

The WPROT [-R] will set [or Remove] the write-protect byte in the DMK file mounted on the specified drive.

You can copy files between the SD filesystem and the TRS-80 logical drives (hard drives, real floppies, or emulated floppies) using the GET and PUT commands. The perspective is the SD filesystem, so GET copies a file from the TRS-80 drive onto the SD card, and PUT copies a file from the SD card onto the TRS-80 drives.

If you wish to perform a TRS-80 DOS command without leaving DSK, use "DOS" or "!". For example "!DIR :0" will return the directory listing of TRS-80 logical drive 0. Be careful not to run programs that use memory above address 0x8000, which is where DSK resides. Although DSK sets DOS's high memory address to protect itself, this limit is not always respected.

The few remaining commands are self-explanatory.

None of DSK's commands currently support filename wildcarding. This shortcoming will be addressed in a future release.


Back to the main page