Table of Contents
As soon as you receive your NEWDOS/80, fill out and mail the registration card. Apparat will limit its assistance and patches (zaps) to registered owners only. In your communications with Apparat, always state your name, address and your NEWDOS/80’s registration number. For Version 1 of NEWDOS/80 we had many complaints of not receiving zaps from users who had not sent in the registration card. Apparat does not require the owner to agree to anything when filling out the NEWDOS/80 Version 2 registration card; just let us know who you are.
Throughout this manual certain trademarked names will be used to refer to those trademarked products. Since our printers do not have the tm symbol, we will acknowledge the trademarked names here. If we have missed rendering an acknowledgement, please forgive us as we do not mean for any trademarked name to be used to refer to anything that the trademark holder does not mean it to refer to. In some cases, such as VTOS, the primary manual for that system shows the name trademarked but does not say who it is trademarked to.
1. TRS-80 is a registered trademark of Radio Shack, Inc.
2. TRSDOS is a registered trademark of Radio Shack, Inc.
3. VTOS is a registered trademark.
4. LDOS is a registered trademark of Lobo Drives International.
5. DOUBLER is a registered trademark of Percom Data Company, Inc.
6. SCRIPSIT is a registered trademark of Radio Shack, Inc.
Almost all disk based computer systems use a Disk Operating System (known as a DOS) to provide a software interface between the user program performing disk I/O and the actual disk drives and their controllers. Usually these operating systems perform many other functions as well such as controlling what user program is executing and the allocation of disk files and file space. Believe it or not, the primary function of a DOS is to make life easier for the computer users and programmers. NEWDOS/80 is one of a number of DOSs that operate with the TRS-80; in this case only the Model I and Model III are supported.
NEWDOS/80 Version 2 is the replacement for NEWDOS/80 Version 1 that was released in June, 1980 and for NEWDOS/21 that was released in March, 1979. NEWDOS/80 Version 2 is a disk operating system designed to operate on the TRS-80 Model I and the TRS-80 Model III. A particular NEWDOS/80 Version 2 master diskette is tailored to operate on only one of the two TRS-80 models; if you wish to operate on both the Model I and the Model III, you must purchase different NEWDOS/80’s for each. The TRS-80 model being used must have at least 32K of RAM and at least one 5 inch, single sided, 35 (40 for the Model III) track disk drive (mounted on drive 0). Model 1 NEWDOS/80 Version 2 is distributed on a 35 track, single sided, single density diskette, and Model III NEWDOS/80 Version 2 master diskette is distributed on a 40 track, single sided, double density diskette. You must have a disk drive capable of handling the master diskette.
NEWDOS/80 Version 2 for the Model I and NEWDOS/80 Version 2 for the Model III are mostly downward compatible with NEWDOS/80 Version 1, NEWDOS/21 and Model I TRSDOS 2.3, but it will be necessary to maintain certain programs with different copies for all four systems for incompatibilities do exist. NEWDOS/80 Version 2 is more incompatible with the Model III TRSDOS than it is with the Model I TRSDOS, and most programs and files will have to he maintained differently in the two systems. In the past, while TRSDOS was largely dormant, attempts were made to limit the incompatibilities between NEWDOS and TRSDOS, but now that TRSDOS is being actively updated more and more incompatibilities are appearing between the two systems. TRSDOS is going one way; NEWDOS/80 is going another. If this limits and eventually destroys NEWDOS’s usefulness to the users, so be it. NEWDOS cannot and should not exist to be a mirror image of TRSDOS; if the user wants that, then please use TRSDOS. NEWDOS was accidentally created in the huge vacuum left by Model I TRSDOS, has always incorporated features not in TRSDOS and, in Version 2, has not implemented many of the newer features of the Model III TRSDOS. Chapter 12, sections 12.1 through 12.5 give some of the incompatibilities of NEWDOS/80 Version 2 with NEWDOS/80 Version 1 and with the Model I and III TRSDOSs.
The DOS and DISK BASIC portions of NEWDOS/80 are total rewrites from that offered in NEWDOS/21. The requirement that the user purchase TRSDOS as a precondition of use of NEWDOS/21 is not required for NEWDOS/80. It is still recommended that the user purchase TRSDOS, and NEWDOS/80 users are expected to have purchased the TRSDOS manual and be knowledgeable of its contents as use of NEWDOS/80 assumes this user knowledge. Users of the EDTASM module are still required, as a precondition of use of NEWDOS/80’s EDTASM, to have purchased Radio Shack’s tape editor/assembler.
Though NEWDOS/80, Version 2 was tested more extensively than Version 1, there will still be errors, and many programs will require at least a zap to work with NEWDOS/80 Version 2. Error reporting procedures are discussed in chapter 11, and the outstanding zaps are in chapter 13.
NEWDOS/80 is not a simple system. When the NEWDOS/80 user is ready to initially use NEWDOS/80, he/she should spend one to two hours studying the documentation before doing anything with the NEWDOS/80 diskette.
When ready, put a write protect tab on your NEWDOS/80 Version 2 master diskette. Then power up your computer, place the master diskette in drive 0 and press reset. The NEWDOS/80 banner should appear optionally followed by requests for date and time. If date and time are requested, please give realistic values. Next, NEWDOS/80 READY will be displayed to indicate DOS is waiting for something to do.
It is good practice to never mount on a disk drive the NEWDOS/80 master diskette except to make copies of the diskette and to very carefully apply mandatory zaps (see chapter 11). When zapping, you should first apply the zaps to a working Version 2 system diskette and test them out before applying them to the master diskette. Keep the master diskette stored away in a safe place; do not keep it in your NEWDOS/80 manual and do not use it in normal operations. Apparat will not replace a lost master diskette though it will, under the terms for the diskette update service offered in section 11.9, replace a damaged diskette.
Enter, via the keyboard, the DOS command:
A list of all the DOS library commands will be displayed to you. These commands are defined in chapter 2 with examples.
Enter the DOS command:
A list of all the files on the NEWDOS/80 Version 2 master diskette will be displayed. These files, except for NWD82V2/ILF and NWD82V2/XLF, are discussed in chapter 5.
Enter the DOS command:
NEWDOS/80 offers the user certain system options which are specified via the DOS library command SYSTEM (see section 2.46) and activated during each computer reset. The DOS command SYSTEM,0 you just executed has displayed the state of all SYSTEM options, and you should compare these value carefully against the specifications. You may decide that your system is to use different SYSTEM specifications. You may change them now if absolutely necessary; otherwise you should wait until after you have made a few backup copies of the master diskette. Whenever you decide to update the master diskette, don’t forget to take off the write protect tab.
Enter the DOS command
NEWDOS/80 can operate with a limited mixture of disk drive and interface types. The characteristics of each of the physical drives 0-3 must be specified to the system via the DOS library command PDRIVE (see section 2.39). These characteristics are then read by DOS during each computer reset. The PDRIVE command you just executed has displayed the existing drive specifications plus 6 psuedo drive specifications. You may want to change the specifications for one or more drives. You may do so now if absolutely necessary; otherwise you should wait until you have a few backup copies of the master diskette.
Now you must make three or more copies of the NEWDOS/80 Version 2 master diskette. If possible, perform these initial backups without changing any of the SYSTEM or PDRIVE parameters. If not possible, change them the minimum necessary and do a reset when done. You should carefully study sections 2.14, 7.39 and 2.46.
NEWDOS/80 does NOT have a BACKUP module; format 5 or 6 of DOS library command COPY (see section 2.14) is used instead. For each of the backups you are about to do, the master diskette is both the system and the source diskette while the destination diskette is the diskette to contain the new working copy of the NEWDOS/80 system. Some examples of the COPY command you will use to make copies of the NEWDOS/80 Version 2 master diskette are:
COPY,0,0,,FMT,USD For a single drive system where the master and copy diskettes have the same PDRIVE characteristics.
COPY,0,1,,FMT,USD For a multiple drive system where the master and copy (mounted on drive 1) diskettes have the same PDRIVE characteristics.
COPY,0,0,,FMT,USD,CBF,DPDN=4 For single drive system wherein the destination diskette has PDRIVE characteristics different from the master diskette. You must have previously altered the master diskette PDRIVE specification for drive 4 (remember to use the A option or to reset the computer after changing the drive 4 specification).
COPY,0,1,,FMT,USD,CBF For a multiple drive system where the drive 1 drive will be moved to drive 0 after the copy and the destination drive has different PDRIVE characteristics than does the current drive 0. You must have previously altered the master diskette’s PDRIVE specification for drive 1.
Each system diskette has its own set of SYSTEM and PDRIVE characteristics. Therefore, for each working copy of NEWDOS/80 Version 2 you make, after the copy is completed, you need to set that system diskette’s SYSTEM and PDRIVE characteristics for the operating conditions it is to operate with.
The NEWDOS/80 owner is authorized to make as many copies as necessary of the NEWDOS/80 diskette or individual programs thereon for his/her own personal use. NEWDOS/80 owners and users are specifically prohibited from copying the NEWDOS/80 diskette or individual programs thereon for use by others. See COPY, formats 2 and 4, in section 2.14.
Before your NEWDOS/80 is ready to run user programs, review the outstanding zaps to both NEWDOS/80 modules and to other modules (such as EDIT/CMD and SCRIPSIT) that require patches to work properly with NEWDOS/80. Chapter 11 explains how to apply zaps (patches), and with your NEWDOS/80 should have come a chapter 13 which contains the zaps. If part or all of chapter 13 is not in the proper place in the manual, please put it there. Mandatory zaps must be applied; optional zaps are at user discretion.
Mandatory zaps to NEWDOS/80 modules should be applied to all copies of the
NEWDOS/80 Version 2 master diskette and to the NEWDOS/80 Version 2 master diskette. DO NOT start applying the zaps until you have at least 2 or 3 good backup copies made of the NEWDOS/80 diskette.
Once all backup copies of the NEWDOS/80 Version 2 system are made, zaps applied, system options and drive characteristics specified, you are now ready to use NEWDOS/80.
Put away the master diskette and mount in drive 0 one of the system diskette just made. Then press reset to re-initialize DOS using the new diskette. NEWDOS/80 READY will then appear. The user may now type in a DOS command, which is either a DOS library command as discussed in chapter 2 or the name or name/ext of a user program to be loaded and run. If a user program does not have a name extension, name extension CMD is assumed. Examples:
BASIC causes the load and execution of program BASIC/CMD.
SCRIPSIT/LC causes the load and execution of program SCRIPSIT/LC.
If the DOS library command or the user program requires or allows for parameters within the DOS command, one or more spaces or a comma must follow the command name and precede the parameter(s). Examples’:
DIR 1 A
For virtually all programs to be executed under NEWDOS/80, there are instructions on how to use the program that usually comes with the program when you buy it. For NEWDOS/80 program modules, the instructions are in chapter 6 except for BASIC which is covered in chapters 7 and 8.
Those users upgrading from NEWDOS/80 Version 1, NEWDOS/21 or TRSDOS to NEWDOS/80 Version 2 should read sections 12.1 through 12.5 carefully.
Over forty persons throughout the United States and Canada were involved in the testing of NEWDOS/80 Version 2, finding errors, suggesting enhancements and providing criticism. Apparat and the NEWDOS/80 author thank each one of these beta testers for the long hours spent working with the three beta releases that were sent out. It is Apparat’s policy that each beta tester receive a complimentary copy of the final release of NEWDOS/80 Version 2.
2. DOS LIBRARY COMMANDS.
All DOS commands terminate with an ENTER. In subsequent specifications, the ENTER is not shown, but the user is to supply it.
DOS commands are limited to a total of 80 characters, including the concluding ENTER.
 A set of brackets are used to enclose an optional parameter. When using the optional parameter in a DOS command, the  are not included.
could be coded as
Upper case A – Z and non alphanumeric characters are to be included exactly as shown. See the above example.
Lower case letters or words with or without trailing decimal digits. These represent prototype values for which the user is to substitute the appropriate actual values. See the above example.
In some cases where the prototype will be replaced by one and only one character, the prototype word contains, in lower case, all the characters legal for that value. This helps serve as a reminder of which characters are legal replacement for that prototype value. For example, if ASC=Y and ASC=N are the only two legal ASC values, then the prototype will usually be written as ASC=yn.
Where commas are used in DOS commands, they may be replaced by one or more consecutive spaces.
Numeric values without a suffixed H are considered decimal values unless otherwise specified. Hexadecimal values must be suffixed with an H unless otherwise specified. Example:
4000E and 16384 are the same value.
When specifying a disk file, the term ‘filespec’ is used. A filespec is of the form:
Parameters must be specified in the above order.
name1 is the file’s name consisting of 1 – 8 chars of which the first must be A – Z and the others A – Z or 0 – 9.
ext1 is the name extension (i.e., CMD, BAS, OBJ, CIM, TXT, DOC, COM, etc.) which classifies a file. A file need not have a name extension, but if it does it must be 1 – 3 chars of which the first must be A – Z and the others A – Z or 0 – 9. If a file has a name extension, all filespecs referencing the file must include the name extension, unless a default name extension is provided for (i.e., /CMD).
password1 is 1 – 8 chars of which the first must be A – Z and the others A – Z or 0 – 9. password1 is the value given to both the access and update passwords for a file when it is created. password1 is value used in password checking when an existing file is opened. password1 is required in a filespec if passwords are enabled and the file has passwords assigned; otherwise it is not.
dn1 is the drive # of the drive which has the diskette containing the file. Examples:
NEWDOS/80 will accept lowercase in all DOS library commands and any further input that might be queried for.
For each DOS library command, the command keyword is stated along with a brief definition. Next, if the command is allowed parameters, a prototype of the command is given listing all required and optional parameters. Next comes explanations of the command, parameters and options. Lastly, some examples of the DOS command are given�
For documentation ease, the prototype command is sometimes shown spread over multiple lines in this document; however, the user should consider each command as one contiguous statement.
Unless otherwise stated, a DOS library command is executable under MINI-DOS (see section 4.2).
NEWDOS/80 differs from TRSDOS in NOT using parenthesis to enclose parameters. In NEWDOS/80 version 1, parenthesis around the operands were optional for BREAK, CLOCK, DEBUG, DIR, PROT, and VERIFY; they are NOT allowed in version 2.
In the same vein, version 1 allowed the keywords ON or OFF to be used instead of Y or N in the DOS commands BREAK, CLOCK, DEBUG and VERIFY; this is NOT allowed in version 2.
Append one file onto the end of another.
This command will append the file filespec1 onto the end of the file filespec2. The EOF from file filespec2’s directory FPDE determines the point at which file filespec1 is appended. This may be trouble if file filespec2 had explicit EOF characters, such as in BASIC program files or assembler source files.
APPEND – ATTRIB
File filespec1 is not altered. The original content of file filespec2 are not altered the file is only added to.
APPEND is not executable under MINI-DOS.
The contents of file XXX on drive 1 are appended onto the end of file YYY/DAT which is on drive 0-
2. APPEND AAA TO BBB
The contents of file AAA are appended onto the end of file BBB. DOS searches the currently mounted diskettes to find both files.
ATTRIB,filespec1[,INV][,VIS][,PROT=xxx][,ACC=password1][,UPD=password2][ ,ASE=e] [ ,ASC=c] [ ,UDF=u]
This command assigns attributes to the filespec1 file. At least one of the optional parameters must be specified.
If passwords are enabled in your system, then filespec1 must specify the existing update password, if any, for that file.
INV gives the file the invisible attribute. Unless the I option is specified in DIR, the file will not be listed by DIR.
VIS takes away the invisible attribute, whether the file had it or not.
PROT=xxx specifies the access level to be used during file I/O if passwords are enabled (see system option AA) and the access, not the update, password was used to open the file. The levels are defined for values of xxx as:
LOCK Level 7. No access allowed to the file at all, except by the system’s overlay loader.
EXEC Level 6. Access allowed only to execute the file as a program. BASIC will require either RUN or LOAD with R option, and will disable the BREAK key, thereby preventing the user from stopping the RUN and disallowing direct statement execution.
READ Level 5. Access allowed for execute or to read the file’s contents .
WRITE Level 4. Access allowed for execute, read or write of the file.
RENAME or NAME Level 2. Access allowed for execute, read, write or to rename the file.
KILL Level 1. Access allowed for execute, read, write, rename or to kill the file.
FULL Level 0. All operations are allowed on the file.
ACC=password1 password1 is assigned as the access password for the file. If null, a value of all blanks is assumed; otherwise the value must be 1 – 8 characters with the 1st = A – Z and the others A – Z or 0 – 9. Assigning the access password via this parameter of ATTRIB is the only way that will enable use of the PROT=xxx protection and then only if the access password is different from the update password. If a password is specified when the file is created, it is assumed both the update and the access password, and the update password has priority at open time. If passwords are enabled, the password specified in the filespec at open time is not the update password, and it is the access password, the current protection level is stored into the FCB for later use by the DOS read, write, load, etc. routines. Subsequently, if an access is attempted in violation of the access level, ‘ILLEGAL ACCESS TRIED TO A PROTECTED FILE’ error will occur.
DTD=password2 Password2 is assigned as the update password for the file. The update password is of the same configuration as the access password. During file open where passwords are enabled, the password specified in the filespec is checked first against the file’s update password. If they match, then FULL access is allowed to the file.
ASE=e where e is either Y or N. This parameter has been added to allow DOS to automatically allocate diskette space to a file if ASE=Y or to disallow further allocation if ASE=N. ASE=Y is the default condition when a file is created.
ASC=c where c is either Y or N. This parameter has been added to allow DOS to automatically deallocate file diskette space beyond the EOF during a CLOSE operation if ASC=Y is specified, and to disallow this deallocation if ASC=K. ASC=Y is the default setting when a file is created.
UDF=u where u is either Y or N. This parameter has been added to mark the file as updated if UDF=Y is specified or to clear the updated mark if UDF=N is specified. The DOS system marks a file as updated whenever it is about to update a sector to that file and it finds the file’s directory entry not marked as updated.
ATTRIB command examples:
Assigns to file XXX/CMD located on drive 1 the update password ZXCVB, the access password NMLKJ and protection level 6 which allows the program to be executed but not read or written to. Since the filespec XXX/CMD:! did not specify a password, we must assume that either password checking was disabled (SYSTEM option AA=N) or the file did not have an update password prior to the ATTRIB command.
2. ATTRIB YYY/DAT.QZBV INV ASE=N ASC=N UDF=N
This command tests if file YYY/DAT has update password QZBV, and if so, assigns the file the invisible attribute, flags that extra space allocation and excess space deallocation are not to be allowed, and lastly clears the file’s updated flag.
Define the DOS command to be executed at reset.
This command allows the user to specify a 1 – 31 character DOS command to be invoked automatically at reset time. This command is stored in the last 32 bytes of GAT sector of the current system diskette.
If doscmd is not specified, then a null command is stored in the GAT sector to indicate to reset/power-on that no AUTO command exists.
If SYSTEM option AB = N and BC = Y, by pressing ENTER during reset, the auto command in the GAT sector will be ignored, and the system will go to DOS READY.
AUTO is useful to the user who usually executes the same command or chain of commands (see CHAIN, sections 2.9 and 4.3, and DO, section 2.19) at reset time. By setting system option AB=Y or BC=N, the user is forced to this command or chain of commands, thus allowing the person(s) controlling a computer to restrict the activity of users of the computer.
AUTO command examples:
1. AUTO BASIC RUN”XXX/BAS”
causes subsequent reset/powerons to activate BASIC and to start the execution of the BASIC program XXX/BAS.
2. AUTO DO RSACTION
causes subsequent reset/power-ons to activate chaining from file RSACTION/JCL, thus executing the DOS and other program commands contained therein.
causes subsequent reset/power-ons to go to the normal DOS READY, awaiting the next DOS command to be inputted from the keyboard.
Activate non-disk BASIC (Model I only).
This command puts the system into non-disk BASIC. NEWDOS/80 is no longer in the system.
Enable/disable cursor blinking.
BLINK or BLINK,Y Blinking of the display cursor is turned on.
BLINK,N Blinking of the display cursor is turned off.
SYSTEM option BH can be used to set the cursor blinking state at reset/ power-on.
Reset the computer.
On the Model I, this command deselects the drives and then executes Z-80 instruction HALT, which causes both a hardware and a software reset. For the Model III, since HALT does not cause a hardware reset, this instruction causes a jump to location 0 to execute a software reset.
Enable/disable the BREAK key.
BREAK or BREAK,Y The BREAK key is enabled as a normal input key (hexadecimal code 01) until the next normal DOS READY, when it is set according to system option AG. BREAK,N The BREAK key is disabled as a normal input key until the next normal DOS READY, when it is set according to system option AG.
The BREAK command is useful for those programs that want the BREAK key enabled, and enable it via a DOS-CALL (vector 4419H). The same applies to programs that definitely want BREAK disabled. NOTE: Executing BREAK from DOS READY is useless since the immediate return to DOS READY resets the BREAK key according to system option AG.
In NEWDOS/80 the BREAK key may also be enabled by storing a 0C9H byte in Model I location 4312H (Model III location 4478H) and may be disabled by storing a 0C3H byte in that location. In NEWDOS/80 version 1, the break key was also manipulated by changing bit 4 of location 4369H (Model I only); in version 2 for the Model I, setting or clearing this bit does nothing and is harmless. However, programs on the Model III must NOT alter that bit, as that location is now in the system buffer.
Shift to keyboard input from disk.
DOS command DO performs exactly the same as CHAIN.
The purpose of the CHAIN command is to cause a predefined set of characters to be treated as input from the keyboard. This predefined set of characters has been previously stored in the file filespec1.
The CHAIN command places NEWDOS/80 in chaining mode, if not already there. The file filespec1 is opened. If sectionid is not specified, the file is positioned at the beginning. If sectionid is specified, the file is searched for the matching sectionid record, leaving the file positioned at the byte following the section ID record.
Subsequently, input that is supposed to come from the keyboard comes from the CHAIN – CHRON
chain file until chaining is terminated by the encounter of either end of file or end of section or until chaining is temporarily halted by the execution of the DOS command CHNON,N.
Keyboard data is input from the chaining file in one of two modes.
If SYSTEM option AT = N, chaining operates in record mode. In this mode, whenever NEWDOS/80, BASIC or any program requests a new record from the keyboard via the standard ROM keyboard record input routine at 05D9H, the record will come from the chain file. Any other requests for keyboard input are honored from the keyboard and not the chain file.
If SYSTEM option AT = Y, chaining operates in byte mode. In this mode, all requests for keyboard input characters via the standard keyboard input routine are honored from the chain file.
The CHAIN command may be issued via DOS-CALL or via BASIC’S CMD function. When so, DOS does not immediately return to the calling program but instead continues to execute commands from the chain file until either end of file, end of section, command CHNON,N or command CHNON,Y is encountered.
CHAIN is not legal under MINI-DOS.
The chain file creator/maintainer is responsible for assuring that chaining does not create impossible situations for the system or user programs.
NEWDOS/80 cannot have more than one chain file active at a time. If the new DOS command from the current chain file is itself a CHAIN or DO command, processing in the current file ceases and the new chain file is opened, becoming the new current chain file.
When the system opens a chain file, name extension in the filespec defaults to JCL if the filespec doesn’t give one.
CHAINING is discussed further in section 4.3.
CHAIN or DO command examples:
Chaining starts at the beginning of file XXX/JCL:0.
2. DO YYY/CHN:1
Chaining starts at the first byte of the chain section named QQQ within file YYY/CHN.
Alter chaining state.
The CHNON command is used during chaining. An error will occur if a chain file is not currently open. A CHNON command should not be the last entry in an un-sectioned chain file or the last entry in a chain file section as the command will be meaningless.
The current position within the chain file is remembered and chaining is temporarily suspended so that subsequent keyboard characters to come from the keyboard. If chaining was being done under DOS-CALL, the current DOS-CALL level is exited.
causes subsequent keyboard characters to come from the chain file, starting at the current position within the chain file. If CHNON,Y was executed as a DOS-CALL, the current DOS-CALL level is exited.
causes subsequent keyboard characters to come from the chain file, starting at the current position within the chain file. If CHNON,D was executed as a DOS-CALL, DOS remains at that level and executes subsequent commands from the chain file until either CHNON,Y or CHNON,N or end of section or end of file is encountered.
See sections 2.9 and 4.3 for further discussion of chaining.
Clear user memory routes, timer and logical enqueues.
The CLEAR command performs the following functions:
1. Performs ROUTE,CLEAR DOS command function.
2. Dequeues all user routines in the timer interrupt routine chain that were enqueued by the 4410H (Model I) or 447BH (Model III) call to DOS. This includes turning the clock display off.
3. Dequeues all *name routines that were enqueued by a 4461H call to DOS. This includes the NEWDOS/80 spooler, if active, but not its graceful termination. The spooler, if in use, should be fully terminated before executing CLEAR.
4. Resets HIMEM to addr3 or, if addr3 not specified, to the highest memory address.
5. Zeroes memory from addrl or 5200H, which ever is greater, through addr3 or HIMEM, whichever is lower. addrl must be greater than or equal to 5200H and less than or equal to addr3.
CLEAR command examples:
All routes are cleared, and all timer and *name routines dequeued. HIMEM is set to 0DFFFH. The main memory between 6000H and 0DFFFH is zeroed.
All routes are cleared, and all timer and *name routines dequeued. HIMEM is set to the highest main memory location, and all memory from 5200K to HIMEM
Display the time every second.
CLOCK or CLOCK,Y The current value of the clock is displayed every second in positions 53-60 of the display’s top line in HH:MM:SS format.
CLOCK,N The displaying of the clock ceases.
Users are warned that the clock will continuously lose time. There is no hardware clock in the sense of seconds, minutes and hours. Computation of clock time is done from the 25ms interrupt chain in the Model I (in the Model III, it is done in the ROM from the timer interrupt). Whenever the interrupts are left off for more than 25ms (33 or 40 ms on the Model III), one or more interrupts are lost and for each one lost, the clock loses 25ms (33 or 40 ms on the Model III). Lost interrupts are very frequent when disk I/O is being done, is massive when tape I/O is done, and can also be frequent if other routines hung off the 25ms chain are more than a few milliseconds long.
Clear the display.
CLS simply clears the display, resetting it to 64 character mode. On the Model III, reserved top display lines are not cleared.
The COPY command is used to copy a single file, multiple files or a full diskette. COPY has 6 formats:
- COPY,filespec1[ ,TO] ,filespec2[ ,SPDN=dn3][,DPDN=dn4]
- COPY, [:]dn1 ,$filespec1 [,TO] ,filespec2[ ,SPDN=dn3][ ,DPDN=dn4]
- COPY, [:]dn1 [=tc1 ][ ,TO], [: 3dn2[=tc2] ,mm/dd/yy [ ,Y] [ ,N][ ,NDMW][,FMT][,NFMT][,SPDN=dn3 ][,DPDN=dn4][,SPW=password1] [,NDPW=password] [,DDND] [,ODN=name1] [,KDN3] [,KDD] [,NDN=name23 [,SN=name3] [,USD] [,BDU3] [,UBB]
- COPY, [:]dn1 [,TO],[:]dn2[=tc2] ,mm/dd/yy,CBF[ ,Y] [ ,N][ ,USR] [,/ext][,UPD][,ILF=filespec3][,XLF=filespec4][,CFW03 [ ,HDMW] [,FMT] [,NFMT] [,SPDN=dn3] [,DPDN=dn4] [,SPW=password1] [,0DPW=password2] [,NDPW=password3] [,DDND] [,ODN=name1 ] [ ,KDN] [ ,KBD] [ ,NDN=name2] [ ,SN=name3 ] [ ,USD] [ ,UBB3 [,DDSL=ln1][,DDGA=gcl]
The COPY command has been significantly changed in NEWDOS/80 version 2; all users, new and old, should carefully read this section.
COPY cannot be executed under MINI-DOS; however for simple single file copies, DOS library command MDCOPY is available.
dn1 and dn2 are drive numbers and may be equal. The colon preceding dn1 and / or dn2 is optional.
filespec1 is the source file’s filespec. Filespec2 is the destination file’s filespec.
filespec1 prefixed with $ means that either the source or the destination file or both are to be on drive 0 and are on diskette(s) that either (1) do not contain a NEWDOS/80 system identical to the one on drive 0 when COPY was initiated, (2) do not contain a NEWDOS/80 system, or (3) contain no system at all.
During processing for formats 2, 3, 4, 5 and 6, the system may ask for various diskette mounts; do what the prompts ask!!
- When prompted for the system diskette, mount the NEWDOS/80 diskette that was on drive 0 at the start of the COPY command execution.
- When prompted for the source diskette, mount the diskette containing file filespec1 (formats 1, 2, 3 and 4) or the data to be copied (formats 5 and 6).
- When prompted for the destination diskette, mount the diskette to contain file filespec2 (formats 1, 2, 3 and 4) or to receive the data being copied (formats 5 and 6).
SPDN=dn3 Source PDrive Number. SPDN=dn3 tells the system that for all source drive I/O, the system diskette’s PDRIVE specifications (see DOS command PDRIVE, section 2.37) for drive dn3 are to be used instead of the source drive’s normal PDRIVE specifications. dn3 is a value 0 to 9, referring to a drive number listed by the PDRIVE command.
DPDN=dn4 Destination PDrive Number. DPDN=dn4 tells the system that for all destination drive I/Os, the system diskette’s PDRIVE specifications for drive dn4 are to be used instead of the destination drive’s normal PDRIVE specifications. dn4 is a value 0 to 9 referring to a drive number listed by the PDRIVE command.
Note that use of SPDN and DPDN for a drive 0 single drive COPY (formats 4, 5 or 6) means that three different PDRIVE specifications (one for the system diskette, one for the source diskette and one for the destination diskette) will apply during the COPY even though only one drive is used.
Format 1 is the single file copy. It is used to copy the contents of file filespec1 to file filespec2. The diskette(s) involved in the COPY must already be mounted; the system gives no mount prompts. The contents of file filespec1 are not altered. The previous contents of file filespec2, if any, are lost. If the leading part of filespec2 equals that of filespec1, filespec2 may be shortened by leaving off the leading part, the remainder of filespec2 starting with / or . or :. For example:
can be shortened to:
Remember, the keyword TO is optional, and spaces may be used instead of commas. Thus the command could be written:
COPY USERFILE/DAT:0 :1
Format 2 is the same as format 1 except that the $ sign prefixed onto filespec1 indicates that a conflict exists with drive 0, the system drive, and DOS will prompt for the proper diskettes to be mounted on drive 0. If the source and destination drive numbers are both zero but the source and destination files are on separate diskettes, use format 4 instead of format 2.
Format 3 again is similar to format 1, except that the user has only 1 drive available for the copy and file filespec1 resides on a diskette different from that of file filespec2. Neither filespec can specify a drive number. DOS will prompt for the mount of the source and destination diskettes as they are needed. If drive 0 is specified, both the source and destination diskettes must contain a NEWDOS/80 system identical to the one mounted on drive 0 at the start of the COPY command; otherwise use format 4.
Format 4 performs similar to format 3 except that either file or both reside on diskettes with different NEWDOS/80 systems, non-NEWDOS/80 systems or no systems at all- DOS will prompt for the mount of the system, source and destination diskettes as they are needed. Format 4 should only be used when dn1 equals 0; otherwise you are wasting time with diskette swaps that are not needed.
Formats 2 and 4 allows suppliers of programs, whether free or purchased, to send their program products on diskettes that do not contain NEWDOS systems. Aside from the supplier’s programs and/or data files, the diskette need only contain the directory and the BOOT/SYS file, both created on each diskette during formatting. Suppliers must not include a NEWDOS system on their diskettes unless they have made explicit arrangements with Apparat.
NEWDOS/80 does not have a diskette BACKUP program. Instead, either formats 5 or 6 is used. Format 5 is a full diskette sector by sector copy without concern for the number and type of files. Format 6 copies some or all of the source diskette’s files onto the destination diskette. Of the two, for the same amount of data transmitted, format 5 is faster while format 6 allows greater variation between source and destination diskette types and tries to reassign files to contiguous space.
Format 5 is a full diskette copy. The default specifications for the two drives are the PDRIVE specifications currently being used by DOS. The drives must have the same number of sectors per track, granules per lump and sectors per granule (five is the current NEWDOS/80 standard); otherwise format 6 must be used. The destination diskette may have more tracks than the source; if so, the destination directory is adjusted to account for the extra free granules (not done if BDU option specified). Format 5 options are defined as follows:
=tc1 DOS is to use the value tcl as the source diskette’s track count during the COPY rather than the source drive’s default value.
=tc2 DOS is to use the value tc2 as the destination diskette’s track count during the COPY rather than the destination drive’s default value.
mm/dd/yy is the date to be placed in the destination diskette date field. The mm/dd/yy may be null, and if so the system date is used. The only time mm/dd/yy may be entirely left out of the format 5 COPY command is when the command has only the two drive number parameters (example: COPY 0 1 ). Otherwise mm/dd/yy must be the 3rd parameter even if it is null or to be overridden by either the KDD or the USD parameter. If the mm/dd/yy is null, this must be so indicated by separating commas (not spaces) (example: COPY 0 1,,FMT CBF ).
Y The user doesn’t care what was previously on the destination diskette. Y is mutually exclusive with N, ODN, ODPW, DDND, KDN or KDD. Y is the default (for COPY) if none of its mutual exclusions are specified.
N At the start of the COPY or FORMAT the destination diskette must not contain recognizable data, i.e., should be in a bulk erase state. COPY will be terminated if the diskette is found to contain data. N is mutually exclusive with Y, ODN, ODPW, DDND, KDN or KDD.
NDMW No Diskette Mount Waits. DOS is to assume that all needed diskettes are already mounted on the specified drives. No mount prompts or error prompts are displayed. If an error occurs that otherwise would have caused a prompt, the copy will be terminated. If NDMW is specified and neither FMT nor NFMT are specified, FMT is assumed. NDMW is intended for use when COPY (or FORMAT) is invoked via DOS-CALL (i.e., from BASIC) and the calling program does not want operator interaction. Since NDMW causes the COPY or FORMAT to bypass error and disk mount queries, it is recommended that NDMW normally not be used when the operator is keying in the COPY (or FORMAT) command.
FMT Format. DOS formats the destination diskette before copying data. FMT is mutually exclusive with NFMT. If neither FMT or NFMT is specified and NDMW was not specified, the operator will be queried ‘FORMAT DISKETTE? (Y OR N). If neither FMT or NFMT is specified and NDMW was specified, FMT is assumed.
NFMT No Format. DOS does not format the destination diskette before copying data. The user must assure that the destination diskette is already formatted correctly. NFMT is mutually exclusive with FMT.
SPW=password1 Source Password. If passwords are enabled (system option AA = Y) and system option AR = N, then COPY requires a source diskette master password match. If password1 does not match the source diskette’s password, the copy function will be terminated.
NDPW=password3 New Destination Password. Password3 must conform to rules for passwords and is assigned as the destination diskette’s new password. NDPW is mutually exclusive with BDU.
DDND Display Destination old Name and Date. The destination diskette’s old name and date are prompted to the display, allowing the operator to decide whether or not to proceed with the copy. DDND is mutually exclusive with Y, N, and NDMW.
ODN=name1 Old Destination Name. If the destination diskette’s old name is not equal to name1 , then the system prompts, allowing the operator to decide whether to proceed with the copy. ODN is mutually exclusive with Y, N and NDMW.
KDN Keep Destination diskette Name. The destination diskette keeps its old name rather than receive the source diskette’s name. KDN is mutually exclusive with Y, N, BDU and NDN.
KDD Keep Destination diskette Date. The destination diskette keeps its old date rather than receive the mm/dd/yy parameter from the COPY command. KDD is mutually exclusive with Y, N, BDU and USD.
NDN=name2 New Destination Name. The destination diskette takes name2 as its name, rather than receive the source diskette’s name. Name2 must conform to the specification for diskette names. NDN is mutually exclusive with BDU and KDN.
USD Use Source Date. The destination diskette uses as its date the source diskette’s date, rather than receive the mm/dd/yy parameter from the COPY command. USD is mutually exclusive with KDD and BDU.
SN=name3 Source diskette Name. If the source diskette’s name is not equal to name3, a prompt is issued, allowing the operator to decide whether or not to proceed with the copy.
BDU Bypass destination Directory Update. Aside for simply copying the source sectors onto the destination diskette, the format 5 COPY also updates the boot and PDRIVE data in the destination file BOOT/SYS and, as necessary, the name, date, password and extra granule information into file DIR/SYS. There are times, however, when this file updating is not wanted, and by specifying option BDU these updates are bypassed. BDU is useful when the source diskette has a bad directory, has a non-standard directory (such as a TRSDOS Model III directory) or has no directory at all or when the user wants a full diskette copy with no alterations. BDU is mutually exclusive with KDN, NDN, NDPW and USD.
UBB Use Big Buffer In NEWDOS/21 and NEWDOS/80 version 1, COPY was restricted to using main memory below 7000H unless it was a two diskette, single drive COPY, in which case all of memory to HIMEM was used. If a user wanted to force the usage of all memory to HIMEM, the UBB parameter had to be specified. However, in NEWDOS/80 version 2, all of main memory to HIMEM is used unless the COPY was invoked under DOS-CALL (i.e., from BASIC), in which case only main memory below 7000H is used. Thus, in NEWDOS/80 version 2, UBB is a useless parameter left in existence only for upward compatibility from Version 1.
Format 6 is the multiple file COPY and is distinguished from format 5 by the inclusion of the CBF (Copy By File) option. Though format 5 is the faster way to backup a diskette, format 6 offers more flexibility, allowing files to be copied between diskettes and drives of widely varying characteristics. The choice of files to be copied can be limited by the combined effect of options USR, /ext, UPD, ILF, XLF and CFWO; if one or more criteria are specified, only those files satisfying all the criteria are copied. Format 5’s options, except BDU, are used in format 6 as well as the following additional options.
If NFMT is specified, then none of Y, N, KDN, KDD, NDN, BDU, USD, NDPW, DDSL, DDGA or tc2 may be specified, ODPW may be required, and system files are not copied unless already existent in the destination file directory.
If NFMT is not specified, then the destination file is formatted as if the command was FORMAT, including establishing BOOT/SYS and DIR/SYS. Then, before any files are copied, all files to be copied are entered into the destination diskette’s directory. This is necessary as system files must occupy the same directory FPDEs in order for DOS to work at all.
CBF Copy By File CBF, required for and used only in format 6, indicates the copy will be done by files rather than in straight sequential order of diskette sectors.
USR copy user files. Only user files are copied; system and invisible files are excluded.
/ext copy files having name extension ext. Only files with name extension ext are copied. ext is a 0 to 3 character name extension. Examples of this parameter are /CMD, /, /BAS, /X.
UPD copy updated files Only files that have the updated flag on in the source diskette directory are copied. This flag is turned on by the standard DOS sector write routine to indicate that at least one sector has been written or re-written to this file since the last time the updated flag was cleared. This flag is turned off by specific request via the PROT or ATTRIB commands and is NOT turned off by COPY. Since the standard DOS sector write routine is used to write the file’s sectors to the destination diskette, the updated flag is turned on for the copied destination files.
ILF=filespec3 Include List File Filespec3 specifies a file containing a list of files to be copied. If a file is not in the list, it is not copied. It is not an error if an included file is not on the source diskette. Within the list, each file to copied is specified by its name/ext followed by a EOL char ( 0DH). If a specification begins with a semicolon, it is bypassed as a comment. Each specification, except comment, is limited to a maximum of 13 characters, including the EOL. On reading, the file’s bytes are modulated into the ASCII range 0 to 127. The file can be made using SCRIPSIT, but the user must assure that no characters other than null ( 00H) follow the last EOL character; SCRIPSIT tends to leave extraneous characters so a delete-to-end-of-text should be done. ILF is mutually exclusive with XLF.
XLF=filespec4 Exclusion List File. The file filespec4 is the same structure as specified for ILF above and specifies the files to be excluded from the COPY. It is not an error if an excluded file is not on the source diskette. XLF is mutually exclusive with ILF.
CFWO Check File With Operator. For the qualifying files, DOS asks the operator, one file at a time, if the file is to be copied to the destination diskette. Reply Y if the file is to be copied, reply N if not to be copied, reply R if to restart entire CFWO query sequence, or reply Q if no more files to be copied. No files are copied until the querying is completed.
ODPW=password2 Old Destination diskette Password. If NFMT is specified, if passwords are enabled and if system option AR = N, then copy requires a destination diskette password match. If password2 does not match the destination diskette’s password, the copy is terminated.
DDSL=ln1 Destination diskette Directory Starting Lump. Formatting will start the directory on the 1st sector of lump lnl if DDSL is specified; otherwise the default starting lump number for the drive (see PDRIVE command) will be used. DDSL is mutually exclusive with NFMT.
DDGA=gc1 Destination diskette Directory Granule Allocation. Formatting will allocate gcl (value 2-6) granules to the directory if DDGA is specified; otherwise it will assign the default # of granules for that drive (see PDRIVE command). DDGA is mutually exclusive with NFMT.
If during a format 6 COPY, the destination diskette has insufficient space to
contain a file, “DISKETTE FULL = name/ext” is displayed and the destination
file’s EOF is set to 0. Though EOF is set to 0, any space the file may have allocated to it is not deallocated.
A single drive format 5 or 6 COPY cannot be executed under DOS-CALL (i.e., from BASIC) since COPY under DOS-CALL restricts itself to main memory below 7000H and this would necessitate too many diskette swaps.
During a COPY or FORMAT where NDMW was not specified, pressing right arrow at any time will cause the function to pause, awaiting ENTER to continue or up-arrow to cancel. Pressing up-arrow at any time will terminate the function; however, be careful as the state of the destination diskette will be unknown, especially if the cancel comes during the actual formatting.
‘The COPY command and standard 40 track, double density, single sided, 5 inch TRSDOS Model III diskettes may be used to transfer TRSDOS Model III diskette files into or out of the NEWDOS/80 system. There are a number of restrictions to this operation.
NEWDOS/80 cannot be used to format a TRSDOS Model III diskette; however, once the user has a formatted empty TRSDOS Model III diskette, he/she may duplicate it repeatedly under NEWDOS/80 using format 5 COPY with the NFMT and BDU options, thus obtaining a stock of formatted, empty TRSDOS Model III diskettes.
The user must assure that where the source and/or destination is a TRSDOS Model III diskette the proper PDRIVE specs are invoked, either implicitly or directly by the SPDN and/or DPDN parameter (see PDRIVE command example 3, section 2.37 for the exact PDRIVE specification).
A file need not previously exist on a TRSDOS Model III diskette in order for it to be copied. NEWDOS/80 will allocate the proper directory entry and diskette space.
Any of COPY formats 1, 2, 3, 4 or 6 may be used to copy files to or from TRSDOS Model III diskettes. Remember, FMT must not be specified. If format 6 is used and one of the source or destination is a TRSDOS Model III diskette, then files marked as SYSTEM files (FPDE 1st byte, bit 6=1) are NOT copied.
Files copied between NEWDOS/80 and TRSDOS Model III are always readable though not necessarily usable on the receiving system.
Examples of COPY:
- COPY XXX:1 YYY:1
In this format 1 COPY, file XXX on the diskette already mounted on drive one is copied as file YYY on that same diskette.
In this format 1 COPY, the currently mounted diskettes are searched for the file AAA. If found, it is copied as file BBB to the diskette already mounted in drive 2.
- COPY SUPERZAP/CMD:0 :3
In this format l COPY, the file named SUPERZAP/CMD is copied from diskette already mounted in drive 0 to the diskette already mounted in drive 3. Since the file name and name extension are the same for both files, they were dropped from the second file- spec.
- COPY XXX:1 2 SPDN=9
In this format 1 COPY, SPDN=9 causes, for the duration of the COPY only, all source file I/O to assume that drive 1 has the characteristics specified for drive 9 in the PDRIVE specifications. If we assume that the PDRIVE drive 9 specifications were those for a Model III TRSDOS diskette (see PDRIVE example 3, section 2.37), this COPY will copy file XXX from the TRSDOS Model III diskette already mounted on drive 1 to the NEWDOS/80 diskette already mounted on drive 2.
- COPY $XXX:1,YYY:0
In this format 2 COPY, the destination diskette to contain file YYY is not the same diskette as was mounted on drive 0 when the COPY command was initiated. DOS will ask for the mount of the destination and the system diskettes as it needs them.
- COPY,$XXX:0 YYY:1
In this format 2 COPY, the source diskette containing file XXX is not the same diskette as was mounted on drive 0 when the COPY command was initiated. DOS will ask for the mount of the source and system diskettes as it needs them.
- COPY 1 XXX YYY/DAT
In this format 3 COPY, the diskette containing file XXX is not the same diskette as the one to contain file YYY/DAT yet both the source and destination diskettes are to use drive 1. DOS will ask for the mount of the source and destination diskettes as it needs them. Note that, as required for format 3 and 4, neither filespec contains a drive number.
- COPY 0 XXX/DAT /DAT
In this format 3 COPY, file XXX/DAT on one diskette is to be copied as file XXX/DAT on another. Both diskettes are to be mounted on drive 0, and DOS will ask for them as needed. Since drive 0 is used and this is format 3 rather than format 4, both the source and destination diskettes must contain NEWDOS/80 systems identical to that mounted on drive 0 when the COPY command was initiated.
- COPY 0 $XXX/DAT /DAT
This format 4 COPY accomplishes essentially the same thing as the previous example. The difference is that DOS assumes that neither the source nor the destination diskette contains the proper NEWDOS/80 system; so DOS will ask for the mount of the system, source and destination diskettes as it needs them.
- COPY 0 $XXX XXX SPDN=9
This format 4 COPY accomplishes the same thing as in example 4 above excepting that only drive 0 is used. For the duration of this COPY, drive 0 uses two sets of PDRIVE specifications. The standard drive 0 specifications are used for the system and destination diskette I/Os, and the system diskette’s PDRIVE’s drive 9 specifications are used for the source diskette I/Os. Note, in this example, the second filespec was not foreshortened as there was nothing to foreshorten.
- COPY 0 1 06/01/80 FMT
This format 5 COPY is an example of one of the simplest and most commonly used forms of the full diskette COPY. This COPY copies one diskette to another using drive 0 as the source drive and drive 1 as the destination drive. Default track counts for the associated drives are used as diskette track counts. Both drives, other than possibly having different track counts (destination must be greater than or equal to source), have the same characteristics. The operator will be prompted for diskette mounts and error choices, if errors occur. Default parameter Y is in effect, indicating the operator does not care if the destination diskette previously contained data or not. The destination diskette will be formatted before the entire source diskette is copied to it, and it will receive the source diskette’s name and password. Its date will be set to 06/01/80. If the destination diskette is to have more tracks than the source, they will be formatted and properly accounted for in the directory such that the destination diskette will be ready for use.
- COPY 0 1,,NFMT
This format 4 COPY is an example of another form of the simplest and most common full diskette copy. The only difference between this example and the one above is (1) the destination diskette is assumed already formatted, and (2) the current system date will become the destination diskette’s date.
- COPY, 0,0,06/01/80, NFMT, USD, KDN,ODN=WATCHDOG,SN=GOODDATA
This format 5 COPY is somewhat the same as the previous example except (1) this is a single drive, two diskette copy, (2) a prompt will be given if the source diskette does not have the name specified, (3) a prompt will be given if the destination diskette does not have the name specified, (4) the destination diskette will retain its old name, (5) it will receive its date from the source diskette. Being a single drive, two diskette copy, more mount prompts will be necessary than for a two drive COPY. Also, because of the large number of diskette mounts that would be involved, this single drive COPY cannot be executed via DOS-CALL (i.e., from BASIC).
- COPY 0,1,,FMT,CBF
This format 6 COPY is an example of one of the simplest and most commonly used forms of multiple file COPY. The destination diskette (to be mounted on drive 1) is to be formatted, and it receives its name and password from the source diskette (to be mounted on drive 0) and its date from the system date. Next, all of the source diskette’s files, excepting BOOT/SYS and DIR/SYS, are copied to the destination diskette.
- COPY 0,1,,NFMT,CBF
This format 6 COPY is an example of another of the simplest and mostly commonly used forms of multiple file COPY. The differences between this and example 14 are (1) the destination diskette is not to be formatted, (2) its name, password and date are not changed, and (3) any source diskette system files (other than BOOT and DIR) that did not already exist on the destination diskette are not copied.
- COPY 0 1,,NFMT,CBF,USR
This format 6 COPY is similar to the previous example except that system and invisible files are not copied.
This format 6 COPY is similar to the previous example except that the only source files copied are those marked as updated as well as not being either a system or an invisible file. In this manner, only the files changed since the last backup are backed up now. Remember, COPY does not clear the updated flags on the source diskette; use DOS commands PROT or ATTR1B to do this.
During this format 6 COPY no diskette mount prompts or error choices art. to be displayed; the system is to assume the diskettes are already properly mounted. The destination diskette is to be formatted with 60 tracks. The directory will start on lump 29, and will be allocated 4 granules. All source diskette files, except BOOT/SYS and DIR/SYS,- will be copied to the destination diskette.
- COPY 2 3 06/01/80,CBF,CFWO,NFMT
For this format 6 COPY, the destination diskette is assumed previously properly formatted and may contain existing files. For each source diskette file, excluding BOOT/SYS and DIR/SYS, the operator will be asked if the file is to be copied to the destination diskette. When all queries are done, the selected files are copied, excepting that system files that did not previously exist on the destination diskette are not copied. If the file already existed on the destination diskette, the file’s old data on the destination diskette is lost.
Pre-allocate a disk file.
The CREATE command allows a user to create a file and optionally to write to
the file a specified number of null records, thereby allocating the file’s
space as contiguously as possible, given the layout of the free space on the diskette.
There are times when a user program expects one or more of the files it uses to already exist, even though the files may not have any usable data in them; therefore, the user must create the file prior to the program’s first use. Also, there are times when the efficiency of a program is reduced if a file’s diskette space is scattered all over the diskette; to avoid this, the user should preallocate the needed file space to reduce this scattering.
The CREATE DOS command creates new file filespec1 or alters the state of existing file filespec1.
LRL=ln1 specifies the length of each record of the file. lnl must be a value between 1 and 256; the default value is 256.
SEC=count1 specifies the number of records to be initially assigned to a file.
ASE=yn This parameter indicates whether, subsequent to the CREATE command, DOS may automatically allocate more diskette space to this file as necessary. ASE=Y allows this; ASE=N disallows this. The default is ASE=Y.
ASC=yn This parameter indicates whether the DOS close function will be allowed to automatically deallocate excess diskette space. ASC=Y allows this; ASC=N disallows it. The default is ASC=Y.
Enough diskette space is allocated to the file to provide for count1 records each of length lnl. lnl records of all zeroes are then written to the file, establishing the file EOF at the end of those records. If ASE=N is specified, the file is inhibited against further diskette space allocation, and if ASC=N the file is inhibited against automatic deallocation of excess diskette space.
CREATE command examples:
File XXX is created, if it did not already exist, on the drive 1 diskette. The record length is 30 and 2000 of these records, containing all 00H bytes, are written to the file. The EOF is left at 60000. Subsequent DOS automatic space allocation and deallocation for this file are allowed.
- CREATE,YYY:2,200,ASE=N, ASC=N
File YYY is created, if it did not already exist, on the drive 2 diskette. The record length is 256 and 200 of these records, containing all 00H bytes, are written to the file. The EOF is left at 51200. Subsequent DOS automatic space allocation and deallocation for this file are not allowed.
File ZZZ is created, if it did not already exist, on the drive 0 diskette. The record length is 256, and the EOF is set to 0. Subsequent DOS automatic space allocation and deallocation for this file are allowed.
Go to …
Page 2 (Dos Library Commands Continued: DIR to WRDIRP)
Skip to …
Page 3 (Chapters 3-4 – DOS Routines and DOS Features)
Page 4 (Chapters 5-6 – DOS Modules and SYSTEM Programs)
Page 5 (Chapter 7 – Disk BASIC)
Page 6 (Chapter 8-End)