To

by Roy T. Beck

Sure, the title is cryptic; if George Orwell could use "1984" as a title, surely I can use a longer version of the same. Is there a message to go with it? In Orwell's case, it was a philosophical message. Mine is more technical and mechanistic. Please bear with me.

My message is about the TRSDOS dating structure, which has caused us a lot of worry in the past and will cause more for some of us in the future. As most of us know, the original TRSDOS V 2.3 for the Model I allowed for a range of dates from 1980 to 1987. Who set this limited range, and why?

THE CULPRIT

The who is easy; Randy Cook did it. Surely you all remember Randy? He is the original genius who took Radio Shack's proposed Z-80 computer and Microsoft's BASIC and wrapped an operating system around the whole works, which became TRSDOS for the Model I. Sure, we revile him for some of his bad decisions, but don't forget all the good ones he made. Example: He created the HIT table concept in the directory structure and made it work, beautifully! What, you don't know what I'm talking about? Shame on you. If it weren't for Randy's HIT table, we would still be logging on to a particular drive, ala MS-DOS and CP/M, to locate a program. On any version of TRSDOS, you can call a program located anywhere on up to 8 logical drives in a flash. I regard that as a minor miracle. Try to call a program on another drive under MS-DOS, and all you get is "Program not found". Not found, indeed! The stupid DOS doesn't know how to LOOK for the program, that's what's wrong. IT DIDN'T EVEN TRY TO LOOK FOR IT! But TRSDOS will look for it and will find it.

Sure, Randy made a few bad decisions in his day, and later came to a parting of the ways with Radio Shack.

That's another whole story, but VTOS was the product of that schism. Seems to me VTOS had the version numbers 3.0 and 4.0 attached to it, which is of course the reason LDOS has the number 5.X as its family name. And of course LS-DOS for the Model 4 bears the family name of 6.X. These latter two DOSes were developed in the heyday of Logical Systems, Inc, and of course Roy Soltoff had much to do with both of them, to our great advantage. Where would we be today without his tenacity and genius?

PERMITTED DATE RANGES

To get back to the subject of this story. The limited date range of 1980 to 1987 was one of Randy's less good decisions: Why did he select such a limited range? Obviously one of his concerns was to limit the amount of directory space devoted to the date of the file. By restricting the date range to eight years, he was able to hold the year record to only 3 bits. But why only 8 years? The only explanation I ever heard was an apocryphal story that the whole Radio Shack computer venture wasn't expected to survive that long, and therefore 8 years was ample. We disproved that one, didn't we?

Many of us remember Jan 1,1988. Suddenly our dutiful slaves wouldn't accept the current date. Had the world come to an end? No, just the range of years allowed for in the DOS. But Roy Soltoff to the rescue. During the previous summer, he and the people at LSI had been planning for this day (date). LSI had worked out a scheme to update TRSDOS 6.2.1 to 6.3.0 and include some needed fixes and improvements along the way, one of which was to extend the date structure to 1999. This postponed the day of reckoning for another 12 years, and at the same time made some desirable improvements in the DOS. (It also was the time of the infamous rumor about a secret, hidden copy protection scheme in 6.3.0, but that's another story for another day). At the same time, MISOSYS issued an updated version of LDOS 5.3 to parallel the development of TRSDOS.

By the way, LS-DOS=TRSDOS. LS-DOS is the DOS, as developed by LSI and carried on by Soltoff (MISOSYS). TRSDOS is the version of LS-DOS licensed to Tandy Radio Shack. So far as I know, they are absolutely identical, the distinction being purely legalistic. For my (our) purposes, they are identical.

For some time, a year or two if memory serves me, all was well in the date structure of TRSDOS. And then Roy Soltoff acquired control/ownership of TRSDOS 6.3.Xfrom LSI, and announced a new upgrade of TRSDOS, 6.3.1. This included some minor improvements, and also ex tended the date limit yet again, this time through the year 2011! So now TRSDOS has a date range of 32 years, from 1980 to 2011. Since 32 years can be stored in 5 bits, it was accomplished by assigning two extra bits to the date structure in addition to the original 3. But maintaining upward compatibility has always been a prime concern of Soltoff, and something else had to be given up in order to have the new date range and maintain a maximum of compatibility with that which has gone before.

To obtain the needed extra bits to extend the year range, something else had to be sacrificed. What was that? TRSDOS used to carry two passwords, which were the OWNER password and the USER password. Again, a feature defined by Randy Cook. LSI and Soltoff decided there really was not much use being made of two levels of passwords, and one could be foregone to extend the dating. At the same time, time stamping could be introduced. Accordingly, the two bytes in the directory, numbers 18 and 19 which formerly held the USER password were redefined to provide space for the new date and time features.

THE DIRECTORY STRUCTURE

Every directory entry for an LDOS or LSDOS file has the same format, 32 bytes in a directory structure which contains almost all the information required to locate and load a file into the RAM. I qualified this because the concept of "Extents" allows linking of multiple directory entries for highly fragmented files. I will not discuss this as it is not related to the dating situation.

AN EXAMPLE

I will show the directory entry of a file under both TRSDOS 6.2 and TRSDOS 6.3.1, and then will explain what changed. The 32 bytes will be presented on two lines of paired bytes, with a two line header giving the (decimal) byte numbers for ease of locating the bytes being discussed.

Below is the directory entry for a file namecJ FOLK6 under both DOSes.

The bytes which store the dates under 6.2.X are numbers 01 and 02. Under 6.3.1 the bytes involved include 01, 02, 18 and 19.

So what happened to bytes 18 and 19? This pair of bytes formerly contained the "USER password". Bytes 16 and 17 continue to hold the "OWNER password". The deletion of the USER password made 16 bits available for reassignment. To make good use of this, LSI and Soltoff elected to add "time stamping" to the DOS' capability. Thus, if you are revising and saving multiple versions of a file, the time stamp now allows you to identify them chronologically in the directory.

Byte 01

Bits 3-0 hold the month in binary form. The 7 of 47 therefore represents July.

Byte 02

Bits 7-3 hold the day of the month, 1-31, in binary notation. C8 = 1100 1000; bits 7-3 = 25, the date.

Bits 2-0 formerly held the year offset, with 3 bits representing an 8 year range. For technical reasons, these bits could not be reassigned. They are now simply ignored by the date system. Don't try to use them for any purpose, they will still occasionally be written to by the operating system.

Byte 18 is now used as follows:

Bits 7-3 contain the hour. 5 bits allow for 32 values, so hours 0 through 23 are represented in binary. 53 = 0101 0011 = 10 AM.

Bits 2-0 contain the most significant bits of the minute, in this case 011.

Byte 19 is now used as follows:

Bits 7-5 of byte 19 contains the least significant bits of the minute. The combined 6 bits from byte 18 and 19 allows for values of 0 to 59 minutes. In this case bits 7-5 contain 011, and the combined 6 bits 011011 represents 27 minutes.

Example 1:

Byte 0001 0203 0405 0607 0809 1011 1213 1415

1617 1819 2021 2223 2425 2627 2829 3031

TRSDOS 6.2.X

1047 C8E9 0046 4F4C 4B36 2020 2020 2020 .G##.FOLK6

9642 9642 0800 2441 FFFF FFFF FFFF FFFF #B.K..$A########

TRSDOS 6.3.1

1047 CBE9 0046 4F4C 4B36 2020 2020 2020 .G##.FOLK6

9642 536B 0800 2441 FFFF FFFF FFFF FFFF #B.K..$A########

Finally, bits 4-0 of byte 19 contains the year offset from 1980.5 bits represents 32 years from 1980 to 2011. In this case, 01011 = 11.1980 + 11 = 1991.

Combining all the pieces of information reveals the file FOLK6 was last modified at 10:27 AM on July 27,1991.

MISCELLANEOUS PIECES OF INFORMATION

The DOS keeps its version number in the GAT sector at byte CB. This was 60 for version 6.0, and is now 63 for version 6.3. DOS 6.3 needs to know which dating system, old or new, is in use on a disk. Byte CD of the GAT table serves this purpose. Bit 3 is a flag; if set, the new dating is in use. Since the older versions 6.0 to 6.2 did not anticipate the change in dating, the bit is meaningless to them; Version 6.3.X looks for and understands the bit.

CONSEQUENCES OF THESE CHANGES

If the user is careful not to mix DOSes, everything works fine. The only real fly in the ointment occurs when a disk with the new style dating is used with a 6.2 or earlier DOS. Since bytes 18 and 19 were formerly the User Password, the earlier DOS will interpret whatever is there as a User Password and deny access to the file. By zapping these two bytes back to 9642, all will be well under 6.2, but returning the disk to 6.3.1 will then produce peculiar hour and year information.

Moral: don't use disks with new dates under old DOSes. Roy has provided a utility function to convert a new style disk back to the earlier date structure. Be sure to use this if you MUST use the earlier DOS. The best procedure is to retire 6.2 to pasture and DATECONV all your data disks to the new date system under 6.3

LDOS 5.X

Many times, Roy Soltoff has said in the pages of The Misosys Quarterly that he would never do an upgrade of LDOS 5.1.4 for the Model I because there was simply not enough market to justify his spending his limited time upon it. (MISOSYS is pretty much a one-man operation, and Roy is the man). I understood his position, and never took issue with it. But now, what do you know, Roy has suddenly announced an upgrade of both LDOS 5.3 for the Model III AND LDOS 5.1.4 for the Model I! Both will be upgraded to the 5.3.1 level to bring the three different DOS' to the same level designation, namely 5.3.1 for Models I and III and 6.3.1 for the Model 4. This update extends the dating structure to 2011 for both the Model I and Model III, and Roy also says he has made all the commands and functions as nearly identical as the hardware differences between the three models permits. I promptly ordered both 5.3.1's so I can keep au courant as to what Roy is doing. I urge every one with either or both of the Models I and III to upgrade to this latest level. Roy is remaining the 'good guy', so let's support him.

Find the computer equipment that TANDY no longer sells.

PACIFIC COMPUTER EXCHANGE

buys and sells used TANDY

TRSDOS XENIX MSDOS COMPUTERS & PERIPHERALS

We sell everything from Model 3's and 4's to Tandy 6000's, 1000's to 5000's, Laptops, and all the printers and hard disks to go with them. If we don't have it in stock, we will do our best to find it for you. We have the largest data base of used Radio Shack equipment to draw from. All equipment comes with warranty.

The One Source For Used Tandy Computers

1031 S.E. Mill, Suits B Portland, Oregon 97214

(503) 236-2949

SPECIAL s90 DISKETTE

End your PDRIVE-problems with our Automatic Pdrive Recognizer AGCAP/CMD version 5.3.. AG CAP automatically detects the Pdrive-settings on any TRS-80 NEWDOS v2.0 diskette. Particularly useful for figuring out other people's diskettes, both on 40 and 80 track disk drives. Works on yodel 1, Model 3 and Model 4 (p) (in Model 3 mode) without modification. Manual on disk. Bonus program on this diskette: The TRS-80 version of the PC game Sokoban. Send your name and address and a twice signed American Express Travelers Check worth $10.00 to: THE CRAFT-80 GROUP POSTBUS 73 4854 ZH BAVEL THE NETHERLANDS Please allow 5-6 weeks for delivery. Programs supported by original authors.

ANOTHER DATA BASE SYSTEM

for Model 4 - Multidos by Jim E. King, MSEE, CIO

other Model 4 Dos's, so It will probably be best to eliminate this check.

DZZ loads the entire sequential file into memory. It displays one record on a line, twenty records on a Model 4 screen, about fifteen on a Model III.

You can sort on any column. There is binary search on column 2 (very quick), and sequential INSTR search on all columns.

Editing permits you to rewrite any record, field by field. If a field is OK, press enter (<E>), else rewrite it.

Deleting a record is done by changing the field to a CHR$(133), sorting, and then decrementing the length of the data by 1.1 first did it by moving all records up by 1, and the garbage was immense. The binary search displays all copies of your search $tring, not just the one it lands on.

I have a need to know the approximate date that I input or update a record, thus I use the last field to store the month and the year. I use the following format: the last digit of the year, followed by a letter indicating the month: Jan, Feb, Mar, Apr, maY, Jun, juL, Aug, Sep, Oct, Nov, Dec. Press the '.' & <E>: 1L = July 91.

Operation

The program first asks how many Cols, (fields per record) are wanted (line 991); the default is 4. Lines 990-999 is the setup area. Main Menu (line 99): The program checks whether there is data in the array. If the array is empty the menu says:

Model 4 DBZ; # Cols < I > nput < L > oad ?

You then do either. After there is data in the array the Menu says:

Model # DBZ: dispLAyB Edit Format sOrt SeaRch = blanK saVe Print

The available one-key commands are the capital letters; some are obvious.

B starts the display at the beginning. L enables you to start display at the line of your choosing.

If you should want to continuously scroll through the rest of the data, press A.

Set the tabs for the fields with Format. S is the binary search. R is the sequential search.

= displays records that are the same in the sorted field. K goes through the data and changes"" to"".

When I first began writing my Data Base program, I needed to create and maintain telephone and address lists. I still have this need, so DZZ/BAS is my latest rewrite of that data base started long ago. As an aside, an earlier version was published on Vol. 7 (12/86) of the Valley Hackers TRS-80 Users Group disk library.

For a couple of years now, I have been using MultiDOS 2.1 for Model 4, so naturally DZZ is written to use some of the special features of that DOS. However, with some modifications the program should run under any of the others, even 6.3 and Model I.

DZZ uses the machine language two-dimensional sort, CMD"Q", by Vernon Hester in line 16, but I believe that the other DOS's have something similar, though with a slightly different syntax.

I use no [email protected]'s, but do PEEK & POKE 16425, which is the printer line counter during LPRINT, to get the spacing that I want. Before printing it checks if INP(248) = 61 to find out If my 8510 is ready (line 800); your printer may return a different INP number. This will not work on the

The display scrolls 10 lines then shows the Edit Menu (line 350):

Pressing the up arrow resets the line counter to about 40 lower so that scrolling starts earlier.

The program starts at line 0, which says GOTO990.

I put general comments & reminders to me in lines 1 and 2.

990-999 is the setup area: DEF, etc., then GOTO 135 (Load Data).

All lines from 3 to 90 are subroutines.

Line 91 is one of the error recoveries.

The Menus are followed by lnkey$, GOSUB 8, and followed by IF tests for the selections, lines 99-199, and 350 - 390.

200-240 is new input that calls:

250-290 the input subroutine, also used for edit.

300-320 is display.

350-395 is the Edit Menu & IF tests.

440-465 is the display formatting Sub called in 310.

500-535 is the binary search, etc.

570-575 is the sequential search.

600-630 is the formatting input.

700-705 is Save

730-735 is Load

800-822 is LPrint

840-865 is the LPrint format, same as 440-465 + the capability of an offset to the right

Along with DZZ, I am including some data files which may be of interest to the TRS-80 community, such as:

List of Computer Companies

Micro80,1 st. 2 years.

Local ZIP codes and where they are.

Indices for MultiDOS, LSDOS, etc. that have page #, Command/ & a short description.

Indices for TRSTIMES, partial TRSNews & OCTUG

I believe that Micro80, ErrMod4, ErrMuIti, HackrLib, LSDOS631, MultDOS2, MultDS17, Prefx213, Prefx818, TRSTimes, and Visi4 are complete.

One of my pet peeves is editors trying to be cute with titles to articles. Sometimes they ARE cute, but then most of the time the title gives no idea what the article is about, making filing by title almost impossible. So I file by some keyword.

Feel free to edit, correct spelling, syntax, grammar - but try not be cute with the title.

DZZ/BAS

0 CLEAR21000:DEFINTC,H-V:DEFSTRD,W-Z:W = "J": GOSUB6:Y = "Model 4 MultiDOS 2.1 Version; Printout

Wraps":GOSUB3:PRINT:POKE16410,40:GOT0990'-DZZ

1 'MaxCLEAR = 24500;

Check LPrint start at 0; Change to LINK?; ReDo seaRch;

2 7DA2 SNAFU;

Fix: upper Rt corner heading 804-810; ? load routine at 720;

Split ZH into ZH & ZP; Merge a datafile; Load a narrower array,Z=width; Saves Caps(KC) instead of ZD, restore ZD;

K=0:RETURN

6 PRINTTIME$;:

Y = "DZZ Z$(l,"+W + ") Data Base":

GOSUB3rPRINT:

RETURN

7 IF LEN(Z) THEN FOR L = 1 TO LEN(Z): M =ASC(MID$(Z,L,1)):

NEXT:

RETURN:

ELSE RETURN

IFZ = CHR$(31 )THENENDELSEGOSUB7:

RETURN

RETURN

11 GOSUB3: RETURN

12 PRINT"CAPITALIZE"ZC"("KC +1")?";: GOSUB8:

13 PRINTZF"/DA"W" "FNZR(N)"/"FNZ3(MM)" = " FIX(N*100/MM + .5)CHR$(8)"%";:

RETURN

16 PRINTCHR$(29)CHR$(30)"Sorting on"C +1;: CMD"Q",N,Z(0,0),C:

PRINT'-SORTED": RETURN

17 FORI =0TON:

IFINSTR(Z(I,LW),Z)THENGOSUB440:

NEXT:RETURN

ELSENEXT:RETURN

18 KE = 0:FORJ = 0TOLW:KE = KE + (LEN(Z(0,J)) >0): NEXT:RETURN

19 IFLEN(X) > 16THENXF = MID$(X,17,LEN(X)-16): RETURNELSERETURN

20 PRINT" Heading: ("ZH")?";:LINEINPUTZ: IFLEN(Z)THENZH = Z

21 PRINTZF;ZH", Is a Space needed before the Heading? (Y/N)":GOSUB8:

22 RETURN

FZ(I,J) =" 'THENK = K + 1 :Z(I,J) =""

27 NEXTJ.I:

PRINTTAB(55)CHR$(27)K"Blanks Removed": G0T099

30 PRINTZF"!"ZH" N = "N"Sort Col."C: RETURN

32 CLS:GOSUB30:I =0:PRINT" I 2(1,0) Z(l,1)--etc."

33 PRINTI;: FORJ = OTOLW: PRINTCHR$(133)Z(I,J);: NEXT J:

PRINT:

IFZ< > "A"ANDIANDI/10 = FIX(I/10)THENGOSUB350: IFZ< >""THEN105

50 GOSUB8:

IFVAL(Z) =0ORVAL(Z) > LW +1THENRETURN

ELSEC = VAL(Z)-1 :PRINTSTRING$(6,24)ZC;C +1;: RETURNELSERETURN

51 STOP:PRINTSTRING$(11,24)CHR$(30)C +1 "For? ";: LINEINPUTZ:

RETURN

IFKANDK/5 = FIX(K/5)THENGOSUB350

56 NEXT: G0T099

70 PRINT" Data Filename ("ZF") Without /DA"W;£M;: LINEINPUTZ:GOSUB7:

IFLEN(Z) >8THENGOSUB9:GOTO70 ELSEIFLEN(Z) > 1THENZF = Z:RETURNELSERETURN

75 IFKYPRINTTesting File SNAFU (Col.1 =0)":P = 0: FORI = OTON:

IFVAL(Z(l,0)) =0 THEN P = 1: GOSUB440 ELSEELSERETURN

76 NEXT:

IFPTHENPRINT'There Are 0s in Col.1, CONTINUE? Y/< N >":K = 6:GOSUB4:GOSUB8:IFZ = "N'THEN99

77 RETURN

80 PRINT'Test for Line Too Long to LPRINT on 1 Line": K=0:

IFL > (76-LW)THENK = K +1: GOSUB440:IFK/5 = FIX(K/5)THENGOSUB350 81 NEXT: RETURN

88 IFLEN(Z(l,0)) = 7THEN LPRINTLEFT$(Z(I,0),3)"-"RIGHT$(Z(I,0),4)"";: ELSELPRINTZ(i,0)"";

89 RETURN

90 PRINTTAB(59)"("FNZR(MM)","W")"MEM"Memory": RETURN

91 K = 9:GOSUB4: PRINTERR"ERROR-Line"ERL;': CMD"E":IFERR = 106THEN200

92 RESUME105

99 CLOSE:K = 0:KD = 0:GOSUB4:GOSUB18: PRINT'Model 4 DBZ";:IFKETHENGOSUB10:GOSUB90: GOSUB13:

PRINT": dispLAyB Edit Formats sOrt SeaRch = blanK saVe Print"

ELSEPRINT", "W" Cols < I > nput <L>oad?";:

GOSUB90

101 GOSUB8

105 IFZ = "?'THEN32 ELSEIFZ = "CTHENGOSUB12:

G0T099 ELSEIFZ = "H"GOSUB20

110 IFLEN(Z)THENIFASC(Z) >47ANDASC(Z) < 52

120 IFZ = "D"GOSUB380

125 IFZ = "A"ORZ = "B"KD = 1:1= 0:CLS:

PRINTCHR$(28):GOT0300

130 IFZ = "I'THEN200

GOSUB10:GOSUB4:GOSUB90:

PRINT"Load";:GOSUB70:IFZ = "M"THEN99

ELSEIFLEN(Z) = 1 THEN 105 ELSE730

140 IFZ = "L"ORZ = "Y"l = 0:INPUT"Start at line #";l:

GOT0300

145 IFZ = "E"GOSUB370 150 IFZ = "0"KD = 1 :GOSUB10:PRINT: PRINT'Sort "ZF" on"ZC"("C +1")?";: GOSUB50:GOSUB16

155 IFZ = "S'THENPRINT'Binary UPPERCASE

LINEINPUTZ:GOSUB7:GOTO500

160 IFZ = "R'THENPRINT'Sequential Lowercase

Search"ZC"("C +1 ")?";:GOSUB50:

IFZ < >" < "AND Z < > "M"

THENPRINTSTRNG$(11,24)CHR$(30)C +1 "for? ";:

LINEINPUTZ:GOTO570

165 IFZ =" = "PRINT'Test for Identical Fields in"ZC;C + 1: G0T055

170 IFZ = "K"PRINT"Removing '' in all Fields":G0T026 175 IFZ = 'T"PRINT"Search for Records with Date";: INPUTZ:GOSUB17

180 IFZ = "F"PRINT"Format: ";:GOTO 600

190 IFZ = "V"KD = 1 :ONERRORGOTO710:GOSUB10: PRINT-.GOSUB16:GOSUB75:ZT = "1 ":GOT0700

199 IFZ = "P"THEN800ELSE99

200 I = (N + 1)*(-1*(N>0)):IFKETHEN210 ELSEZF ="": PRINT'lnput <9 Letters";:GOSUB70:GOSUB9: PRINT'New File Called:"ZF;: GOSUB20:GOSUB9:PRINTZF;ZH:I = 0: PRINT'Enter: Phone #s Without'.'to End Input, ■c'rf Error":GOSUB12

210 IFI >MMTHENPRINT"ARRAY FULL!":K = 9:

G0SUB4:G0T099

220 GOSUB250:GOSUB18:

IFZ = "."ORZ = V'ORZ = "o'THENI = 1-1:

GOSUB7:GOTOl 05

250 PRINTTAB(59)".EOF < ErrCol"KC-f 1 "CAPS"

IFJ = KCTHENPRINT'CAPS";

260 PRINT">"Z(l,J)" >";:LINEINPUTZ:

IFJ = OANDZ = "."ORZ = 'V'ORZ = "o'THENGOSUB9:

RETURN ELSEIFIANDJ = OANDZ = "< "THENI = 1-1:

GOSUB9:GOT0250 ELSEIFZ =" < 'THENGOSUB9:

GOT0250 ELSEIFJ = KCANDLEN(Z)GOSUB7

270 REMIFJ = LWANDLEN(Z) =2

THENGOSUB7'capitalizeDate

IFJ = LWANDZ = "/"ORZ = ".'THENZ(I,LW) = ZA: Z = ""ELSEIFLEN(Z)THENZ(I, J) = Z 290 GOSUB9:GOSUB440:NEXTJ: GOSUB71 :J=0:RETURN 300 0 = 20:R = 0:

PRINTZD;N;ZF;ZH:I =-l*(l >0)'R = Display counter 310 GOSUB440:

IFRANDZ < > "A"ANDR/0 = FIX(R/O)GOSUB350: IFZ< >"A"ANDZ< >"["ANDZ< >"'THEN105 320 IFI < N THENI = I + 1:R = R + 1 :G0T031 OELSE PRINT'EoF ";:GOSUB350: IFZ = "["ORZ = '"THENI = 1 + 1 :G0T0310 ELSE105 350 PRINT;:GOSUB13:

PRINT" <E>dit <D>elete <[> "XF;ZM:GOSUB8 360 IFZ = "["THENCLS.I = 1-33:1 = FNI0(l):l = l*(-(l >0)): 0 = 20:PRINTZD;N;ZF;ZH:RETURN 370 IFZ = "E"ORZ = ","PRINT"Edit";:GOSUB395: GOSUB9:IFI < OORI > NTHEN350 ELSEGOSUB440:GOSUB250:I = FNIO(I):

0 = 10:R = 0:Z = "[": PRINTZD;N;ZF;ZH:RETURN

380 IFZ = "D"PRINT" DELETE from";:GOSUB395: IFI < OORI >NTHEN350 ELSEL = I:GOSUB440: PRINT'Thru";:GOSUB395:IFI < 0THEN350 ELSEM = l:FORI = LTOM:Z(l,C) = CHR$(143):NEXT: GOSUB71 :GOSUB16:N = N-M + L-1:

1 = FNI0(L):O = 20.Z = "[":PRINTZD;N;ZF;ZH:RETURN 390 0 = 10:R = 0:GOSUB9:RETURN

395 PRINT" Line #("I")";:INPUTI:RETURN

440 PRINTFNZ3(I)" 'TAB(VAL(LEFT$(XF,2)));'Col.1 tab

450 IFRIGHT$(X,1) = "F" AND LEN(Z(l,0)) = 7 THEN

PRINTLEFT$(Z(I,0)I3)"-"RIGHT$(Z(I,0),4)"";:

GOTO470'fone#

IFLW<2THEN490

475 FORH =2TOLW:IFVAL(MID$(XF,2*H +1,2)) THENPRINTTAB(VAL(MID$(XF,2*H +1,2)))Z(I,H); ELSE PRINTCHR$(133)Z(I,H); 480 NEXT

490 PRINT:RETURN

500 J = 1 :PRINTTAB(39)CHR$(27)CHR$(30)Z: ZT = Z:LO=O.HI = N

505 I = (HI + LO)/2:IFZ >Z(l,C)THENLO = 1 + 1 ELSEHI = 1-1 'binary

510 IFINSTR(Z(I,C),ZT)< >1ANDLO< =HITHEN505 'endBinary

515 IFINSTR(Z(I,C),ZT)THENI = I-1:IFI >0THEN515 ELSEI = 1 + 1ELSEI = 1 + 1

520 IFLO> HIANDINSTR(Z(I,C),ZT) < > 1 PRINTZT " would be near line"HI

525 IFINSTR(Z(I,C),ZT) < >1 PRINT'EoS ";:l = l-1:

GOSUB350:IFZ< >"['THEN105

530 GOSUB580:IFJ/20 = FIX(J/20)GOSUB350:

IFZ< >"["ANDZ< >"'THEN105

PRINT"EoS&F";:GOSUB350:

IFZ = "['THEN525 ELSE105

IFZ< >""ANDZ< >"['THEN105

575 NEXT:PRINTJ-1 "Records":GOT099

580 IFINSTR(Z(I,C),ZT)THENGOSUB440:

J = J +1 :RETURNELSERETURN

PRINTXF"; Tab values OK<Y>/N?":GOSUB8: IFZ = "Y'THEN99

610 K=0:PRINT"Enter Tab Values, or For a \ Delimeter

PRINT'Tab for Column 1 (04)";:INPUTZ:

GOSUB635:IFKGOSUB9:GOT0610

615 XF = Z.Z = "13":PRINTXF"; Tab for Column 2 (13)";:

INPUTZ:GOSUB635:IFKTHEN615

620 XF = XF + Z: FOR J = 2 TO LW:Z = "00":

PRINTXF"; Tab for Column "J + 1"(00)";:INPUT Z:

GOSUB635:IFKTHEN620

622' put Offset command, ZO, here

630 GOSUB14:l = 0:GOT0300

650 RETURN

666 FORI =OTON:PRINTI;:

IF MID$(Z(I,0),3,1) = "0"THEN MID$(Z(I,0),3,1) ="" 670 NEXT:G0T099

700 PRINTZD" Saving"N;ZF"/DA"W":"ZT",";:GOSUB14:

0PEN"0",1 ,ZF + "/DA" + W +":" + ZT:

PRINT#1 ,N;C;X","ZH:FORI = OTON:FORJ = OTOLW:

PRINT#1,Z(I,J):NEXTJ,I:PRINT"-SAVED

705 CLOSE:

IFVAL(ZT) < 3THENZT = RIGHT$(STR$(VAL(ZT) +1),1): GOT0700 ELSE99

710 K = 9:GOSUB4:PRINTERR"ERR-Line"ERL;: CMD"E":RESUME705

730 OPEN'T',1 ,ZF + "/DA"+W:INPUT#1 ,N,C,X:

LINEINPUT#1,ZH:PRINT"Loading"N;ZF;ZH:

I FN > MMTHENPRINT"Data"N-MM"Longer than Array

DIM, CLEAR 24600":CLEAR 24600:

DEFINTC,H-V:DEFSTRD,W-Z:GOT0990

735 FORI =OTON:FORJ = OTOLW:LINEINPUT#1,Z(I,J):

PRINT'Capitalize Col."KC + 1:GOSUB19:GOT0300

777 PRINT'Load File/DA3 into /DA4; Name

Without/DA3";:INPUTZ:GOSUB7:ZF = Z:W = "3"

780 OPEN'T',1 ,ZF + "/DA" + W:INPUT#1 ,N,C,X:

LINEINPUT#1,ZH:PRINT"Loading"N;ZF;ZH:

I FN > MMTHENPRINT"Data"N-MM"Longer than Array

DIM, CLEAR 24600":CLEAR 24600:DEFINTC,H-V:

DEFSTRD,W-Z:END

785 FORI =0TON:FORJ =0102:

LINEINPUT#1,Z(l,J):NEXTJ,l:CLOSE:

PRINT'Capitalize Col."KC +1 :W = "4":GOT0300

800 IFINP(248)< >61THEN

PRINT'Turn on Printer"ZM;:Z = INKEY$:

GOSUB7:IFZ = "M'THENG0SUB9:G0T099

ELSEPRINTCHR$(29);:GOT0804 ELSELN = 0:

PRINTCHR$(30)"LPrint Line #s? <Y>/N;"ZF;ZM:

GOSUB8:IFZ = "Y'THENLN = 1 ELSEIFZ = "M'THEN99

804 PRINT"Offset All Print Tabs ("IT") Spaces?";:

GOSUB8:

IFL<0THEN99

808 INPUT"# of Copies";K:

IFK<0THEN99

PRINTN;ZF;ZH"/DA"W:

POKE16425,1:LPRINTZD;N;ZF;ZH"/DA"WTAB(72)ZF: FORI = LTON:

IFLNTHENLPRINTFNZ3(I)""; 812 GOSUB845:

IFI =0THENLPRINTTAB(75)LEFT$(Z(0,C),2)"-";: IFI +61 < NTHENLPRINTLEFT$(Z(61 ,C),2); ELSELPRINTLEFT$(Z(N,C),2); 814 IFPEEK(16425) = 1THEN LPRINTTAB(75)LEFT$(Z(I-1,C),2)"-";:

816 IFPEEK(16425) >0THENLPRINT

818 IFI > 1 ANDPEEK(16425) = 0THEN

LPRINTTAB(72)ZF

820 IFPEEK(16425) >63THENLPRINT: LPRINT:POKE16425,0'NextPage 822 NEXTI:

POKE16425,PEEK(16425) +1:

LPRINTCHR$(12):LPRINT:

NEXTG:G0T099

840 IF LI LPRINTTAB(IT)FNZ3(I)"";' formats follow

845 LP RI NTTAB (VAL(LEFT$ (XF, 2)) + IT);'Col.1 tab

850 IFRIGHT$(X,1) ="F" AND LEN(Z(l,0)) =7 THEN

LPRINTLEFT$(Z(I,0),3)"-"RIGHT$(Z(I,0),4)"";:

GOT0860'fone#

THENLPRINTTAB(VAL(MID$(XF,2*H +1,2)) + IT)Z(I,H); ELSE LPRINTCHR$(92)Z(I,H); 865 NEXT: RETURN

900 FORI =OTON:

IF LEN(Z(I,LW)) = 2 AND ASC(RIGHT$(Z(I,LW))) <91 THENM = ASC(RIGHT$(Z(I,LW))): MID$(Z(I,LW),2,1) = CHR$(M-32*(M < 91)) 910 NEXT: G0T099' does?

990 DEFFNZ(I) = RIGHT$(STR$(I),2): DEFFNZ3(I) = RIGHT$("" + STR$(I),3): DEFFNZR(I) = RIGHT$(STR$(I),LEN(STR$(I))-1): DEFFNIO(I) = FIX(l/10)*10:ONERRORGOTO91

991 KC = 8:KY=0:PRINT"# of Columns/Fields(4)?": GOSUB4:GOSUB8:W = Z:IFVAL(Z)THEN LW = VAL(W): IFLW < 2THENLW = 2:

W = FNZR(LW) ELSEELSELW = 4:W = "4":ZF = "BUS

992 IFVAL(TIME$)THEN ZA = MID$(TIME$,8,1) + MID$("jfmayuLgsond",VAL(LEFT$(TIME$,2)),1)

993 D =" DiskDrive":ZC =" Field #":ZM = " <M>enu?

994 JU = 2:GOSUB9:GOSUB6: MM = FRE(Z)/11 /LW:LW = LW-1:

DIMZ(MM,LW):PRINT ZA"' will be put in the last field for the year/month when '.'is entered.

995 IFLW = 2THENZF = 'TOLL" ELSE IFLW = 4THENZF = "GASDATA" ELSEIFLW = 5THENZF = "DRUGS

996 'C = SortCol? ZD = FiieDate760 JC = Col#Yelected KC = Col#Capitalized J$ = LW + 1 KD:line10 ZL(777,780)? ZT - Ztemporary KP=YaveFlag93,93

O = #LinesDisplay

999 G0T0135:REMPRINT"SNAFU Check <Y>/N?";: GOSUB8:IFZ = "Y'THENKY = 1: PRINT" Always Enter a # in Coi.1

RECREATIONAL & EDUCATIONAL COMPUTING

REC is the only publication devoted to the playful interaction of computers and 'mathemagic' - from digital delights to strange attractors, from special number classes to computer graphics and fractals. Edited and published by computer columnist and math professor Dr. Michael W. Ecker, REC features programs, challenges, puzzles, program teasers, art, editorial, humor, and much more, all laser printed. REC supports many computer brands as it has done since inception Jan. 1986. Back issues are available.

To subscribe for one year of 8 issues, send $27 US or $36 outside North America to REC, Att: Dr. M. Ecker, 909 Violet Terrace, Clarks Summit, PA 18411, USA or send $10 ($13 non-US) for 3 sample issues, creditable.

TRS-80 NOSTALGIA

Thinking guilty little thoughts about getting a 386?

Then you need: WHAT I DID WITH MY TRASH (Ten years with a TRS-80)

A new book by Eric Bagai, bound in mercedes silver an filled with essays, parodies, weird rumors, mythic hacks, and TRS-graphics. The way it was when love was a warm Z-80 - the way it should have been. Send $5.95 (non US: $6.95) now to:

Flaming Sparrow Press Box 82289 Portland, OR 97282

Add five cents for autograph. Order yours today! See? You're feeling better already.

TRSTimes on DISK #7

Issue #7 of TRSTimes on DISK is now available, featuring the programs from the Jan/Feb, Mar/Apr and May/Jun 1991 issues:

TRSTimes on DISK is reasonably priced:

U.S. & Canada: $5.00 (U.S.) Other countries: $7.00 (U.S.)

Send check or money order to:

TRSTimes on DISK 5721 Topanga Canyon Blvd. #4 Woodland Hills, CA 91367

TRSTimes on DISK #1, 2, 3, 4, 5 & 6 are still available at the above prices

GAMEDISK#1: amazin/bas, blazer/cmd, breakout/cmd, centipede/cmd, elect/bas, mad-house/bas), othello/cmd, poker/bas, solitr/bas, towers/cmd

GAMEDISK#2: cram/cmd, falien/cmd, frankadv/bas, iceworld/bas, minigolf/bas, pingpong/cmd, reac-tor/bas, solitr2/bas, stars/cmd, trak/cmd GAMEDISK#3: ashka/cmd, asteroid/cmd, crazy8/bas, french/cmd, hexapawn, hobbit/bas, memalpha, pyramid/bas, rescue/bas, swarm/cmd GAMEDISK#4: andromed/bas, blockade/bas, cap-ture/cmd, defend/bas, empire/bas, empire/ins, jerusadv/bas, nerves/bas, poker/cmd, roadrace/bas, speedway/bas

Price per disk: $5=00 (U.S.) or get all 4 disks for $16.00 (U.S.)

5721 Topanga Canyon Blvd. #4 Woodland Hills, CA. 91364

0 0

Post a comment