Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
TRSDOS
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===File management=== Disk files are supported with two types of access: Record I/O and character I/O. Logical records of from one to 256 bytes in length can be read or written using the @READ or @WRITE SVC requests. Record I/O can be random access (by position SVC requests prior to READ/WRITE) or sequential access using repetitive READs or WRITEs. Character (or byte) I/O is accomplished by @GET and @PUT SVC requests and is essentially the same as record I/O with a ''Logical Record Length'' (LRL) equal to one. (Physical access to a disk storage device is always in units of 256 byte sectors. This is fixed by the TRS-80 disk controller hardware). However, if GET or PUT are used to implement sequential access, then a file can be considered a character I/O device just like a printer, a [[serial port]], or a video display device. A byte I/O request is therefore independent of the physical device "connected" to the control block which is requesting the I/O. This makes the system "device independent". Filenames are limited to eight [[alphanumeric]] characters (the first character must be alpha) which are [[case insensitive]] (only capital letters are used; any lowercase letters entered are capitalized). File extensions are up to three characters and obey the same rules. File passwords are up to eight characters obeying the same rules (TRSDOS 6 versions up to 6.2 support both owner and user passwords). Entire diskettes can also be assigned master passwords, which may limit user access via the BACKUP and PURGE commands. Under TRSDOS and LDOS the system is never "logged in" to any current drive as with [[CP/M]], [[PC DOS]] and [[MS-DOS]]. The system prompt is always {{samp|TRSDOS Ready}}. All file access requests (whether issued by the user at the console or a program being executed) are satisfied by searching the directory of the first drive specified (taken as drive zero if no drive number is given) and, if the requested file is not found, then searching the next (higher numbered) drive in the system. This continues until the file is found or all the drives in the system have been searched (but see below for variations on this rule). Drive numbers are specified with a colon {{kbd|:}} followed immediately with the drive number. The colon is optional unless the drive specification is used as a suffix for a filename. Using the {{kbd|DIR}} directory command as an example: * {{kbd|DIR}} displays all files starting with logical drive zero, then drive one, and so on. * {{kbd|DIR :4}} or {{kbd|DIR 4}} searches logical drive four (for all files, as always when no filename is given). * {{kbd|DIR :4-6}} or {{kbd|DIR 4-6}} searches logical drives four, five, and six. * {{kbd|DIR :4-}} or {{kbd|DIR 4-}} searches logical drives four, five, six and seven. * {{kbd|DIR FILENAME:2}} searches for FILENAME on logical drive two. * {{kbd|DIR FILENAME:2-}} searches for FILENAME on all logical drives starting from drive two. As seen, the dash character {{kbd|-}} is used to specify a range of drive numbers. The {{kbd|DIR}} and {{kbd|CAT}} (catalog) commands display all file specifications ('''filespecs''') matching the query on all drives. Other commands/utilities such as {{kbd|BACKUP}}, {{kbd|COPY}} and {{kbd|PURGE}}, and drive searches initiated by programs being executed, stop searching at the first drive found to match. If the same filespec exists on multiple drives, then those files on higher-numbered drives will be excluded. File access by partial filenames ('''partspecs'''), file extensions, and file dates are supported. For example: * {{kbd|DIR SAMPLE}} will select files SAMPLE, SAMPLE1, SAMPLE23 and SAMPLEIT. * {{kbd|DIR /BAS}} will select files SAMPLE/BAS, TEST/BAS, EXAMPLE/BAS, etc. As with the {{kbd|DIR}} example earlier, drive specifications ('''drivespecs''') may be appended to filespecs. These examples assume the selected files have not be made invisible in the disk directory. File access requests issued by applications programs running under TRSDOS work the same way.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)