29.12.2012 Views

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ackup utility provides exceptional flexibility as can be evidenced by the following<br />

command examples:<br />

BACKUP :4 TO :2<br />

will copy all files from logical drive 4 <strong>to</strong> logical drive 2. If both drives are floppies<br />

having the same physical configuration (i.e. both 40-track 2-headed with the same<br />

density), then the backup will au<strong>to</strong>matically be performed track by track called "mirror<br />

image".<br />

BACKUP /TXT:3 TO :5 (OLD)<br />

will copy all files with a file extension of "TXT" from logical drive 3 <strong>to</strong> logical drive<br />

5 but only if the file already exists on logical drive 5. <strong>The</strong> use of the "OLD" parameter<br />

permits organization of archival copies.<br />

BACKUP R$S/BAS:4 TO :2 (MOD,DATE="11/09/82-11/15/82")<br />

will make copies of all files from logical drive 4 with a filename starting with the<br />

character "R", the third character "S", with any character acceptable in all other file<br />

name character positions. Also, files must have been last modified between the dates of<br />

November 9, 1982 through November 15, 1982 inclusive in order <strong>to</strong> be included in the<br />

backup. In addition, the file must not have been backed up since it was last modified.<br />

<strong>The</strong>se examples illustrate the extreme flexibility of managing archival copies of working<br />

files. When used in a hard drive environment, large capacity floppy diskettes can be used<br />

<strong>to</strong> s<strong>to</strong>re selected "classes" of files with working files backed up in a structured manor<br />

only if they have been modified. Daily "churning" of working files is minimal, thus a<br />

procedure that enables a backup only if a modification has been done <strong>to</strong> a working file<br />

within a class certainly lends itself <strong>to</strong> optimum file management techniques without the<br />

need for expensive backup hardware. For those cases where a single file exceeds the<br />

capacity of a single floppy, a separate utility provides diskette spanning capabilities<br />

for the backup.<br />

<strong>The</strong> command <strong>to</strong> obtain a direc<strong>to</strong>ry display is used frequently in most machine environments.<br />

<strong>The</strong> DOS direc<strong>to</strong>ry command listing is sorted by file name/ext. When the length<br />

of a listing exceeds the line capacity of the video display, paging is performed with a<br />

pause at each page. <strong>The</strong> listing provides data on the protection level, logical record<br />

length, file length (in kilobytes), date of last update, and whether a backup copy<br />

exists, for each file in the direc<strong>to</strong>ry. A partial file specification can be requested <strong>to</strong><br />

limit the listing <strong>to</strong> those files in the "class" similar <strong>to</strong> the BACKUP utility.<br />

Disk files are supported with two types of access - Record I/O and character I/O. Logical<br />

Records of from one <strong>to</strong> 256 bytes in length can be read or written using the @READ or<br />

@WRITE SVC requests. Record I/O can be random access (by position SVC requests prior <strong>to</strong><br />

READ/WRITE) or sequential access using repetitive READs or WRITEs. Character I/O is<br />

accomplished by @GET and @PUT SVC requests and is essentially the same as record I/O with<br />

a Logical Record Length (LRL) equal <strong>to</strong> one. However, if GET and PUT are used <strong>to</strong> implement<br />

sequential access, then a file can be considered a character I/O device just like a<br />

printer, a serial port, or a video display device. A byte I/O request is therefore<br />

independent of the physical device "connected" <strong>to</strong> the control block which is requesting<br />

the I/O. This makes the system "device independent".<br />

Routing, filtering, and linking is 100% - devices may be routed <strong>to</strong> files and subsequently<br />

filtered and linked. A priority level hierarchy is established according <strong>to</strong> bit assignments<br />

in the DCB: file, NIL, route, link, and filter (file being the highest). Filters<br />

are assigned control blocks in the DCB table area which supports up <strong>to</strong> 31 entries. Each<br />

device driver and filter has its own entry. <strong>The</strong> establishment of a LINK also uses a DCB<br />

2-6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!