Disk Operating Systems
The Model 4 will operate under three different operating systems. If you use a Model III TRSDOS 1.3 diskette (not included) in the machine, the Model 4 will behave as a Model III, including the 64 character Model III screen and the 2Mhz clock rate. If you use your Model 4 TRSDOS 6.0 diskette, the Model 4 will use its 80 column video, and the other features of Model 4 TRSDOS. Coming soon will be Radio Shack's CP/M Plus for the Model 4.
Below is a chart which describes the operating system commands available under the various Model I (TRSDOS 2.3, 2.7DD and LDOS 5.1.3), Model III (TRSDOS 1.3 and LDOS 5.1.3), and Model 4 (TRSDOS 1.3 and 6.0) operating systems. LDOS 5.1.3 is used with Model I and III. Data files on LDOS 5.1.3 can be read directly by TRSDOS 6.0, and TRSDOS 6.0 data files are readable by LDOS 5.1.3 (if your Model I is not equipped with Radio Shack double density, you may need to use single density on the Model 4.)
TRSDOS 2.3 .'; TRSDOS 2.7DD TRSDOS 1.3 LDOS 5.1.3 TRSDOS 6.0 Command Explanation
APPEND X X X X X Copies the contents of the source file onto the end of the destination file. TRSDOS 6 0 includes two optional parameters, ECHO, which echoes the characters to the screen while appending, and STRIP, which removes the last byte from the destination file before appending. This STRIP feature is useful for appending files which contain end ■] of file markers like SCRIPSIT
ATTRIB X X X X X Assigns protection attributes to a particular file or group of files on a particular drive AUTO X XXX X Stores an AUTO command line on the disk.
This command line automatically executes whenever you start up or reset TRSDOS Duplicates (backs up) all or some of the files from the source disk to the destination disk TRSDOS 6.0 and LDOS 5.1.3 use a parameter list to tell the system which file or group of files to duplicate. XXX X Disk BASIC. X Jump to Model I Level II BASIC
X Load and RUN Enhanced Disk BASIC.
BASIC
BASIC2
BASICR
CLS CLICK / FLT
CMDFILE
COMM
CONFIG CONV
DIR DISKDUMP / BAS X DO
DUAL
DUMP
ERASE
ERROR
FILFIX
FILTER
CONVERT X
|
CREATE |
X |
X |
X |
X | |
|
DATE |
X |
X |
X |
X |
X |
|
DEBUG |
X |
X |
X |
X |
X |
|
DEVICE |
X |
X |
FORMS /FLT Turn Model I blinking cursor on or off Resets (boots) the system by returning the system to its original start-up condition. The use of optional keys can prevent execution of AUTO or SYSGEN configurations, as well as invoking the system debugger. Lets you enter data (such as commands) and save these to disk. BUILD is used primarily to create files for DO, PATCH and, in TRSDOS 6 0, KSM and FLT Optional parameters in TRSDOS 6.0 permit BUILD files to be extended, or to contain data in HEX format. Clear user memory See MEMORY for LDOS 5 1.3 and TRSDOS 6.0. This command turns the clock screen display on or off. Clear the screen. A keyboard filter to give the keys a "click" sound when they are pressed. A general purpose disk-to-disk, tape-to-disk, disk-to-tape utility for moving machine language files from one media to another. Lets two computers communicate via a defined device. COMM is a full featured communications program similar to LCOMM Jrj LDOS 5.1.3 and TERMINAL on the\ Model 12. Change disk's number of tracks. Allows you to move (convert) data files from a Model III TRSDOS 1.3 diskette to a TRSDOS 6 0 formatted diskette, and to view 1.3 directories from L.O. Convert Model I disk files to Model III diskettes. Copies information from one disk or device to another disk or device. TRSDOS 6.0 gives you the ability to change the logical record length of the information during the COPY process Copies Model I TRSDOS 2.3B files to LDOS 5.1.3 diskettes. Creates a file on disk and pre-allocates disk space for its contents. Resets the date or displays the current system date. Turns the debug utility on or off. Displays the status of the drives, selected options, and data paths for logical devices which have been set, routed, or linked. Model I TRSDOS 2.3—simply lists all currently defined I/O devices. Displays the specified disk's directory. Examine a disk file Compiles and executes a DO file. A DO file, in LDOS 5 1.3 and TRSDOS 6.0, is a user created Job Control Language (JCL) file that contains one or more library commands or file specifications. Duplicates output to both video and a printer. *Use link in LDOS 5,1.3 and TRSDOS 6.0. Copies an area of memory to a named disk file. Erase a file from disk by zeroing the disk data area Display a full error message Load and modify the content of a file. Filters or modifies data as it is read from or written to a device. Prepares a blank or old disk for use by defining the tracks and sectors, and by writing system information onto the disk. Sets up printer filter parameters, (PR/FLT in LDOS 5 1 3 and FORMS in TRSDOS 13.) GETDISK /BAS X GETTAPE I BAS X HELP : X X HERZ50 X HITAPE X JCL X X FREE X X X X X Lists the amount of free space and the number of files on each drive. If a drive number is specified, FREE displays a space map of the disk in that drive. Copies a disk file to tape. Copies a tape data file to disk. Provides a brief explanation of a command's syntax. Set up the Model III for 50hz AC power. The HITAPE utility is for Model III operations only It permits the use of high speed cassette operations with LBASIC and CMDFILE. Job Control Language is one of the most powerful features of TRSDOS 6.0 and LDOS 5.1.3. It allows the user to construct a sequence of commands and statements to control the actions of the operating system or applications programs, JOBLOG creates a log of all commands entered or received, along with a time stamp for each. JOBLOG is established using the JL/DVR driver KI/DVR enables keyboard features like type ahead and JKL screen print. See REMOVE KSM/FLT allows use of files containing phrases associated with the unshifted alphabetic keys to be used as direct keyboard inputs. The disk version of BASIC under LDOS 5 13 See COMM Displays a listing of all available system commands, TRSDOS 6,0 has three separate libraries of commands. Irinks together two logical devices. Both devices must be enabled in the system. Lists the contents of a file. Optional parameters determine exactly what information will be displayed Loads a machine language program file into memory without executing that file. Logs in the directory track and number of sides on a diskette. In TRSDOS 6.0 LOG is used for hard disk installations, X X Line printer control program, X X Set the master read/write drive, SYSTEM performs this function in LDOS 5.1.3 and TRSDOS 6,0. X Allows you to set aside some portion of your available RAM memory to function as a disk drive. MEMDISK can be used with the extra 64K RAM in a 128K Model 4, or memory can be set aside in the normal 64K area, f X X Allows you to reserve a portion of memory, display the current HIGHS and LOW$, modify a memory address, or jump to a specified memory location. Memory test routine for ROM and RAM, The MiniDOS filter program provides a means to access certain LDOS functions without having to be at the LDOS Ready prompt. MODx/DCT X X The MOD1 and MOD3/DCT programs are used to change the logical drive numbers of 5" floppy drives. FLOPPY/DCT in TRSDOS 6.0, PATCH X X X X Lets you make minor cor rections in any disk file either by typing the information in, or by using an existing ASCII file. PAUSE X X Pause execution for operator action. Used primarily in DO files. TRSDOS 6.0 and LDOS 5.1.3 provide this facility through JCL. JL/DVR KI/DVR X LBASIC X LCOMM X LINK X X LOG X X MASTER MEMDISK /DCT MEMORY MEMTEST X X MINIDOS X /FLT PR/FLT PRINT PROT PURGE RDUBL RELO REMOVE RESET ROUTE RS232x / DVR RUN SET SETCOM SETKI SPOOL SYSGEN SYSTEM RENAME X X X X X REPAIR X X XXX X TAPE X X TAPE100 TAPEDISK X TEST1 X TEST2/ X BAS TIME TRACE UNKILL USER VERIFY XFERSYS PR/FLT is provided to for mat the data sent to the line printer. List a text file to the printer. Use or change a diskette's master password. Allows you to quickly delete files from a disk. A Disk driver program for use with Model I and the Radio Shack double density board. Change where a program loads in memory. Deletes a specified file or files from the disk directory, and frees the disk space for other uses. REMOVE can also be used to remove user created devices from the system. Called KILL in previous versions of TRSDOS. Changes the name of a file or device. Updates and modifies information on Model I TRSDOS diskettes to make them readable under TRSDOS 6.0, Use CONV for Model III TRSDOS diskettes. Returns a device to its original start-up condition. Closes open files if given a file specification. Routes one device to another device, disk file, or to nothing (NIL.) This driver will configure the Model I RS-232 interface (RS232R) or the Model III RS-232 interface (RS232T). COMM/DVR in TRSDOS 6,0. Loads and executes a machine language file. The keyword RUN is optional. Sets a driver or filter program to a device. Adjusts the parameter values of the RS-232 port. Sets keyboard repeat rate and delay parameters. Establishes a first-in, first-out (FIFO) buffer for a specified device (usually a line printer.) With TRSDOS 6,0 SPOOL can utilize one of the two extra 32K memory banks. Creates a configuration file to store information about how your system is setup. Configures certain areas of your TRSDOS system to meet your particular needs. You can set or change the disk drive configurations, and turn on or off various keyboard, video and hardware drivers. Used for tape to disk transfer of machine language programs. Lets TRSDOS 6.0 read a Model 100 cassette tape file and write it to Model 4's disk, as an ASCII file or to read a disk file and write it as a Model 100 tape file. Copy a machine language tape to disk. Test ROM and RAM memory. Stress test for entire Model I system. Lets you reset or display the current time. Displays the user's program counter address on the display, SYSTEM (TRACE) in TRSDOS 6.0. Upper/lower case drive for Model Is with the Radio Shack lower case kit. Recover a KILLed (but not ERASEd) disk file. Define a user library command. Turns the verify function on or off. When ver ify is on, TRSDOS reads the data it writes to disk to verify that the data is readable. Software write-protect a diskette. Use SYSTEM under TRSDOS 6.0 and LDOS 5.1.3. Transfer system files in an operating system upgrade. Mai I list Tom Kilbride 4117 Lyle Waco, TX 76710 The most useful program you've ever published (to me, anyway) was the machine language sort in the July 1980 issue. Having suffered through sorts of 80-100 items that take 7-8 minutes in BASIC, the program was a marvel. I am submitting a mailing list program that uses the sort. It is written for a 48K Model I or III with disks. I have put name, address, city, state, and ZIP code into a 71-character long string. To allow for both alphabetical and ZIP code sorts, there is a subroutine that moves the ZIP code from the right hand side to the left, the sort is performed, and the ZIP is restored to the right hand side of the string. An alpha sort of 123 names was done in less than a second. The same items sorted by ZIP took about 23 seconds with the manipulation in BASIC. Still infinitely faster than a full sort in BASIC. After loading and running the program, the title appears on the screen while the sorting program is poked into memory. Then a filename is requested. Pressing (enter) defaults to a request for the number of items to be sorted. If the number is unknown, but around 100-120, 150 could be entered. After inputting the last record, entering "END" when asked for another "Last Name?" will move you to the sorting process. The program asks whether you want to use the "Printer?" and whether you want a "ZIP Code Sort?" Then the sort begins. At the end, you are asked whether you want to repeat the process, save the list to disk, make a correction, add a record, delete a record, or quit the program. During the sort, the computer locks up at times. This is normal as it does a little house cleaning in the reserved string space in memory. I estimate that you could put as many as 450 files in the program although I have not tried anything larger than 125. It probably would work best with lists of 250 or less. After editing the program and putting in all the neat lower case lettering, I found that the sorting program and the lowercase driver have a memory conflict and the program locks up on a Model I. Since lowercase isn't essential to printing mailing labels, I'm not concerned so I'll leave it to someone else to relocate one or the other. I have used the sorting program to alphabetize lists of names and titles of cassettes, books, etc. but I thought your readers could use this program for short mailing lists. I offer it for publication, no strings attached. I make no claim of copyright and freely, and in the spirit of an enthusiastic TRS-80 owner hope that numerous others will be able to find application for this program or a variation of it. For the benefit of those who were not around, let me suggest that anyone who does not have the July '80 issue rush to their nearest Radio Shack store and get the reprint of all issues (26-2115) prior to 1981. At $4.50, it's a bargain. My TRS-80 came into this world as a 4K Level I @ $599 (before the price came down). I now have two drives, 48K, lower case mod., and a modem. I've also purchased a Model III that I use at the office and have a pocket computer. Later this year, I'm going to get a Color TRS-80 "for my kids." Enjoy every issue so keep the good stuff coming. 10 POKE 16562, 254 : POKE 16561, 253 20 CLS 30 CLS PRINT CHR$(23) PRINT @400, "MAILING LIST" CLEAR 30000 DEFUSR0=&HFF00 DEFINTA-Z L$="XXXX/DAT" GOSUB 370 GOTO 540 INPUT"Number on list? type <END> when done. IF N>450 PRINT "MAX 450" FOR TI=0 TO 450 NEXT TI GOTO 30 40 FOR 1=0 TO N-l : GOSUB 1190 : NEXT I 50 PRINT "Printer?" : GOSUB 1310 60 IF I$="Y" THEN P=1 ELSE P=0 70 PRINT "ZIP Code Sort?" : GOSUB 1310 80 CLS : IF I$="Y" THEN GOSUB 1250 : FL=99 ELSE FL=0 90 X(0)=N 100 X(1)=VARPTR(A$(0)) 110 Z=USR0(VARPTR(X(0))) 120 IF FL=99 THEN GOSUB 1260 130 FOR 1=0 TO N-l 140 PRINT USING"(###)"; 1+1 : GOSUB 1200 150 NEXT I 160 PRINT "<R>epeat <S>ave <C>orrect <A>dd <D>elete <Q>uit" : GOSUB 1310 170 IF I$="Q" PRINT "Type program" : END 1.80 IF I$="S" THEN 450 190 IF I$="C" THEN 930 200 IF I$="A" THEN 640 210 IF I$="D" THEN 1.270 220 IF I$="R"CLS : GOTO 50 230 GOTO 160 35, 94, 35, 86, 237, 83 250 DATA 213, 255, 33, 0, 0, 34, 203, 59, 175 58, 48, 2, 203, 251 200, 42, 19 GOTO 160' to return to 211, 255 260 DATA 203, 122, 179 27 0 DATA 255, 205, 255 280 DATA 203, 290 DATA 0, 0 33, 0, 0 300 DATA 75, 213, 0, 126, 71, 237, 82, 34, 207, 255, 42, 205, 255, 34 255, 42, 203, 255 255, 235, 33 , 25, 25, 229, , 25, 25, 237 255, 9, 235, 26, 184, 48 213. 78, 35, 70, 197, 225 320 DATA 235, 78, 35, 70, 197, 10, 32, 39, 19, 35, 16 330 DATA 246, 203, 65, 32, 31, 235, 126, 113, 235, 119 225, 9, 229 , 40, 25, 197, 19 225, 193, 26, 150, 56, 209, 225, 6, 3, 78, 255, 175, 237, 82, 34 350 DATA 203, 255, 48, 144, 255, 17, 1, 0, 175, 25 360 DATA 34, 205, 255, 237, 91, 218, 58, 255, 195, 24, 255 .37 0 N=0 380 FOR 1 = 1 TO 20.3 390 READ A 400 N=N+A 410 POKE 1-257, A 420 NEXT IF N025337 THEN PRINT 211, 25 5, 2.35, 42, 20.3, 2, 209, 2.25, 42, 205, 207, 255, 237, 82, : END 440 RETURN 450 PRINT "Use GOSUB 1310 IF I$="Y" THEN 470 ELSE INPUT "FILENAME" IF LEN(L$)>8 GOTO 450 460 L$=L$+"/DAT" 470 OPEN "0", 1, L$ 480 PRINT #1 , N 490 FOR 1=0 TO N-l 500 PRINT #1, A$(I) 510 NEXT I 520 CLOSE 530 GOTO 160 540 CLS INPUT "Filename"; L$ IF LEN(L$)>8 THEN L$="XXXX/DAT" GOTO 540 550 IF L$="XXXX/DAT" THEN 30 ELSE L$=L$+"/DAT" 600 NEXT I 610 CLOSE 620 PRINT "Add Data?" : GOSUB 1310 630 IF I$="N" THEN 50 640 CLS : PRINT "This is Item -"; N+l 650 GOSUB 660 GOSUB 710 GOSUB 750 GOSUB 790 GOSUB 830 GOSUB 860 GOTO 900 660 INPUT "Last Name >"; 1$ : N$=I$ : 1$="" : GOTO 660 680 IF N$="END" OR N$="end" THEN 50 690 N$=N$+STRING$(15-LEN(N$), 32) 700 RETURN 710 INPUT "First. Name >"; 1$ : F$=I$ : 1$="" : GOTO 710 730 F$=F$+STRING$(10-LEN(F$), 32) 740 RETURN 750 INPUT "Street Address >"; 1$ : A$=I$ : 1$="" : GOTO 750 770 A$=A$+STRING$(20-LEN(A$), 32) 780 RETURN 790 INPUT "City >"; 1$ : C$=I$ : 1$="" 800 IF LEN(C$)>15 PRINT "15 MAX" : GOTO 790 »30 INPUT "State >"; 1$ : S$=I$ : 1$="" : GOTO 830 850 RETURN 860 INPUT "ZIP >"; 1$ : Z$=I$ : 1$="" : GOTO 860 880 Z$=Z$+STRING$(9-LEN(Z$), 32) 890 RETURN : INPUT "No. to Correct"; NN 940 IF NN<1 OR NN>N THEN 9.30 950 CLS IF LEN(A$(NN-1))<71 THEN FOR X=1 TO 71-LEN(A$(NN-1)) : A$(NN-1)=A$(NN-1)+" " : NEXT X ELSE A$(NN-1)=LEFT$(A$(NN~1), 71) 960 X$=A$(NN-1) : PRINT "1 - Last Name >"; LEFT$(X$, 15) 970 PRINT "2 - First Name >"; MID$(X$, 16, 10) : PRINT "3 - Address >"; MID$(X$, 26, 20) 980 PRINT "4 - City >"; MID$(X$, 46, 15) PRINT "5 - State >"; MID$(X$, 61, 2) PRINT "6 - ZIP Code >"; RIGHT$(X$, 9) PRINT "7 - No Change" 990 PRINT : PRINT "Change What Item?" 1000 GOSUB 1310 B=VAL(I $) 1$="" IF B=0 THEN 1000 1010 ON B GOTO 1020 ,1040 ,1060 ,1080 ,1100 , 1130: 1160 ,1160 ,1160 ,1160 1020 GOSUB 660 1030 X$ = N$+RIGHT!?(X$, 56) : GOTO 1150 1040 GOSUB 710 : GOTO 1150 1060 GOSUB 750 : GOTO 1150 1080 GOSUB 790 : GOTO 1150 1100 GOSUB 830 1120 GOTO 1150 1130 GOSUB 860 : GOTO 950 1160 A$(NN-1)=X$ : X$="" : GOTO 160 1170 CLS 1180 GOTO 160 1190 CLS PRINT "Item #"; 1+1 GOSUB 660 GOSUB 710 GOSUB 750 GOSUB 790 GOSUB 830 GOSUB 860 1210 1220 1230 1,240 THEM NEXT X ELSE 1250 1260 1270 1280 1290 1300 1310 1320 1330 : A$(I)=N$+F$+A$+C$+S$+Z$ : RETURN N$=LEFT$(A$(I), F$=MID$(A$(I) A$=M1D$(A$(I) C$=MID$(A$(I) S$=MID$(A$(I) Z$=RIGHT$(A$(I), 9) IF RIGHT$(Z$, 4)<>" 5)+"-"+RIGHT$(Z$, 4) PRINT N$+" "+F$ : PRINT A$ : PRINT C$+" "+S$+" "+Z$ IF P<>] THEN RETURN FOR X=1 TO 10 : IF MID$(F$, X, F$=LEFT$(F$, X) LPRINT F$+N$ LPRINT A$ LPRINT C$+" LPRINT LPRINT LPRINT RETURN FOR 1=0 TO N-l : A$(I)=RIGHT$(A$(I), 9)+LEFT$(A$(I), LEN(A$(I))-9) : NEXT I : RETURN FOR 1=0 TO N-l : A$(I)=RIGHT$(A$(I), LEN(A$(I))-9)+ LEFT$(A$(I), 9) : NEXT I. : RETURN CLS : INPUT "Delete No."; NN : IF NN<1 OR NN>N-1 THEN 1270 PRINT LEFT$(A$(NN-1), 25) : PRINT RIGHT$(A$(NN-1), 46) : PRINT "Delete This?" GOSUB 1310 : IF I$="Y" THEN 1300 ELSE IF I$="N" THEN 160 ELSE 1.290 FOR I=NN-1 TO N-l A$(I)=A$(1+1) NEXT I N=N-1 GOTO 160 I. $=INKEY$ RETURN James Evans 38 Belaire Drive Stamford, CT 06905 I have written a program for the Model III that you might be interested in, fast double precision multiply. By use of the alternate registers and some explicit straight line coding, I was able to reduce the execution time from some 21 ms, (+ 6 ms BASIC overhead time when used in a FOR loop) to 6 ms (+ the same BASIC overhead, unfortunately) the method of diversion and testing at RST20 allows this program to be used by existing BASIC programs without change (except memory must be protected above 64,000—where this program resides). Here is the BASIC program and the first page of the assembly listing which shows the dimension principle involved. I have in the past year written an entire library of routines like this. |
Post a comment