Hey Guys and Gals, Spring has sprung here in NW Florida, so it will be Sailing and Fishing for me for the next 9 months. I just can’t sit here at the computer lookin outa the winder at good sailing weather. So, dont expect much wizdem outa me for the next few issues.
This time I’ll give you a little program I named “Simple Simon Labels”. This is so easy that I whipped it up in a few minutes instead of hunting to find a more complicated label printing program. It’s done in LKDOS, but is easy to go the Oliger DOS route. In fact if you’re using Oliger DOS you can just eliminate the MERGE in line #60 and substitute <LET /p=o:PAUSE 0>. This will let you set your printer manually for whatever print style you want. Then when the printer is set, just touch ENTER and you’ll be ready.
The “”Init”” program has been given before in back issues and I include it just to show again how useful it is for setting up LKDOS and the printer styles. So, we wont discuss “Init”.
We will discuss the Simon program a bit. Labels come in different sizes. It is the DEPTH dimension of the label that might give you problems. “Simon” is set for an ordinary label that accommodates four lines, with two line spaces between the labels. If you are using a different size: BIGGER SIZE, add another data string or two, like E$, F$, etc, to line number 10. Correct the spacing between lines by adding or deleting ticks in line number 90 (just before the “NEXT N”. For SMALLER size labels, delete the D$ input in line #10, and delete a tick or two in line #90.
CRANKY DISK DRIVE OPERATION
I recently lost the use of a 40 track drive. It had been giving a lot of CRC errors and finally I got fed up and decided to add it to a favorite fishing reef. By the way, if you want to compound Drive problems, while spending some money foolishly, the way to do it is to take a drive to a repair shop. They’ll nick you for $40 to $60 and the problem “might” be fixed. And while you’re waiting for your worn out drive to be fixed you could be calling Rod Gowen to have a new replacement sent in. The cost will be near the same. The diff is you’ll either have your worn out drive (possibly fixed temporarily) or you’ll have a new one that carrys a 90 day dealer warranty.
DRIVE PROBLEMS: First let me say that I was talking to ole Frank Davis tother day. He said that Bob Swoger had run into some customer problems with some versions of LKDOS boards. Seems that some versions dont make the disk waltz like it should. I hope that Frank can get Bob to do a more informative article about that situation, perhaps in this issue. So I’ll leave you hanging on that.
CRC PROBLEMS: There are quite a few sources for these. Frankly I dont know what CRC means, except thats what the screen says when LKDOS wont load or save a program or data. Oliger DOS says something different, but both mean the same problem. Over the years I have had about a dozen folks send disks back saying that they wont load nuttingstein, only to load perfectly for me. One would think that the majority of such problems would be a faulty Diskette, but that seems to be the least likely problem of all. Out of several thousand diskettes used I have had perhaps one out of 50 that gave problems. And, strangely, the ones that gave problems were the most expensive diskettes. I now buy diskettes via mail order in lots of 50 for 59 cents each.
TYPE OF DISKETTES 40 or 80 Track: Did you know that it makes no difference? Just dont buy IBM “HD” Diskettes. The “HD” diskette means that they are made for the 1.2 or 1.44 Megabyte format capability of the IBM systems. These HD disks have sector markers imbedded in the recording medium at the factory. We can Format them and they will “seem to work”, but after about a day or two the programs recorded wont load. Always buy the el-cheapo 59 cent disks (DSDD) and you wont have diskette problems. Chances are that if you buy from Radio Shack they’ll sell you HD Diskettes. The clerks dont know no difference.
The DSDD diskette will format in in either your 40 or 80 track drive and work fine. LOAD or SAVE errors are mostly caused by the disk drive itself being out of kilter. The problem can be several: 1. The Recording Head can be mis-aligned. 2. Cigarette smoke or dust may have taken its toll on the drive. 3. The drive door latch may not be engaging the drive head close enough to the diskette. 4. The spring in the drive head mechanism may be weak. 5. The stepping motor of the drive may not be stepping the right distance.
How can one be sure it is the Disk Drive that is causing problems? Well, we can only use our noggin! Texas talk is, Use Horse Sense. If one diskette out of many fritzes then throw it away and use another diskette. If all out of a NEW box of diskettes fail, then try a different brand. If you cannot load programs sent to you, send the diskette back and the supplier will replace it. If the replacement disk wont load, then it is likely that your disk drive recording heads are not aligned properily, or you have other drive problems.
OLD DRIVES MAY BE SLOW: Maybe you have one of them real ole timers? If so, and you are having SAVE LOAD problems, try FORMATING with a slower speed setting. The Oliger DOS has a “LET/h=” command to let us set a lower speed. Both Oliger and LKDOS defaults to 6 ms speed of recording. And all disk drives made after about 1978 are high speed drives. If you have one of these old timers, chances are 9 to 1 that you should send it to me for it to be added to my fishing reef. If not, be prepared to lose many of your fine epistles as you continue to struggle with it. Now I know that this has not been a hi-tech analysis of disk drive problems, but the most detailed technical data would not have added practicality. We cannot do much to fix a cranky drive, and the repair cost equals the replacement cost. (About $60.00).
The AbC’s of >READ DATA RESTORE<
Here is a little programming tutorial for the TS-2068, the Sinclair QL, or (bit my tongue) the IBM. It involves the use of READ DATA RESTORE. These three commands are always used together. You could think of them as the Three Musketeers, Three Blind Mice, or the Data Trio. Please refer to the listing while reading the explanations.
The program uses the N counter to count up from 65 to 90, which happens to be the ASCII Codes for the upper case alphabet. Variable x is given the initial value of 97, which is the code for lower case “a”. From there on the plot thickens. As given, line #20 “RESTORES line #70, which is the READ line. RESTORE is used to point to the right line to READ some DATA bits. Line #30 then READs the value of varaible x for each count of the counter N. Line #40 converts the numerical values of both “N and X” into the literal character represented by the numbers, and then prints the two characters. Line #50 increments variable x and gets the next N count. Run the program for effect.
There is another data line at line #80. It is not used as the program exists because of the REM at line #8. Remove the REM at line 8 and install a REM at line 20. Run the program again for effect.
Note the long DATA line at line #80. The point for illustration is that the same effect of using a long DATA listing can be achieved by using a single DATA bit in a variable as is used in line #70. Such a scheme requires RESTORE “Each TIME” the Data is to be READ, otherwise the “END OF DATA” Report would stop the program. Many of the better Arcade programs use a computed variable which is READ by the operating program in similiar fashion. Question: After changing to RESTORE line #80, Why is the value of “x” not changed to foul up the works at line #50? Ans: x is indeed changed at line 50, but x is READ again before printing by line #30. Keep on digging until you can unearth the logic. Have fun! _BJ-
Simple Simon Labels
10 LET a$="": LET b$="": LET c$="": LET d$="": INPUT "line 1"'a$: BEEP 1,18: INPUT "line 2"'b$: BEEP 1,18: INPUT "line 3"'c$: BEEP 1,18: INPUT "line 4"'d$
20 CLS : PRINT a$'b$'c$'d$: INPUT "Correct? <1> yes <2> no";a: IF a=1 THEN GO TO 50
30 INPUT "Enter line # to Correct";x: INPUT "Enter new line";m$: LET a$=(a$ AND x<>1)+(m$ AND x=1): LET b$=(b$ AND x<>2)+(m$ AND x=2): LET c$=(c$ AND x<>3)+(m$ AND x=3): LET d$=(d$ AND x<>4)+(m$ AND x=4)
40 CLS : GO TO 20
50 CLS : INPUT "Install Labels in Printer ENTER";y$
60 INPUT "Is DOS Printer Driver READY <1> Yes <2> No";z: IF z=2 THEN RANDOMIZE USR 100: MERGE "Init.B6": GO SUB VAL "1993": DELETE 1993,
70 CLS : INPUT "Enter Left TAB";tb
80 INPUT "Enter number of labels";x
90 FOR n=1 TO x: FOR y=1 TO 4: LPRINT TAB tb;a$'TAB tb;b$'TAB tb;c$'TAB tb;d$: LPRINT '': NEXT n
The Merge “Init” Program
1993 BORDER NOT PI: PAPER NOT PI: INK VAL "7": CLS : LET pg=NOT NOT PI: LET nn=NOT PI: PRINT AT 7,4;"Touch:"''TAB 4;"<1> For TS-2040 Printer"''TAB 4;"<2> For Dot Matrix"''TAB 4;"<3> For Daisy Wheel";AT 18,7; INVERSE 1;"PRINTER MUST BE ON"; INVERSE 0: PAUSE 0: LET z=CODE INKEY$-VAL "48": LET pr=z-1: IF z<1 OR z>2 THEN GO TO VAL "1993"
1994 IF pr=0 THEN RANDOMIZE USR 100: OPEN #7,"LP": RANDOMIZE USR 100: POKE VAL "16092",0: GO TO VAL "1998"
1995 CLS : RANDOMIZE USR VAL "100": OPEN #3,"lp": PRINT AT 10,3;"ELECT Type CPI:"''TAB 3;"[1] Aerco - Oliger"''TAB 3;"[2] Tasman CPI"''TAB 3;"[3] A & J CPI": PAUSE 0: LET a=CODE INKEY$-VAL "49": PRINT #0;"Printer Need Line Feed? <y> <n>": PAUSE NOT PI: LET w$=INKEY$: LET b=(10 AND w$="y" OR w$="Y")+(NOT PI AND w$<>"y" AND w$<>"Y"): RANDOMIZE USR 100: OPEN #4,"dd": RANDOMIZE USR VAL "100": POKE VAL "16096",a: RANDOMIZE USR VAL "100": POKE VAL "16090",VAL "138": RANDOMIZE USR VAL "100": POKE VAL "16092",0: RANDOMIZE USR VAL "100": POKE VAL "16094",NOT PI: LPRINT : RANDOMIZE USR 100: POKE 16092,b
1996 CLS : LET m=VAL "1997":: OUT VAL "127",VAL "27": GO SUB m: OUT VAL "127",VAL "120": GO SUB m: OUT VAL "127",VAL "1": PRINT AT 10,3;"SET PRINTER and Elect:"''TAB 3;"[1] Pica 10 Cpi"''TAB 3;"[2] Elite 12 Cpi"''TAB 3;"[3] Micron 15 Cpi": PAUSE 0: LET ps=CODE INKEY$-VAL "48": LET lx=(VAL "80" AND ps=VAL "1")+(VAL "96" AND ps=VAL "2")+(VAL "120" AND ps=VAL "3"): LET qq=lx/VAL "2": OUT VAL "127",VAL "27": GO SUB m: OUT VAL "127",(VAL "80" AND ps=1)+(VAL "77" AND ps=2)+(VAL "103" AND ps=3): GO SUB m: OUT VAL "127",VAL "27": GO SUB m: OUT VAL "127",VAL "120": GO SUB m: OUT VAL "127",1: GO TO VAL "1998"
1997 IF IN VAL "127"<>VAL "237" THEN GO TO VAL "1997"
1998 RETURN
READ DATA RESTORE
2 REM "READ DATA RESTORE"
5 LET x=97
8 REM : RESTORE 80
10 FOR n=65 TO 90
20 RESTORE 70
30 READ x
40 PRINT CHR$ n;" ";CHR$ x
50 LET x=x+1: NEXT n
70 DATA x
80 DATA 97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122
90 STOP
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.