SINC-LINK

VOL3 N0.4

JULY -AUG '90

SINC-LINK IS A PUBLICATION OF THE TORONTO TIMEX-SINCLAIR USERS CLUB AND IS ISSUED 6 TIMES A YEAR. COPIES OF THE NEWSLETTER ARE $1,50 EACH FOR NON-MEMBERS. CLUB MEMBERS RECEIVE FREE COPIES AS PART OF THE $20.00 ANNUAL MEMBERSHIP FEE. A NEWSLETTER SUBSCRIPTION ONLY IS A{/AILABLE FOR $22.00.

NEWSLETTERS ARE EXCHANGED, ' FREE OF CHARGE, WITH OTHER TIMEX-SINCLAIR USERS GROUPS.

PLEASE CREDIT THIS PUBLICATION AND THE AUTHOR IF YOU COPY MATERIAL.

THE CLUB MEETS ON THE FIRST WEDNESDAY OF EACH MONTH AT FOREST HILLS COLLEGIATE INSTITUTE, 7 JO EGLINTON A\/E. W. , TORONTO. START TIME: 7:00 PM.

SEND CORRESPONDANCE TO:

A t tenti an: SINC-L INK TORONTO TIMEX-SINCLAIR CLUB, 14 RICHOME SCARBOROUGH, ONTARIO, CANADA MIK 2Y1

EXECUTIVE OFFICERS:

PRESIDENT:

TREASURER:

SECRETARY:

ACTIVITIES:

TAPE LIBRARIAN ZX81:

TAPE LIBRARIAN 2068:

TAPE/DISK LIBRARIAN QL:

PAPER LIBRARIAN:

NEWSLETTER:

LIAISON OFFICER:

( Out-of-town members )

EDITOR USERS COURT,

TORONTO TlflEX-SINCLfllR USERS CLUB

(Area Code 416) RENE BRUNEAU ( 531-9749 ) BILL LAWSON ( 444-8772 ) GEORGE CHAMBERS ( 751-7559 ) RENE BRUNEAU ( 531-9749 ) LYMAN PAQUETTE ( 482-4479 ) RENATO ZANNESE ( 635-6536 ) HUGH HOWIE ( 634-4929 } JEFF TAYLOR ( 244-8583 ) JEFF TAYLOR ( 244-8583 ) GEORGE CHAMBERS, 14 RICHOME COURT, SCARBOROUGH. ONTARIO. MIK 2Y1 ( 416-751-7559 )

Editorial

About a year and a half ago I wrote that I had been saved from the frustration of having to rely on tapes to load the 2068 when I purchased a Larken disk drive interface. I was so happy at getting consistent loads and saves in a few seconds that I thought I had reached the ultimate in mass storage technology.

Well folks, I was wrong. Last week I completed my latest hardware project, popped on the chips, plugged it in and turned on the power. Presto! Instant loading and saving. No whirring drives, no external power supply, no worrying about protecting disks, no moving parts.

Of course, I'm talking about the Larken RAMdisk. The same load and save commands are used but the speed just has to be seen. One moment the computer's RAM is empty. Simply request a program from the RAMdisk and it's installed literally in the blink of an eye. For someone like me who is used to chattering disk drives, the silent and speedy execution of this marvel is a little e e r i e

One "of the other useful features of the RAMdisk is its battery back-up. When the 2068 is powered down, the programs stored in the the RAMdisk remain intact thanks to the onboard 3 volt battery. In fact, I could turn off my 2068, remove the RAMdisk from the edge connector, take the unit across town (or across the country), plug in into someone elses' 2068 and all the data stored on it would still be there for use.

I intend to install my word processing program, a modem program and a suite of utilities on the RAMdisk. With a capacity of up to 256K, several large programs can be put in place for use at any time.

Thanks to Ian Robertson and Rene Bruneau for lending me SRAM chips on short notice. I now intend to utilise the many programs George Chambers and Bob Mitchell have written for the RAMdisk and which are available in the club disk library.

The RAMdisk is not going to obsolete my disk drives but it is going to eliminate some of the drive usage and cut down on my reliance on disks as a storage medium.

Apology

Last issue I promised a review of Byte Power's "The Print Factory" . Well, I haven't learned enough of this excellent packege to do it justice, there are so many features. So you'll just have to wait at least one more issue before I produce the review. Sorry.

Did anyone notice the errors in the last issue? The one on the front cover was the most glaring, considering that I had mentioned another group with the same name but no hyphen. Some of the newsletters had their last few pages out of order. Again, sorry. Production problems. We have received some very nice letters commending the May - June issue. To those readers, thanks for taking the time to write.

That s all for now. . .

J.T.

SINC-LINK

2068

EOE ' S NOTEBOOK

This program was writ ten to keep track of several bank account balances. Note that it is intended only to track current balances. It is written to fit into one block usin-a the LKDOS system; thus it can be stored in RAIiDISK without wasting precious track space. It is entirely in BASIC and cannot be compiled as written due the use of the VAL tokens during calculations. This use of VAL strings is not recognized by Timachine but VAL numbers is.

Here is the listing with some comments and additional information at the end. In the listing and comments? the word TOTAL refers to a computation of balance amounts using designated formulae.

lea REH Bans Balances

Tf^H LET sS="

TO 173

1S50; OPEN nod

lia GC3 TO 2.50 120 JF S9i03$

130 FOR J=oa TO LEN s$ 14S IF S5Cj:: = %" THEN SO 150 NEXT J 1&0 LET S5=s$*"."

170 IF S5CLEN S5-oa)="=" OR S^s LSzH SS)='%" THEN LET S$=S5+"w"

1B0 IF s$CLEN S5-oa>="." THEN L ET S*=S*+"0"

1S0 Ir LEN siiooi THEN LET S5="

"+£*: SO TO 1-50

200 RETURN

210 PkINT Sgo : 'Ca I c :j I a t i n o "

FOR i =©a TO a2

LET fat=URL r$ii:: LET bt=IN T (bt*100+,5> LET -5=5TRs b t: SO SUB 120 LET t5Ci)=--== 24^ NEXT i 250 RETURN 2S0 RjSNDOnlZE USR , "dd" 279 ON ERR SO TO 2?^0 PRINT Uod: CLOSE Soc 290 Ir s=ob THEN CLOSE noiy ?^ Jl ^=-^c THEN OPEN noc,"P' w^i® ^='--^ THEN PRINT nod: OS>E

N «oe,"ip": f-'RINT Uod: POKE iF.gQ

320 CLS : PRINT " BRNK B«! «N

330 PRINT "1> Set Date d5 2. Na»e File",y$'"3> Save Fi le" ^4. ^ tan CSS " ' "5> CHRNSE HENU '

..^1.3^^^^ File" '"7> Set Di^ioia "i'r^C^^N" flNJ> s=ob.»4C TS2^4-i*"

> t ' ^ ' " ^" - =*-'^ '

34^ PRINT 555

?S*'7?*5^*^J™ Of. Press Choice KEvi^s " ^^^"^^ it=eODE IN

360 IF k ; LINE d$

370 IF i=ob THEN INPUT "n^sts> ^ max 5) ": LINE

3S0 IF |^=£h Tf^ ON ERR RESET

Li_i> : : STOP

390 IF k=oc THEN GO TQ 1020

3:r ?.=De !?i£iN SO TO 57g Ir- ^=c.f THEN SO TO i.50

=03 THEN INPUT "date?

4-30 Ir ii=.3g THEN INPUT i "diss J a y asode?"'"2=Screen 3=TS20i0 5= wide "2^:s: ±r s=GC THEN PRIMT S^i

4-4^ Ir ?.=.3D THEN PRINT sod: SO TO Od: PRINT sod" NEU

4-50 SO TO 250

4-t>0 CLS : CLEhR 55535: INPUT -S oa» many accts? imsx 10)":al- I«p LfT_"hous sany totals? c.-nas 7} :a2 ^ ±F al>i0 OR a2>7 THEN SO TO *S

4-70 LET 00=NOT PI: LET .3a=SSN ±: i-£T 0S:.=Ga*03: LET OC=Gb+oa- L ET od=ob+ob: LET oe=Oti+oa- LET o f=or^ocj_ LET .33=of-*-oa: LET .3.H=od -to it : t_tz I o z =0 h -i-o a : LET o J =oe -^o e

4-30 DIN C 5 sal, -213: DIH bCals r> -lH b5 Cal , G i } LJiH t s 132 , oi } : r>TH

95132.15) - --71

4-is0 DIH f5Ca2,5«>: LET Ls$="====

Cob.i =" LE

DIH S!5 foe ,-G f .i : LET ijCREEN" : LET ?n5 Cg C s ='T T_a* Coe t ="yir?E" i3l0 LSI? s=Gb: LET y$=".-=ni!" dS=-;^setd3te" : so ~Q 53©

rV-^ ^=?>3 TO 31: PRINT ijT*3B 2:C5ii-': NEXT i 530 FOR i =03 TO el

h$=oo THEn'ssD to 550 LET C5 4"i:* ,Db; c$Ci )

5S0 NEXT i : PfaJSE I00

t>70 CLi> : PRTiir - "BRNK 3kL«NCE S" "CHi^SE HENU" US -^^^ ^^S0_^RINT "1> Ha in HENU"' "2 > Re

.^f^^i^^T "3> TOTRL Hsm^s" "4.y ^^«^""'5> Balances" b3*%- -5 \"Press Choice Cl- 5i . PRUsjt: 00: !_ET li=CODE INKEY-5

560 PRINT RT

i -03

bl0 Ir j=Ga THEN SO TO 320 620 IF k-ob THEN 60 TO 520 -?f ^L - THEH SO TO 560

^ =-^-^ THEN SO TO S90 &50 Ir ?.=Ge THEN SO TO BI0 to70 SO TO 570

'-'^S PRI-NT ssjT Of;-B£»iK BRLRNCES "jD*. PRINT

690 FOR i=oa TO ai

J^s^S-SW^' = ' " ^'^^^

.zr^^S ^ '--"^ THEN PRINT Its; INU

u'^T^iUtm^^^ ^^'^^^^

WT Its^iisRr. G€J: c$Ci) ;TRB tb;b$Ci 730 NEXT i

74« PRINT SsiTRB O f +Od ; "TOTRLS" : -F'OR i=oa TO a2 750 PHINT #s;s5Ci ! ;TR3 tb;t5Cil 760 NEXT i

770 -i-S:_S_?>Gb THEN PRXHT Us ' ' ■' 780 Pkj.Ni #oo;Ri go ,00; "Press a ^ey": PhUSE 00: SO TO 320 810 CLS : LET tb=23: PRINT FO R i=Ga TO 31: PRINT i;TRB ob; c«s i ) ;TRB tb; b5 Ci > : NEXT i : FOR i =0

h*=oo Ti^H SO TO S50 320 LET b5:i:!=iiRL h$ 330 LET S5=STR5 bCi): SO SUB 12 0: LET bsii) =S5 840 PRINT RT i,tb,b*(i) SSa NEXT i 860 SO SUB 210 870 SO TO 320

SINC-LINK

(dank b^larices - cm-tj

2068

3^ ei_S : PRXNT "Fnter all ents as bCx> a?here x is irie

acct nusberr""': FOR i =oa Tis 32 : PR3>rr i;T3B 0£;f5iiJ: ?ezXr i

900 FOR i =03 TO 32

gi« iMPirr

PRUSE 60: UH SljOa; "Enter POKE 23607.2

RT oo,oo; T"liTiVliIiri-7i;

. E i-XHE h5: XF DO

DE h$=00 TrSH «3 TO S4.@ 920 UET

330 PRXHT RT S3+Ci*Gb) ,OC: f*Ci)

340 HEXT i _ _

350 GO SUB 21«: GO lO 3H0

960 CLS : FiM? i =0 3 TO a2: PRXNT

i;TfS Ob;35Ci>: HEXT i

970 FOR i=03 TO a2 ...

360 Xj^UT RT GO, go; ("fHHlBSinL aEESaE ";!)■ LXHE h$: XF CG&c: h$=00 THEN GO TO 1000

3^ LET 95*

1000 PRINT RT i -oa ,ob; g$ is 5

1010 HEXT i: PRU5E 100: t?0 5 1* t:.7 0

1020 XtS^tn" "drv? C 0-4-5 ";-drv: ?-'R 3KT Sod: SO TO drv - 1030 ON B?R SO TO 3005: pRlf^T so d: SAVE yS+"-31" 3005 ON ERR Rt^:-ET :

EfW 60 TO 301» 3010 Ci-S : PRINs RT

passufo rd " 3015 POKE 2365«,00: 50

3017 X"^!f^_!rP^^

3013 PuKt -fr^xs% / , t50

3O20^XF p$="passu>Of OR_p*= u:.i

OCk" THEN CL^i- : ON EkR RSztsET :

O TO 260

3030 ON ERR GO TO 3005 904« STOP

Once entered into the 2068 and saved, reset the computer, reload the file and initialize it using option 6 on the MAIN MENU to erase all data and variables in the file.

Enter the number of bank accounts (up to ten) that you wish to track. These could include bonds, chequing and savings accounts, RSP accounts, etc. There is room for 21 characters uihen describing each account (bank, acct number, type of account, etc). See example a.

Next, enter the number of TOTAL'S you want to calculate (up to seven). Establish the names of these TOTAL groupings (option 3) and then develop the formulae for these (Option 4). See R Uimplt? b.

The balance for each account is stored in numerical array b( ); a grouping might be b(l)+b(3) or b(l)*1.2. There is room for 50 characters in these formulae. See example c.

Finally, enter the bal?.ncr=i ^ ption f □n the CHANGE MENU). DO NOT ENIER BALANCES UNTIL OTHER OPTIONS HAVE BEEN ENTERED. You can view your balance sheet on the screen, TS2040 or Wide Printer. (Option 4 on the MAIN. MENU).

The program uses ON ERR which has to be handled gingerly to avoid a lock-up, so I have built in two escape routes; this is particularly useful during altering or de-bugging the BASIC. One is at the MAIN MENU where pressing <8> will do an ON ERR RESET and LIST the file; ^■he other is at the end of the listing (lines 9005 to 9040) which allows you to hold down the BREAK key to get back to BASIC. Even so, make sure you save your balance sheet before playing around with the program. If you want to take out these escapes, delete line 380 and delete <,PAUSE 60> in line 9005.

While you are looking at those lines, note line 9020 which contains the password privacy codes. You can replace Yhe two codes with anything you like. This does not provide full security for your information because anyone familiar with the LKDOS system can break in during 'he LOAD function. You could also read the data using Disk Doctor. However, these codes offer a reasonable degree of privacy.

When changes are made to any data, the current data are listed on the screen and a prompt is shown at the bottom to Pnter new data. If an item is correct as displayed, simply press the CENTER! key to step to the next item. This technique is used several times, ie, at line 520 for name and acct i.d.; at line 890 for TOTAL formulae; at line 810 for balances and at line 960 for TOTAL names.

The following techniques are used to display data on the screen as quick., is possible:

1) Justification to express amounts in dollars and cents is performed at line l-'O iL.i^-h decimal points being aligned and any necessary trailing zeros added; formulae are evaluated at line 210 to 2^0; these subroutines are located early Tn the listing to cause the least delay. Note line 230 which in evaluating the string f$ ensures that only two decimal places will be displayed. Remember, at every GO SUB command, the TS2068 starts at the first line and looks for the 60 SUB line number so the earlier it finds it, the quicker the results.

2) all calculations are performed at the time the changes are entered; leaving them to the time of display would speed up entry time but slow down the display.

SINC-LINK

2068

Now, some more notes on specific lines:

270 ON EPR GO TO de-9ctivates BREAK key; ON ERR RESET r3-fictivats= It.

290-310 LKDOS printer codes are set up depending on value of 's> determined in line 430.

320-450 MAIN MENU: Includes current status information (date? file name, display device. Line 440 as written reloads an autostart program in RAMDISK and may be changed to suit (or ON ERR RESET: STOP).

460-560 RESET FILE: This lets you start a fresh file. Line 470 sets variables for numbers 1 to 10 to save bytes. Arrays are established: c$ (acct names); b (numeric balances for computation) b$ (balances derived from b( ) and Justified for display); f$ (TOTAL formulae for computation; g$ (TOTAL names); t$ (TOTAL values derived from f$( ) and justified for display).

680-730 DISPLAY BALANCES: Lines 710 and 720 change display for wide printer. The LKDOS printer driver does not like INVERSE in LPRINT statements or indeed any attribute commands such as PAPER, INK etc. Was thi= an oversight, Larry Kenny 7

910 ENTER TOTAL FORMULAE: You may use all the arithmetic functions here, le, add \+ ; subtract <- ; multiply v*>, etc.

g TD100 Cheqsjing

^ - ' ••

S CT RSP

Cash on hand

Tn v<x^ i g&^n i s.

$U5 i n $C^M Ne t yo r t h $CRN

Ex asp t c h

1 bCl) -fbC2) +bC3)*l.

2+bC4.)

2 k(5}-fbCS)

3 bC3)

5 b ti) -i-b (2) -i-b i3) (6)

2-fb (4>) -fbCS) -fb

Example c

QL "TI^Y- XT"

This ONE-LINER is rather peculiir.

'copy con to ser '

The cursor Mill disappear, and anything you type Mill go straight to the printer Nhen you press <ENTER> provided your printer is attached to serl. HITHOUT APPEARIHB ON THE SCREEN Mhile you are still in this lode, try 'Irun xxxxjoeething', and the coiiand goes to the printer I Using SCR instead of CON Mill give you 'Bad nate'. As I understand it, SCReen Morks as a display device, Mhereas CONsole, acts as a separate teriinal.

To break out, press CTRL-SPACE.

Try it !

HiHtHi

SINC-LINK

5

QL

SOME POPULAR MISCONCEPTIONS (Mostly about filenames).

From time to time I read in an article or letter about the QL statements that I know to be untrue or at least misunderstood. Sometimes the same misconceptions occur over and over again. The following comments arise from a recent (Jan 90) issue of QL World and the final issue of a US newsletter called Quantum Levels, which started with high hopes as a bimonthly in August 1986 but only managed 12 issues in three years.

Basic Filenames.

Many people seem not to realise that there are two ways of presenting QDOS commands with filenames, and that the rules for allowable characters differ between them. In each case there is a limit of 36 characters in addition to the five which define the device (e.g. mdv2_).

1. The normal method of supplying a "parameter" consisting of unadorned ascii characters when only normal letters, numbers and the underscore character are accepted, e.g. LOAD mdvl_jny_j)rogl.

2. QDOS will also accept strings, otherwise it would be almost impossible to write file handling programs. (I think early versions of the QL only worked this way. ) By a string I mean

i. a set of characters in quotes e.g. SAVE "flpl_!@#$",

ii. a string variable to which a string of characters has been assigned e.g. COPY a$,b$

iii. a string function e.g.

MERGE dev$&"_"&p$&CHR$(233). In these cases the only restriction is that the first five characters must be a legitimate device name followed by an underscore, the rest can be anything you can type in at the keyboard, and even unprintable characters (use CHR$() as above). Thus you could create files with unprintable names that would be almost impossible to delete without reformat ing the medium - if there were any point to this! Some commercial programmers have used filenames consisting entirely of spaces, which are invisible in a normal listing - I once discovered one on a disk someone sent me that read "FORMAT flpl_: FORMAT flp2J' that was named " "; luckily I discovered it using my Ftidy program before it was activated.

As far as I can see these rules apply to all commands that take filenames in the QL ROMs and in Toolkit II, such as RENAME.

FORMAT also works in the same way as far as medium name is concerned; that's how they got the date in the form 9\9\86 on the early mdv cartridges.

6

SINC-LINK

QL

You can even put one totally nameless file onto each medium; e.g. SAVE flpl_ creates such a file. The file can be BASIC, text or machine code, and is available to any of the commands referring to a single file name. However, DIE, and any commands or programs which make use of the directory, fail to recognise the file at all. If you suspect such a file may be lurking about on one of your disks /cartridges you can reveal it by COPY flpl_,mdv2 .secret (or something similar - COPY flpl_,scr_ also works). If a file called "secret" appears on your target device, then it is secret no more and now available to all the normal manipulations.

P.qinn Filenames.

It is fairly common to read that Quill files must have the extension _doc, export files must have the extension _exp etc. , This is not so, these are merely the defaults that the Psion suite uses if provided with nothing else. While you are restricted to a maximum of eight normal letters and numbers for the main part of the name and there must be a thre character extension you can use any three characters that can be obtained from the keyboard for the extension. You must, however, type them all in when you want to save or load the file; "letter_@#$" is quite acceptable as a quill file name for example. You can import any ascii text file into quill too, but it must also fit these rules, so you may have to COPY it to a regulation filename (or rename if you have the facility. ) It is the file header itself that distinguishes quill files from abacus files etc. and not the extension as is often thought. I use a three character date code on all my letters e.g. Michael_B12 means a letter to Michael written on November 12*^ (to me at any rate!)

Morft P-c^ion tricks

Shift + F5 refreshes the screen in all the programs, but for some reason is undocumented. (Much better than F2 twice ! )

Have you discovered that CTRL + down-arrow deletes from the cursor to the end of the line, and CTRL + up-arrow from the cursor to the beginning of the line?

Howard Clase, e-mail: hclase@kean. ucs. raun. ca. bitnet

Box 9947, Station B, St John's, Newfoundland, CANADA, AlA 4L4.

Tel:

(N. Am.) (709) 753-6415 (O.K. ) 0101 709 753-6415

1990.04. 10

SINC-LINK

323 1/2 N. Church Street Bowling Green, OH 43402 March 20, 1990

Dear George,

Being a mathematician, I tend to do a lot of fooling around with DEF FN and FN. You may have seen my letter on some of the stranger examples in ZX Computing about 3 years ago. Those weren't exceedingly practical - they took too long to return an answer. But they were intended to illustrate just how much you could actually do with the DEF FN command. If written in the normal way, they would have taken several lines.

If you want a simpler (and more useful) function, try this one out:

1 DEF FN l${a)=(" > "+STR$ a)(LEN STR$ a TO)

This function produces a string of 11 characters which ends in the value of the variable a. In other words, it could be used for left- just if ying numbers, if you want them to line up in nice columns. If you will be using relatively small numbers, you could drop a few of the spaces - just make sure there is one less than the final length you want.

I have in various places collections of dozens of DEF FN functions, though as I said most of them are not necessarily practical. Oh, if you are trying to figure out why a DEF FN might take a bit of time and can't find the letter in question, it is because the functions involved something called recursion, in which a function may call itself several times in order to obtain an answer. Naturally, the more times the function has to call itself, the longer it takes. It is a sophisticated approach which lets you put the equivalent of a FOR/NEXT loop in a function, but it is somewhat tricky as well. Among other things, you have to design the function very carefully to avoid being caught in an endless loop.

I should give you an example. Some of the more sophisticated computers have a built-in function called INSTR. This function takes as parameters 2 strings and a number, and returns a number which is the first occurence of the second string in the first string, after the position corresponding to the number. If it isn't found, a value of 0 is returned.

As a subroutine, such a function would look like the program below. Here, a$ is the first string, b$ is the second string, and s is the number input, and pos is the result.

1000 FOR i = s TO LEN a$-LEN b$+l

1010 IF a$(i TO i+LEN b$-l)=b$ THEN LET pos=i: GOTO 1030 1020 NEXT i: LET pos=0 1030 RETURN

That is actually quite a lot going on there. If it were written on another computer, I would have had to include one more IF to be sure s<=LEN a$-LEN b$+l, I would have to be sure a$ was long enough to possibly have b$ in it. On our computers, if s is too big, it will automatically skip the loop.

SINC-LINK

To do the same thing in a single DEF FN statement is complicated, of course, but it can be done. I have to specifically check all the possibilities. And I have to also use the VAL function to make sure I can get out of the loop. If I referred to the function directly, there would be no way out of the recursion.

So, without further ado, here it is:

5 DEF FN p(a$,b$,s )=VAL (VAL$ ({"(""s"" AND a$(s TO s+LEN b$-l)= b$)+(""FN p(a$,b$,s+l)"" AND a$(s TO s+LEN b$-l)<>b$)") AND s<= LEN a$-LEN b$+l )+"+""""") +"+0" )

As I said, it is extremely complicated. One thing that makes it especially complicated is that I have to make sure that if s>LEN a$-LEN b$+l it will not attempt to evaluate any of the subscripted strings. The " + """••" and "+0" are there to avoid errors trying to evaluate an empty string. Let me try and walk through it for you.

There are 3 cases to consider. If s is too big, the whole thing collapses to VAL (VAL$ ("+""""") +"+0" ) . The VAL$ produces an empty string - it evaluates the string - so that the VAL

only evaluates +0 to get 0. That is as it is supposed to be. If s is small enough, then the VAL$ recieves the string "(""s"" AND a$(s TO s+LEN b$-l ) =b$ ) + ( ""FN p(a$,b$,s)"" AND a$(s TO s+LEN b$-l)=b$)+""""" . Of course, the first and last quote are removed, and all the double quotes are converted to single quotes .

This is where the other two cases come in. We already know that s is small enough. If at that location, we can find b$ in a$, the VAL$ simply produces "s", which has 0 added to it and is evaluated to give the answer. If b$ is not at that location, the VAL$ produces "FN p(a$,b$,s+l ) ", which the VAL then evalutes to determine if b$ can be found at the next position (and the next, and the next, until we hit one of the other cases).

I admit, this is a rather extreme example, and hence will evaluate slowly if it can't find the answer the place it checks. I presume if a$ was too long, it might actually produce an Expression too .complicated error. Needless to say, that is not a problem with using an actual subroutine.

Anyway, enough fun for one day. That particular function I think I would never try and put to any practical use, but would instead use the subroutine. There are examples where the subroutine is less practical or almost impossible where this could be done, but they are unusual mathematical functions which might take too long to explain. Oh, needless to say, even the more sophisticated computers would have trouble handling.

I have not recieved the March issue of Sine-Link yet, but I presume it is about as slow as usual and I will get it in the next couple of days. I'll be mailing this from Windsor, where I am spending my March Break, so I won't really know if I got it for a little while anyway. Take care, and Peace!

P.S., I just finished checking it out. I originally had one too many "(" in the DEF FN, but I have corrected it. And it performs as billed. If you were to use it to search a string of about 150 characters for the last character, it would take sincerely/ roughly a minute-. Actually, that isn't quite as bad as I expected, but it seems longer than it actually is. ^ ^.^

SINC-LINK

This pa0e was printed with the 2068 in SPECTRUM mode on a Panaeofiic KX-PU80 9-pin printer, using the WORD-MASTER suite of programs from Britain, tf this is the first time you have seen such output, then, Uke ine, i am sure you are impressed. If word processing or Desk Top Publishir^ is your requirement, this review is of interest to you.

In mg humble opinion, this is the best word processing padcage avallaMe for the SPECTRUM emulated 2068 today. I have used MSCRPT and have had a fleeting try at TASWORD I. MSCRPT is a very good program and, as a word processor may be slifihtly better than WORD-MASTER, but with the graphics capabiUty and the other features avaUabie through the extension programs, WM wins hands down.

First of all I will discuss WM Itself. Its major difference from the other programs is the flie handUng capability. It aUows more than one file in RAM at C*t can be many more, <*8pendlng on size, up to the avallable 2gkX These may be ottier text flies (created %vith ottjer- word processors like MSCRPTX graphic Hies (mag be amkms with artist type prom an IB Uke ART STUDO, wWch was used to create the graphic of our favourite computer), fonts (user defined or otherwiseX or other WWcations programs that operate with WM (to allow its anf»zlng output), it also allows several text f Ues to be linked to form one larger file.

As a word processor, WM has aU ttte required amenities, or is *«**ng in only minor points. The features include:

2068

ByLiooelllKeqiiDg

T9 tea

c. change drives

d. get a flle already in RAM

e. delete a file from RAM

f . erase a flle from disk

g. catalogue the drive

h. link flies

2. Fitt Optiona:

a. alter screen columns from 16 to 64

b. alter screen colours c delete all but ASCI codes

in a flle

d. find a selected page in the

flle

a save or rename the current file

f. exit to main flle handling screen

g. exit to print options

h. begin %vritir«

3. EcSt Options:

a insert and typeover modes t>. Insert command lines (or non printing comments) to control special options (see 4 below)

c fast scroll through text

d. Imbed control characters into text (much easier than MSCRPT)

e. isiderline words (visible on screen)

f. delete / undelete %vord or

line

9. block move, copy, delete, save

h. search / replace with or without auto replace and case sensitivity and with a "smart" feature that will search on a lowercase string but capitalize the first letter at the begining of a sentence!

"targe", or "normal"

c change Justiflcatlon by simply typing "All", "centre". Vight", or "left"

d. change margins ("margin nn". nn in lOths of an inch) or columns rcolunrvi nn", nn between 16 and 255)

e. define up to 7 special characters which may be used to print othenvise unavailable characters

f. send printer control codes using "Iprint n^-" (up to 16 codes per line)

0. select "wMe" (double spacing, flU Justification)

h. "reset" the printer

L force a page break using "form" for form feed

j. select "draft" or "nlq"

5. Graphic Prlntino:

a. print a graphic, from BAM, with the text

b. vary the width and height of the jraphlc when printed

c print text to left or right of the graphic

d. print graphic with shading to approximate colours

^ Fitt Handing:

& create a flle b. load a flle (including SCREENt) from disk or t^

Command Unas:

a place non printing comments In text

b. change pitch by typing -elite", "Pica", "condensed".

B. Hoodora and Footero:

a create headers and footers which may be called up from RAM to print in the document

b. move the printhead to a selected line before printing

c styles and pitches In 'waders and footers ^r^f^epenOent of the main document

d. send conb-ol codes within the header or footer

e. print header or footer to left or right of. the page

f. print page number In Swatter or footer (or in nr^ain text)

7. Prmt Optiona:

a set number of lines per page

b. set form feed on or off c use fanfold paper or single sheets (with prompt for next sheet)

d. select page number start a print selected pages

SINC-LINK

2068

r. set line spedno.

As you can see, the features are numerous. To help you keep track, WM prints two or three lines at the bottom of the screen to remind you which mode you are in and which keys perform the functions. For example, %vhile writing, the information lines tell you if Caps Lock is on, whether you are in Insert mode, how many columns are displayed, if fast scroU is on, that [Shift 9 - GRAPHCS3 ylves printer control opttons. that [Shift 2 - HXT2 calls up the delete options, that [Sym Sh W - DRAW] enables the block function and that [Sym Sh E > ?EM] alkiws the search function. It also tells you the number of %^ds in the document (at the last save), the number of characters, and the amount of free RAM or other information, dependino on the feature selected.

There are similar help lines for the other options, inckjdino the PRMT mode, RLE HAMXM6 mode. RLE CFTIONS mode, DB.ETE options, and BLCX3C options.

All In all, the features are very extensive and the program is relatively easy to use, but, as with any software with so many features, it takes a bit of gettino used to (ever try using WORDPBV=ECT on an BM without something to tell you what all the function keys mean?!).

If the foregoing were the only benefits of WM, you would probably be as well off with MSCRPT, except for its lack of graphics capability. However, it Is the extension programs that

make this whole thing worthwhile.

There are two nrtajor programs that make this package work. They are TYPBJNB^ and HEAOUNBV TYPBJNER Is the desktop publishing program that produced this page after it was typed with WM. HEAOUNER is a graphic creation program that allows use of large fonts and graphics to create graphic files.

The first of these. TYPELWER. Is the showcase of the package. It takes the Yaw" text produced on WM and allows you to manipulate It virtually any way you wish. It does this by means

PAGE LAYCXJT SCBEB4

of user defined "blocks" for the page layout.

There are three types of blocks - Text, Graphic or Box. The first, the Text block, must be used to contain all text on the page. TMs is not as restrictive as it sounds. Rectangular blocks nr^y be created and/or deleted very easUy, resized, renumbered, and nwved around the page.

The page is an area of akxxjt half the screen, set up on the right of the nxxiitor. AU blocks are visible on the page when being created or nrwdified but disappear when the page is "Viewed" prior to printing. To

"View", V Is pressed and the text automatically "pours" into the text block and flUs it, stopping when the block is "full". Text may be forced into another block by using the "FORM" coRYnand on a command line in the text. This is all visible in the preview. (See the Illustration below.)

Graphic blocks are created by pressing SHFT 9 (GRAPHCS). When the name of a graphic in memory is entered, it fills the block created. These may also be moved and resized. The restriction here is that the graphic must be a file created with HEADUNER. This is also quite simple, and when a file is created from a screen, it actually compresses the number of bytes used to allow you to store more screens (or parts of screens) than would normally be possible. For example, the graphic of the page layout screen you see above is stored In only 5139 bytes with HEADLVyER after being created from an NM SCBEBi$ save using LARKB4 DOS. Unfortunately, HEADUNER loses the bottom 2 lines of the SCBEEm when it loads it from disk.

Boxes nnay also be created. There are six styles of Box available - horizontal line, vertical line, rectangle, thick line rectangle, shaded line rectangle and double line rectangle. These are used to place borders around text or whatever other use may come to mind (for example, separating colunrvis of text).

WhUe using TYPEUNER, the text may be edited at any time simply by pressing "E". You

SINC-LINK

11

2068

may also move to any block of text before edtttnQ by steppino throuc^ the blocks using the "N" and keys. Each text block may have its own Justification, either fill, left, ris^t or centred, by using command lines in the text Fonts may be selected (12 are provMed with the package) using number codes

correspondino to their place in the fonts listing. The fonts used mm be varied at will and may also be modified using the font editor so you can create your own personal font (on a 24 by 24 point grid).

HEAOUNBV as you miflht expect, may be used to create headlines. it has a limited

graphic capabWty. allowing straioht lines, rectanglss, arcs and circles to be drawn. When printed with TYPEUNB^ each graphic is printed with two passes of die print head (text is printed with three passesi) so the quality is quite good. Shading is possible and the user msM define his own patterns for shading. There are 6 large fonts (6x6 characters) supplied - Ught. BoM, Outline, Data, Roman and Stadkvn (see the Illustration belowX Each may be varied in height and width to t%M> sizes and may be printed In Bold and Italics. A program is also provided to allow conversion of other fonts (1x1 character only) like those used

with PIXB. PRNT by Stan Lemke.

I could go on and on about these spectacular programs but the best way to find out about them is to try them yourself (your printer must be capable of ESC "K- - 60 dpi and ESC - 120 dpi graphics and ESC "J* - n/216th8 line feed). They are now for sale in North America by Jack Dohany who, apparently, has nwde some modifications to add extra features. If anyone would like to contact him, his address is - Jack Dohany, 435 Woodward Way. Athens GA 30606. He also supplies extra font&

Light Bold Oy*

Data Roman :d'J'jiDJ]Ji:J

HEADUNER FONTS

2

SINC-LINK

2068

File Header Reader Larlcen TS2068 by G. Chambers

Here is yet another header reader. But this has some interesting features about it that will interest you. Even if you have a header reader which satisfies you this program has a number of programming techniques which are worth more than a passing glance.

The program POKEs code into a part of the memory which we seldom use, namely just below the system variable area. This was selected purposely. If you have a Larlcen RAMdisk this block of code can be stored as an integral part Of the OMNIBUS program, m fact the code car^ stored m any AUTOSTART program, and used independantly of this Basic program. When stored there, a simple PRINT USR 24800 will produce a near-instant screen listing of the disk m the drive the Larken system is currently pointing to. If necessary, change the drive by prefacing the command with a PRINT USR 100 J GOTO X (where x = the selected drive number ) .

Put the code into an AUTOSTART program by first running this program to get the code into the 24800+ area of memory. Then do a SAVE with the command 'PRINT USR 100 j SAVE "code. CI- CODE 24800,178'. Load your AUTOSTART program, and then load the just-saved "code. CI" file. Now reSAVE the AUTOSTART program (with the NMI-button and "D- key, of course). It's done. Test it by breaking out of the program, and doing a PRINT USR 24800. Or if the AUTOSTART is a menu program you could introduce this function as one of the menu options.

If you are using the OMNIBUS AUTOSTART menu program and have stored the code as described above you can -REM" LINE 7 of this program, since you have no need to move the code. This will speed program initialisation.

The address 24800 was purposely selected. The AUTOSTART program on the OMNIBUS disk (TTSUC Larken library disk #2) has a number of other m/c utilities stored in the memory area 24311/24989, and this was the last remaining space! If you wish to store the code in another location you may do so by using the m/c program reloc8.Cc, found on the OMNIBUS disk also.

This program can print to the screen, to the TS2040 printer, or to a large printer. It does this by pointing channel #2 to the desired output device. Normally channel #2 points to the screen, and that is where you see listings, etc. In the program LINE 330 causes the output to appear on the 2040 printer, while LINE 340 points it to the large printer. After the disk has been read LINE 370 points the computer back to the screen.

This program has been set up to work with an SCM Fastext 80 printer. You will probably need to customise it to suit your printer. The arrangement allows you to selct a normal printout, or one in compressed text form. Look at lines 290, 440, 460, and 470. LINE 290 first does a GOSUB to 460 (to restore the large printer to normal operation), then does a GOSUB 440 (if compressed text mode has been selected). The lines 440, 460, and 470 are essential to ensure the printer functions are properly set. Line 470 is used to delay computer operation until the printer indicates it is ready for the next printer instruction.

Without it, the computer sends the instructions quicker than the printer can accept them, and they are missed. You will probably need to modify the value of 108 shown in line 470. You need to determine what code your printer returns to the computer as a "ready" signal. To do this, do the following test. With an empty computer, enter the following program line:

10 PRINT AT 10,10;" AT 10,10;

IN 127: PAUSE 50: GOTO 10

Note the numbers that appear when you printer is turned on and off. The number you should put into you program is the one that appears while your printer is on. Some printers require that paper be present before they are really ready to go. Put paper in!

LINE 300 provides for printing two labels Side by side on a large sheet of paper, as a paper-saving measure. Print labels on the left Side of the sheet, then roll the paper back and print on the right-hand side. The values shown m the line (36 and 68) can be changed to print at the desired point on the paper.

LINE 420 will need to be modified to suit your particular system arrangements.

110 BORDER Ij PAPER 1: CLS

120 PRINT AT 2, 2 1 INK 2| PAPER

7>" LARKEN DISK UTILITY v3.0 "

J AT 4,7) PAPER 2) INK 7 j "File He

ader Reader" i AT 6,3| PAPER 2| IN

K 7?" 1990 George Chambers

130 INK 7: PLOT 0,108: DRAW 0,6

2: DRAW 255,0: DRAW 0,-62: DRAW

-255,0

140 INK 7: PLOT 8,114: DRAW 0,5 0: DRAW 238,0: DRAW 0,-50: DRAW -238,0

150 RESTORE 160: FOR n=24800 TO

24978: READ a: POKE n,a: NEXT n

160 DATA 205,134,97,175,50,29,3 2,205,126,0,205,123,0,33,136,32, 17,112,52,213

170 DATA 175,18,35,126,254,250, 40,14,254,253,32,246,35,126,254, 249,40,240,18,19

180 DATA 24,234,209,26,167,202, 186,0,33,29,32,190,56,9,40,11,24 5,205,129,0

190 DATA 241,24,241,119,205,126 ,0,19,213,205,123,0,33,114,32,6, 6,126,254,46

200 DATA 40,6,35,215,16,247,24, 5,62,32,215,16,251,6,3,126,35,21 5,16,251

210 DATA 33,124,32,205,94,97,19 5,82,97,24,187,1,1,0,33,134,32,2 05,94,97

220 DATA 62,13,215,195,10,97,62 ,32,215,78,35,70,33,9,0,205,138, 97 33 99

230 DATA 0,205,138,97,33,231,3, 205,138,97,33,15,39,205,138,97,5 8,100,0,251

240 DATA 205,233,48,205,161,49, 243,195,98,0,167,237,66,216,62,3

SINC-LINK

13

2068

2,215,201,0,0

250 RANDOMIZE USR 100: OPEN #4, "dd"

260 LET drv=0: PRINT #4: GO TO drv

270 POKE 23658,8: INPUT "Select 2) Screen 3)2040 5) Large "jptr

280 IF ptr=5 THEN PRINT #4: PO KE 16094,8: INPUT "Choose Column : Deft R)ight "jb$

290 IF ptr=5 THEN INPUT '•N)orin al or Oompressed "}C$: GO SUB 4 60: IF c$="C" THEN GO SUB 440

300 IF ptr=5 THEN IF b$="R" TH EN PRINT #4: POKE 16094,(68 AND

c$="C")+(36 AND c$="N")

310 PRINT AT 20,0) "Drive Now>"j drv: INPUT "Select Drive "jdrv

320 IF drv<0 OR drv>4 THEN GO TO 310

325 PRINT #4: GO TO drv

330 IF ptr=3 THEN OPEN #2,"p"

340 IF ptr=5 THEN PRINT #4: OP EN #2,"lp"

350 CLS : PRINT : POKE 23658,0:

INPUT "DISK TITLE "jC$: PRINT " Disk Name: "j C$

360 PRINT AT 2,0: RANDOMIZE USR

24800

370 PRINT #4: CLOSE #2

380 IF ptr<>2 THEN PRINT AT 16

390 POKE 23658,8: PRINT 'TAB 1 0?"End of file"'" Press a key

to continue": INPUT "another? Y /N "jb$

400 IF b$<>"Y" AND b$<> "N" THEN

GO TO 380 410 IF b$="Y" THEN CLS : GO TO 270

420 PRINT "Going to RAMdisk in 10 seconds": PAUSE 500: PRINT # 4: GO TO 130: PRINT #4: NEW 430 GO TO 380

440 GO SUB 470: OUT 127,15: GO SUB 470: OUT 127,27: GO SUB 470: OUT 127,48: GO SUB 470: RETURN 450 STOP

460 GO SUB 470: OUT 127,18: GO SUB 470: OUT 127,27: GO SUB 470: OUT 127,50: GO SUB 470: RETURN 470 IF IN 127O108 THEN GO TO 470

480 RETURN

490 PRINT 8000 INK 0: PAPER 7: BORDER 7: C LS : LIST 8010 STOP

9000 PRINT USR 100:SAVE "header. B2-LINE 100 "«daer.

x****x*xx*3t****x*** CCRRECTICN **titi:ictttttttttt*tt xx*****xxx Q'^^js. USES FOR LARKEN RAMDISK x*****xx*«*x*xx ARTICLE MAR-APR *9(!l x************

XX*XX**XXXX«***************X*X**********XXXXXXXXjlr5v

Most hurils apologies to anyone vho tried to

create a BASIC AROS by foil owing my instructions.

The following corrections will remove some of the

frustration: 1. The LOAD statements m two of the

sections of the article will need to have

RANDOMIZE USR lU added. 2. In the "CREATING AN

AROS" section: line 30 should have FOR X= 32768

not 52768. The instruction in para 6 should read:

GUT 244, 242: RANDOMIZE USR 13«!: LOAD "test. CI"

CODE 32776: CUT 244,0. Once again, sorry!! Larry C ttfktttttttttttttticfktKfkttttttt'k'kttlit'KtttttttKttt

In addition to George Chambers Modifications to Pixel Print + I have found one more ujh i c h is quite important

In Line S4.S0 change the

"GO TO" to a "GOSUE".

I n o t i c e d t h i s e r r o r i.u hen I i.ue n t t o L O R D a n I c o n and the 206S gave me a "RETURN UITHOUT GOSUB " error.

I r e c i e v e d m y copy quite recently so I assume that most of you might stilL have this Pr o b Lem .

find r eLU

:e t te i

PIXEL PRINT PLUS

Note: The Pixel Print Plus suite of programs includes an Icon Library. The instructions for this library, called the * Icon Library Manager User Guide' were originally on paper. One of our members, Les Cot t re 11, has recently converted them to PP+ format. This 'page* has been added to our PP+ library disk #10, We are including print-out of this page in the newsletter for the benefit of members who may have received a copy of PP+ (minus this sheet) from our disk library.

SEE NEXT PAGE

SINC-LINK

2068

Icon Library flanayer User Guide

The ICON LIBRARV MANAGER is. as it's name i rrip 1 i es an I UUN 1 i brar i an . U i t h this f:'ro9rarri. mou are able to browse thru 3 file of up to 115 ICONS: view each one. enlarge it. place a box a r o u n d i t , p r i n t i t ( T S 2 O 46 p r i n t e r o n 1 y ) .. s a '.' e it o u t i n S C R E E N $ o r t h e Pl)i£L PRINT DESKTOP PUBLISHER format

j h e n L 0 A D e d .. t h e main lib r a r y s c r e e n ill be d i s p 1 a y e d 0 n c e y o u h a e loaded in a library. ICON 1 will be s h o w n , a s well as h e f i r s t 1 0 I C 0 N titles. If you do not load a library t { "I e I C 0 f ^ s c r e e n a n d title b 1 o c k s I ..1 ill be e m p t y . N e a r t h e b otto m o f the screen a MENU line will be

displayed 'Iwhen it is available

ICON not being drawn). To select any item, just pr&ss the key associated with the first letter of the option.

ICON <I>

ICON prompt ICON from number between sel ect ion wi 1 1 title displayed N o t e : The ' lib r a r t h e n e t n e w I

seie. a s s o ' must

you to select a new the library. INPUT a 1 and 115. Vour be drawn and the (above the ICON), i an ' keeps track of ' 'I \ ] n u m b e r t h a t y o u

t t o r e d u o e t h e , S A V E ' " LOAD time i a t e d w i t h t he 1 i b r a r y > , so y o u LOAD I CONS seoiuent i a 1 y .

LOAD (L>

LOAD

i n t o

opt i

the

ICON

your

for

LOAD

aske

o f 6

des i

t

on

PCS

1

an by

d

oh red

1 1 he + o it Th ib

y p t o a r n

ows you to LOAD a new ICON library. Use the ICON set the library pointer to ion you wish to store this be at the bottom of as a replacement ICON. Then select •' L . Vou wi 11 be an ICON name/t it le

IS can or

9

r e s s 1 n 9 INPUT

ex i st i n<

act ers ame .

or less. Type in the

"After the name/title is INPUT. you will be asked to verify that you really want to LOAD an ICON. ... PRESS E T E R t o c o n t i n u e w i t h the LOAD. At t h i s p o i n t .. i f y o u p r e s s an y o t h e r key., the LOAD function is cancelled, but the name'''title will be placed in the file library. This ig,^^' effect--

ivg, of c^h^nqiria •aQ,l£;QN naml

without chanQinQ the

SftVE (S> Pixel Print foraat

Save allows vou to SAVE the bytes of the selected ICON. The ICON will be saved using the existing ICON name -'title in the library. NOTE: This is the same ICON format used by the Pixel Print DTP.

COPV <c>

C 0 P V p r o V ides y o u i i t h a variety o f functions in addition to sending a graphics screen -dump to the TS 2046 printer. Vou can select the desired size <1 to 3 times the standard size)., place the ICON anywhere on the screen, and draw a box '-'frame around it if you desire. S^ou can also choose to SAVE the SCREEN*.

ICON SIZE?

INPUT the d€isireci ICON size <1 to 3 times normal). bIZE 1 is 32 pixels wide, 5S pixels high. SIZE 2 is 64 w i de and 116 pixels high. SIZE 3 is 96 pi.xels wide and 174 pixels high.

INITIAL coLunn?

I NPUT t he pixel co 1 umn < O left screen edge. 255 for screen edge )_ t hat _ you want

for the the right to be the your ICON. If that will place the screen, it as needed

left - m o s t c o 1 u m n f o r y o u s p e c i f y a c o 1 u m n part of the ICON off w ill be ad .j us t ed aut omat i ca 1 1 y .

IMITIAL ROU?

INPUT the pixel row (175 for the tof? of the screen, 6 for the bottom of the screen) that you want to be the top -most row of your ICON. Again, if you specify a row that places your ICON off the screen, it will be adjusted for you.

BOX BORDER? <V/n>

Press V to place a 'BOX" around your ICON. Press any other key for NO BOf<

Uhen the ICON d e f i n e d it...., a n o t h e r 3 item

is completed as you you w ill _ _be g i ven

menu

SCREEN*

COPV

RETURN'. Select SCREEN* by pressing ■S' to SAVE the SCREEN*. Vou will be asked for the SCREEN* name. . . . INPUT a name 6 characters or less. Select g C ' . This sends a the TS 2040 printer, by pressing 'R'. This you to the library

COPV by press in

s c r e e n - d u m p t o Select RETURN will RETURN screens-menu.

PRINT <P>

PRINT will give you a TS2040 printer listing of the ICON library names in your file. This is a handy reference to print and keep on hand;

QUIT CQ>

Quit will take you to Basic. Vou will be asked to PRESS ENTER to QUIT. Press any other key to RETURN to the library. If you PRESS ENTER you will be asked if you want to SAVE your LIBRARV before '^stopping'. Press 'V' to SAVE your ICON library. Press any other key to '6T0P.

NOTES:

At any LOAD-'VER I F V error (or after ■' ciu i 1 1 i ng ' ) , you can re -ent er t he library simply with RUN (ENTER).

Vou can make a ICON LIBRARV QUIT command

personal copy of the NANAuER after using the with: RUN 9999 (ENTER).

SINC-LINK

15

1X81

Impr-oving -tH^- XSIOOO R. Bruneau

Many articles have been done about improving Uncle Clive's "Door Stop" ever since he introduced the ZX-81 way back in the early 1980*s. Some improvements, particulari ly the commercial products, require little or no modifications to the basic computer. Others, such as the John Oliger Video Upgrade, the Bent Rom, and internal 64K memory reqiure some trace cuts and soldering.

In general, improvements to the TSIOOO can be divided into three categories:

1. Basic Modifications

2. Memory and Display

3. Peripheral Devices

All of the following improvements are covered in magazine or news letter articles or technical books available from the club book library or from club members.

Basic Modifications;

- Stronger power supply (1 amp. or greater) with a power switch.

- Replace the heat sink on the voltage regulator with a larger one to run cooler.

- Install a reset button to recover from crashes.

- Change the components of the LOAD and SAVE circuitry to improve the loading and saving of programes.

- Mount the computer and external add-ons on a rigid base.

- Install a real keyboard by hardwiring it to the CPU board. Improve performance by replacing the keyboard diodes with a LS245 IC to buffer the keyboard.

Memory and Displav;

- Install a composite video output and purchase a composite monitor ($50.00 or less from surplus).

- Install 8k static ram internally in the 8-16k area of the TSIOOO memory map. Added advantage: Hi-rez graphics are now possible.

- Install up to 192k of static ram and epr oms internally. Hi- rez graphics.

- Replace the ROM with an EPROM (the BENT rom is an example) .

Peripheral Devices;

- Printer interface for big printers

- Keyboard interface for those who don't want to modify their computers.

- Programable interfaces for process control

Imagine a TSIOOO monitoring the heating and air- condtioning in your house, activating shades, attic fans, solar heating..

- Convert the TSIOOO into a colour computer (the John Oliger Upgrade)

SINC-LINK

QL

The C Page,

By Tim Swenson

Hopefully last month's column perked your interest in C. This month we'll take our first look at the language.

C is a structured language similar to Pascal. Many of the same ideas and contructs are used. In C, all variables must be declared before used. The idea of functions encompasses SuperBasic's ideas of procedures and functions.

C has FOR, WHILE, and REPEAT UNTIL loops. IF statements are treated the same as in SuperBasic. C also uses begin and end marks the same way that Pascal uses BEGIN and END. C uses < and } for this.

C is a very terse language that is not at all as easy to read as english. Where some Pascal programs can almost be read as straight english.

Let's take a look at program 1. This is a short program that will print out the string "Hello World" on the screen.

The /* and */ mark the begin and end of comments. The include statement loads in a standard file that is used by C. Any file that ends in _h is usually a header file that includes things like constant definitions.

The heart of the program starts with main. Every C program must have a main function. The compiler starts execution with the function main.

After the begin mark (<) comes the single line of code. Printf is a C library function that prints data to the screen. C is not very powerful 1 and is made mostly of functions. A lot of necessary functions are in the standard C library.

At the end of the program comes the end mark. As is, this program will compile and run (I've tried it).

Now that you have a better grasp of the structure of C, next month we'll try a bigger program.

/* Program 1. */

♦include <stdio_h>

mainO {

printf ("Hello World\n");

>

SINC-LINK

The

QL LIBRARY continues to grow.

QL News Chaos Buster

We have had a number of significant additions in recent months, some of more or less general interest, others of more specialised interest. All are welcome be they small or large. So please send in your latest creations, if you like it, you can be sure someone else will like it.

From Real Gagnon in Montreal who was the publisher/editor of QL-DOC, we have a nice little Archive programme which will allow you to keep track of your Video Collection We have a number of his productions in the library already. Thank you Real.

Howard Clase in Newfoundland has sent in a nice little programme which gives you the power to design your own windows in SuperBasic without having to go through a whole stack of co-ordinates. This can be merged into your own progrwmmes. He calls it 'GLAZIER'. Nice name, nice to use, and Oh so easy. Makes a tough job interesting.

Howard has also given us permission to distribute his programmes which are in the QUANTA library, this is a real honour. One is a calendar program, then we have some- thing to test your chemistry knowledge. A routine to close an Archive file left open. Fount designers. A set of procedures useful to beginners. Lots more. This should let you see how diversified Howard is. Welcome to the club Howard.

A little while ago I purchased Chaos Buster from Bill Cable, Wood and Wind Con^ting. A really worthwhile collection of softwares designed to operate within Archive. Included with the di^ were two public domain programs, the first one ARnWffinC is a combination of the four basic operations AODITION, MULTIPLICATION, SUBSIRACTION and DIVISION . The results are displayed and it is possible to obtain a print-out to track your progress or lad< of ! ! ! .

The next program is called TASKET and is a multitasking software similar to TASKMASTER . Both of these programs as well as the associated DOC files have been placed in our QL Library and are available from H.Howie under the usual conditions.

Louis Laferriere

From Arnold Nieuwennoff in Sutton, MA. USA we have a couple of adaptations from 2068 to QL. One shows Standard Time and Star (or Sidereal Time) running to-gether. The other will calculate the distance in miles or kilometers of any two points on earth, a real must for the armchair traveller, and does that not just about cover us all?

Then Timothy Swenson in Washington who has contributed in the past, has let us have a compiler, 'Small-C which should be of special interest to many. Tim has spent a lot of time on this. Fills a 40 track 720 disk.

I can handle 5 1/4 40 or 80 track, or 3 1/2 disks. For cartridges you can work it out for yourselves. Don't forget the postage. (USA please send cash or money order.) Don't forget formatted media.

The clubs thanks go to all contributers. If I have missed anyone or anything, my apologies. Blast me for it. Please

Fru the OL Ubrary Randoi Blocks

Quantui Levels had this spectacular deio by Frank Toeiay of Quantui Copting.

This is interesting in 6 & H, but in colour, it is outstanding. All tt« colours the QL can produce are depicted in a rapidly changing pattern. There are three patterns to select friii.

There is also a YELL which shrieks altmq with the den. This shriek can be stilled by eliiinating a few lines in the listing.

H.H.H.

See next page

Hugh H. Howie. QL Librarian.

SINC-LINK

le REMark by Frank ToeHy

29 f£Hark of iXiafltta Co^xiting

30 REHark Frn Quantia Levels 49 REHark This is a siall deio

5^ :

66 )iim ie,5i2,45,e,211

?e «INDO« 11,512,299,9,8

89 HINDON 12, 512,187,9,22

99 PtfER i9,9:PflPER 12,9

199 INK 19,7 : IMC 12,7

119 BQRDERie,2,18e: BGRDERt2,2,22

129 !

139 DEFine PROCedure Rbks

149 BORDER 4,6:PfiPER 7,1,2: CIS

159 FOR 1=9 TO 255,254 TO 9 STEP -2

169 BEEP -llie,e,l,l/2,l+(l/44),l/18

179 BLOCK RND(i9 TO 37S},RND(16 TO 14S},RND(S T

0 197),Rlffi(5 TO 47),1

189 END FOR 1: PAUSE 259

199 END DEFine Rbks

299 :

219 :

229 :

239 DEFine PROCedure layers 249 SCALE 175,9,9:60RDER 5,2 259 OVER -hRANDOHISE RNDt63333 269 FOR pass =1 TO 3

279 FRNDdS TO 155): d^(25 TO 244):cHM(4 TO 8

): PAPER RHD{0 TO 7}:CLS

289 FOR tF9 TO 179 STEP ctS

299 INK RW)(9 TO 255)

399 FOR a=9 TO 275 STEP c:LIfE d,e TO a,b:BEEP -79,9,19+ {alb)/2,Hb,l+(a/49},a/69

319 LINE 9,b TO a,b:FOR blp=l TO 11:BL0CK 499,195,

H,9,RND{9 TO 255)

329 BLOCK 499,195,9,9,RNDI9 TO 7) 339 END FOR b:PAUSE 44+(|)asstl9) 349 END FOR pass:OVER 9: PAUSE 299 359 EM) DEFine layers 369 : 379 :

389 !@iark tit The Nenu Area ttt

399 REPeat Dewnstrate

409 MODE 9:B0RDER 5,56:IMC 9iPm 4:aS

419 CSIZE l,9:PRINT\\\,'Baby Deio Braphics Henu'W

429 PRINT\\,'l) Randoi fllKks'\\,'2) Kalidoscopic Blocks

'\\,'3) Run Layers' W, '4) Quit':BEEP

439 q$=IM(EY${-l):IF q$<'l' OR q$>'4':60 TO 439

449 SelVal=q$:SELect ON SelVal

459 =1: HODEOsRbks

469 =2:nODE 8:0VER-l:Rbks

479 =3:riQDE B:layer5

489 =4!CLS.-PRIMTI9\\\\,'A11 Finished! 'rQIT Oei

onstratfi

499 END Saect

599 END REPeat Dewistrate

519 :

529 STOP

539 :

QL

CQ QL SOS

Sharps were offering QL's for less than SIOO. 00 apiece, so I bought two, one for each child. My suspicion was that raicrodrives would last not much longer than cartridges to put into my TS2068. According to the British magazine QL World for February. 1990, you will not be able to buy any more QL microcassettes.

So when Miracle Systems offered their Trump Card with dual disk drive at a sale price, I dug into the piggy bank I keep in the OK and purchased one.

Everything seemed to work fine! lights came on, drives whirred and all that stuff. but when I tried to format a disk ... FORMAT FAILED. About then I read in the QL World that older ROM's might not be able to cope with high speed drives. Back to friendly Sharps to buy a new ROM complete with Eidersoft's I.C.E.

Everything seemed to work finei except that there was a two inch gap along the top of my TV screen and the bottom part of I.C.E. 's display was cut off. After a lot of trial and error I managed nevertheless to reach the FORMAT icon, invisible though it was. Guess what . . . FORMAT FAILED. Any suggestions?

The two inch gap syndrome also happened with a game. In another game the screen display would not hold vertically. I presume other people have had similar problems. Any help would sure be appreciated.

Robin BEAUMONT 226 Borden Drive YELLOWKNIFE, NT XIA 3R2

SINC-LINK

19

2068

323 1/2 N. Church Street Bowling Green, OH 43402 April 16, 1990

Dear George,

Here is the ml version of Tas>MS, as I talked about m my second letter past. I have gotten Bob Mitchell to test it out for me, and he says it "works very well and very fast."

You will also find a pseudo-assembly listing of the two^ code routines. Since I don't actually use an Assembler, I find it easier to do my "assembly" listings in something that comes a bit closer to BASIC than any typical assembler. It is easier for me to read, and hopefully easier for anyone else to understand as well.

As far as what this code does. It implements a few other suggestions I made to Bob concerning his original program.

The code has been designed to perform best with unjustified text. As such, it therefore only removes spaces which occur at the end of lines. This means that if the text includes any tables, it will not remove the formatting from between table entries. As with Bob's original code, however, it does add a space at the end of every line if the text calls for it.

In addition, it automatically takes care of most paragraphs. If the paragraph is seperated by a blank line or is indented, it sees a line that begins with a space, which signals the code to put a CHR$ 13 in the file, which MScript uses to seperate paragraphs. The only place this will usually get you into trouble is where the entire paragraph is indented - a format used for quotations in formal papers - or in tables or listings. In the latter, some or all of the lines might not begin with a space, so you will need to add the ENTER manually.

I am not sure how fast the original Timachine compiled version of Tas>MS was, but I am sure this will be much faster. On the files I tested it on, it was too fast to time. Bob tells me it did a 13000 byte file - about the maximum size it can handle - in just over a second. Either way, if you blink, you will miss it. That, and you don't have to have a copy of Timachine to compile it, are the main reasons I thought this was a good thing to write in ml.

The first routine in the listing has the sole purpose of clearing the area the Tasword file will occupy. Among other things, this allows the second routine to automatically find the end of the file, which it does in the first 7 lines of code. So to run it, all you need is the name of the Tasword file. Also, the code returns the length of the result directly, so there is no need to have a PEEK for this.

I have included some error checking in the BASIC to create the Tas>MS, so you don't have to find out the hard way that one of the numbers is wrong.

I hope this program will be useful for the other members. I don't have MScript, but I might write another version for my word processor. Either way, it is short and quick enough that anyone should be able to find space for it. Oh, don't try to use it on the same file twice, the results might be a little strange. It SAVEs its files with the same ".CT" that Tasword

SINC-LINK

2068

uses, 30 make sure you know whether or not the file is actually a Tasword file if you might have changed it already.

Well, I guess that is all I have to say about it. I hope you had a pleasant Easter. Looks like I have certainly done my part to keep you busy this issue. Peace, and God bless.

S incerely.

P.S., I will print the rest of this in 12 pitch, since I think that will look better for the newsletter.

Machine Code: (for unjustified text)

First Routine: clear buffer

FFOO 21 00 6C

FF03 54 5D 13

36 20 FF08 01 00 4B FFOB ED BO FFOD C9

FF04 FF05 FF06

:HL = 27648 (Start of Tasvord memory area)

:D = H :E = L :DE = DE+1

:POKE HL,32 (CODE " ")

:BC = 19200

:Block Move

: RETURN (to BASIC)

Second FF14 21 FF17 3E FF19 2B FFIA BE FFIB 28 FFID 23 FFIE 22 FF21 21 FF24 11 FF27 06 FF29 OE FF2B BE FF2C 20 FF2E EB FF2F 2B FF30 36 FF32 23 FF33 EB FF34 ED FF36 EB FF37 2B FF38 BE FF39 28 FF3B 23 FF3C 77 FF3D 23

Routine FF B6 20

FC

56 FF 00 6C 4F B7 00 40

06

OD

Reformat file

BO

FC

HL = A =

46847 32 (CODE

)

HL = HL-1

IF A = PEEK HL (A is CODE " " throughout) THEN GOTO FF19 HL = HL+1 POKE 65366, HL

HL = 27648 (Start of Tasvord text file) DE = 46927 (Start of MScript memory area)

0

B = C = IF A

64

<> PEEK HL THEN GOTO FF34 Exchange DE and HL HL = HL-1 POKE HL,13 HL = HL+1

Exchange DE and HL Block Move Exchange DE and HL

HL = HL-1 IF A =PEEK HL THEN GOTO FF37 HL = HL+1 POKE HL,A HL = HL+1

SINC-LINK

2068

?F3E

E5

PUSH HL

FF3F

2A

56 FF

HL = PEEK 65366

FF42

A7

A = A AND A (Clear carry)

FF43

ED

C

■J L

HL = HL-DE

FF45

El

POP HL

FF46

EB

Exchange DE and HL

FF47

30

EO

IF DE <= End THEN GOTO FF29

FF49

EB

'Exchange DE and HL

FF4A

11

4F 37

DE = 46927

FF4D

36

00

POKE HL,0

FF4F

23

HL = HL+1

FF50

A7

A = A AND A (Clear carry)

FF51

ED

52

HL = HL-DE

FF53

44

B = H

FF54

4D

C = L

FF55

C9

RETURN (to BASIC)

ML loader program,

10

LET

t = 0

100 FOR i=l TO 86 110 READ a 120 POKE 65279+i,a 130 LET t=tfi*a 140 NEXT i

150 IF t<>428022 THEN BEEP 1,1: PRINT "Error in DATA!": STOP 200 RANDOMIZE USR 100: SAVE "Ta

s>MS,Cm" CODE65280,86 500 DATA 33,0,108,84,93,19,54,3

2,1,0

510 DATA 75,237,176,201,0,0,0,0

,0,0

520 DATA 33,255,182,62,32,43,19

0,40,252,35

530 DATA 34,86,255,33,0,108,17, 79,183,6

540 DATA 0,14,54,190,32,6,235,4 3,54,13

550 DATA 35,235,237,176,235,43, 190,40,252,35

560 DATA 119,35,229,42,86,255,1 67,237,82,225

570 DATA 235,48,224,235,17,79,1 83,54,0,35

580 DATA 167,237,82,68,77,201

BASIC program to control ml 100 RANDOMIZE USR 65280 110 RANDOMIZE USR 100: CAT ".CT

•I

200 INPUT "File Name? ";LINE n$ 210 IF n$="" OR LEN n$>6 THEN G OTO 200

220 RANDOMIZE USR 100: LOAD n$+ ".CT"CODE 27648 250 LET len=USR 65300

260 INPUT "SAVE file as: ";LINE s$

270 IF s$="" THEN LET s$=n$ 280 IF LEN s$>6 THEN GOTO 260 290 RANDOMIZE USR 100: SAVE s$+ ".CT"CODE 46927, ien 300 PRINT #1;"L0AD another file

? (Y/N)" 310 PAUSE 0: LET s$=INKEY$: IF

S$="Y" OR s$="y» THEN GOTO 100 320 IF s$="N» OR s$="n" THEN ST

OP

330 GOTO 310 9800 RANDOMIZE USR 100: LOAD "Ta S>MS.Cm"CODE 9810 GOTO 100

9900 RANDOMIZE USR 100: SAVE "Ta s>MS.Bm"LINE 9800 9910 RANDOMIZE USR 100: SAVE "Ta s>MS.Cm''CODE 65280,86

ANLQ WITH YE OLDE FASTEXT 80

by

Philip Hudsmith

As we all know the Fastext SO is great for draft quality. If only it would give us NLQ we'd all be delighted. Not only that, we'd shelve our plans to buy an NLQ printer and buy a Larken Interface instead. Nell - maybe.

Button up your seat belts. It is possible to achieve ANLQ or almost near letter quality provided you have time and patience and a good eye. All you have to do is pass the same sheet through the Fastext about 3 times, making certain that the registration is relatively accurate.

I printed this letter up Just that way so you can see what it looks like. Remember I said ^ Time & Patience. ' No problem at all. All Timex Sinclair Users have that.

SINC-LINK

2068

TS2068 ROM DISASSEMBLY prepared by BOB MITCHELL 20 Wild Briarway WILLOWDALE ONT M2J 2L2 900611

Recently, I decided to develop a disassembly of the code contained in the TS2068 ROM. The procedure required the use of the Larken Sequential /Random filing system which is a software product available from Larry Kenny. The LKSR code allows for the saving and loading of as much data as can be held by one disk; whereas the Version 3 EPROM system is limited to 21 tracks per file name. Armed with both systems, I proceeded as follows:

STEP 1

LOAD DISASSEMBLER. OPEN SEQUENTIAL FILE VIA LKDOS.

My procedure for capturing the ROM consisted of first using the Larken Version 3 EPROM RND/SEQ commands to read the output from a disassembler onto a disk.

For a disassembler, I chose Monitor (aka Spectramon) with its deficiencies but with the advantage of sending a line feed every 32 characters. This character (13) provided a separator as required when using the Larken LBASE system. Monitor is a version of Spectramon which appeared in Personal Software back in 1983; I had converted it to TS2068 and mended a few errors in the mnemonics code, then compiled it using Timachine to make it run acceptably fast. (HOT Z is a very good disassembler but it sends no separator at the end of each disassembled line; it did not therefore fill the bill for this particular application.)

Having loaded Monitor, I then broke to BASIC and did <RANDOMIZE USR 100: OPEN #5,"R0M1 OUT" > to a selected drive with a fresh disk inserted; the drive turns as the file is opened. I returned to Monitor and started the readout at OOOOH, setting the limit at 3CFF. The SAVE went very well with the drive whirring every little while as a track was filled; that is up to 21 tracks. At that point, the computer gave me a "DISK FULL" error report. I tried various tricks to get more than 21 tracks to load into one file name on the disk, but to no avail. (I later confirmed by telephone with Larry Kenny that 21 tracks is indeed the limit using the LKDOS EPROM.)

I continued on saving sections of code until I had finished the job: in four sections of about 20 tracks each. Each section required a different file name + OUT; ie, "R0M2 0UT","R0M3 OUT" and "R0M4 OUT". This ended the use of the LKDOS EPROM commands.

STEP 2

READ SEQUENTIAL FILE INTO LBASE VIA LKSR COMMANDS.

Now, I started to read these four files into LBASE (my 512 byte version) ; this employs the special Larken Seq/Rnd (LKSR) code imbedded in a REM line at the start of LBASE. This code must be purchased from Larry Kenny; he also provides a rudimentary form

SINC-LINK

2068

of LEASE which I developed into my version.

To do this, I MERGEd a special line 8030 contained on the disk as Ibase.BM. Entering <G0 TO 8000> started reading and saving 16 lines (512 bytes) into each record; as each file was read, the additional records were added onto the end of the previous data. There was now no longer a problem exceeding 21 tracks.

When all was done, I loaded the complete single file into LEASE and scanned the results particularly around the "join" areas between the files. I found that I had missed two bytes in one instance and quite a few in one other case. I don't know why. Further examination revealed that the SAVE via the EPROM had indeed caught all the bytes; those that went missing seemed to have done so during the loading into LEASE. So my routine in line 8030 is suspect; however, I did not try to do anything with it as I could not see what I could do.

I got around it by writing some additional BASIC in LEASE to read and save records from a start number to an end number, using the TAB command and a simple FOR. . .NEXT loop. I read and saved all the records up to an including the one just before the missing two bytes. I then loaded this portion into LEASE proper <G0 TO 1> and did an ADD to put the missing bytes into their own 512 byte record; next I started again with the next portion from just after the missing two bytes up to where I had missed quite a few. I repeated the same procedure, adding manually the code for missing bytes.

This area turned out to be the "constants" table and the "calculator" table which I typed in as DATA. I knew what the missing bytes were by having a copy of the disassembly of that area done with Monitor. Compressing the DATA into fewer lines left several records with redundant DATA which I erased line by line and simply marked them by entering "Blank Record".

There is a routine in my LEASE to copy a file and skip some

records; this was a rather tedious job with close to 600 records

and only a handful of blank records to erase, but it had to be done so I went ahead.

STEP 3

EDIT THE TEXT.

Now I had the rough ROM disassembly in LEASE format as opposed to LKDOS EPROM format. It now needed some considerable editing because there were still numerous tables and floating point calculator instructions that had to be deciphered manually. Fortunately, I had a copy of a Spectrum ROM Guide to help me locate and decode the tables and fp instructions. Most of these followed the Z80 Instruction RST 28H (from two to many bytes) which turns on the fp calculator; as well as some single byte error codes following RST 08H. Some disassemblers identify these bytes as DEFB but Monitor does not. In any case, locating RST 08H and RST 28H always identified the following bytes as DEFBs.

During this process, I had to use some short forms to conserve space on individual lines and these were for the fp instructions. Here are a few examples with some brief notes:

SINC-LINK

2068

DEFB CODE MEANING SOME SHORT FORMS

38H fp exit fp ex fpex fpx

(this is the byte that turns off the fp calculator) 04H multiply mult mul

C3H store 3 store3 8tor3 st3

(store 3 puts a result into Memory area. 3 of 6) 31H copy cpy cy

(this really makes a duplicate of a result) OIH exchange exch exc

(a becomes b and b becomes a in Memory) E2H get 2 get2 gt2

(fetches the byte stored in Memory 2) OOH j true j tru jtru jtr

(jump relative if the result is true (1); followed by a

displacement byte, say +4)

Toni Baker wrote a series of articles for ZX Computing in 1986 which gave very good coverage of the Floating Point Calculator and if you are interested in this subject, you should have that series .

SUMMING UP

Finally, I had all the tables and the fp instructions done; what you would see on the disk as the file "ROM" is the result. It is quite conceivable that there are some errors in my work. Using LEASE, it is easy to correct them and I'll do that as they are discovered.

My intention in doing this exercise was to build the ROM Guide to be able to use it mainly via the screen, yet to make copies as necessary to do a closer analysis of a particular area of code .

Making a complete hard copy was not my intention but it could be done. There would be some gaps wherever there were blank lines on the screen. Use <PRINT USR 100: LPRINT "name" to make the hard copy.

The code now uses up 55 tracks for over 273 kilobytes, ie, almost 280,000 bytes. It is difficult to imagine how all this data could be captured, edited, searched and saved to disk with the limited memory of the TS2068. I don't have many requirements for storing such a lot of data but this example shows that it can be done using the Larken LEASE code and the enhanced BASIC that I have developed and used.

I intend to provide a copy of the disassembly on disk to the club library; it may be read or printed using the Larken LKDOS PRINT or LPRINT commands, but this is rather tedious and it would be better to access it using the LEASE program. To repeat, you must purchase the copyrighted code from Larry Kenny and then use my LEASE which I will provide to bona fide owners of the code .

***END***

SINC-LINK

2068

26

PIE CHARTS and

MULTIPLE SCREEN DUMPS

In this month Ly contribution, I niant to demonstrate in par- ticular the capability of the T52063 for constructing PIE CHARTS from a given set of val- ues. The program is arranged as a tutorial so that one may substitute other items and val- ues and use it as a utility for a statistical program.

in this illustration u>€ assum ed seven items: salaries, Insur ance, etc. The number of items can be any thing but such a Chart usually accommodates up to 10 items ujithout crowding. If Mou have a -different number of items, Change the values in proqram lines 20, 30, 100, 300, etc. to suit.

Program line 50 contains a correction factor "n" uihich al- lows the resulting pie to look lifce a circle instead of an el- lipse, fls you Know, circles do not reproduce undistorted on the prinout. As we cannot con- veniently correct this distor- tion in the CIRCLE algorithm, it was not used.

This exercise also demon- strates the capability of the TS206S to produce printouts of more than one screen dump. In this instance two screens were damped onto the printer in suc- cession, giving a unified loofc to the chart and accompanying text. This scheme can be used for more than two. if desired, bu a continuation of the pro- cess. Refer to program lines ^30 and 4.00. Uhen the run STOPS at these points, get the print- er ready, and by direct entry do a cONTinue ... .ENTER. Better yet; just delete the STOP com- mands in these lines and the figure builds up automatically.

NOW, how many other computers can do this with such a simple and Short BRSIC program?

Uarren Fricfce

2 REM MODEL^,Of a PI| CHflgT

3 REM ** •X-63", 10-7-87, UF S REM ** UPPER BORDER

7 DRRU 0,175: DRRU 255,0: DRR

U 0,-175 -r.^ 10 REM ** IDENTIFY and J.B l^tr, EURLURTE ITEMS

20 DIM q$(7,15): DIM r$(7,5):

^^30^FOR a=l TO 7: READ q*taJ: .2 ERD r$(a): LET T=T+UflL r$(a): NE

^40 REM ** UNDISTORTED CIRCLE 50 LET n=l.23: REM Cor. Factor 60 FOR a=0 TO 24PI STEP .02 70 PLOT 127+n*80*C0S a,92+80*S

^''^SO^REM^i^DRRU SECTOR RADII 90 LET a=0: REM Starting Angle 100 FOR P=l TO 7 SINC-LINK

1^6 LET a=2*PI*UfiL r$ip)/T+a 120 FOR R=0 TO 30 „^.-t»i 130 PLOT 127+n*R*C0S a,92+R*oiN

140 NEXT R: NEXT P

150 REM ** IDENTIFY, SECTORS

160 PRINT RT 5, is; ^ , : ' A?' 17 ••;flT Q.7;"0S":flT 15.11, R^i"I_f/. ,is;"U";flT 13,22; "JS";flT 11,27;"

^'l70 PRir^T RT 20,1: "SECTORS are" ;rt 20,21; "identi fied" twttt 175 PRINT RT 21,1; "by the INITI RLS 0 f the ITEMS. "

150 STOP : COPY : uLS «^„...,t<= 255 REM LIST ITEMS ^ . ?2g^gl? 260 PRINT RT 1 , 2 ; " ITEM" ; TAB 20,

"DOLLARS" „^ o

270 PRINT OUER l;AT J'2, ^

AT 0,20;" "•• PRINT

151 PRINT='TRB 2;q$(a);TAB 22; r

$ (a) : NEXT a

323 PRINT RT 16,19; .

325 PRINT AT 18,4; "Total

•330 P^IINT AT 20,1; "EXPENSES Of the UIDGIT COMPANY" . 340 PRINT OUER 1;AT 20,1,,

350 REM ** LOUER HALI- BORDER 360 PLOT 0,175: DRAU 0,-175: DR AU 255,0: DRRU 0,175 400 STOP : COPY ..Tn

500 DATA "Salaries", 40563 , in s u r an c e " , " 4.160 " , " Office , Supp 1 1 e

.. .. 4.913" , "Rent" , 25001 , Uti li ties ","14987", "Janitor S|rv. , 8026" , "Deprecx ation , sbsb

I . OS _ '

JS

SECTORS are ^ ^ ttfms by the INITIALS of the ITEMS

■..~..L.

V

identi fied

ITEM

DOLLARS

sa laries

40563

Insurance

4160

Office supplies

4918

Rent

25001

Uti li ties

14987

Janitor serv.

8026

Depreciation

2898

.. 100553

Bob Mitchell 2 0 W i 1 d E r i a r u-i a y Willoujdale Ontario M2J 2L2 900525

Hi Les,

Thanks for sending along the disassembly of PPProf and your other comments. I spent an hour or so last night fooling around luith it all and finally gave up. It is darned difficult to follouj machine code of that complexity. But I'll fill you in on uhat I did and what I have done today.

It seemed to me that somehow there has to be a change of OUT 7 as well as OUT 244 to get everything working. I got the banks to switch but lost my data (ie, sample columns) in the process. To do this I added some code at address 2S930: (the orig code starts at 28950) s

LD A, 240

OUT ( 244 ) , A

LD A, 71

OUT (7), A

RET

NOP

! D A,0

OUT (24 4), A LD A, 8 our ( 7 ) , A

Then, 1 put in some CALLs to the two addresses 28930 and 28940 at 39229, 39236, 39244 and 3925.9 (CD02710000 to the first and third and CD0C710000 to the second and fourth) to bypass the existing code but apart from me^ssing up the contents of my first chip, nothing good seemed to happen.

If I could gE?t this approach to work, it seems to me it would have to be duplicated in the other companion programs which all seems to be the hard way; there may be an easier one. So today, I decided to write to Larry Kenny and ask for his help. I may have to wait a while for this is planting time on his parent's farm and he spends a lot of time on the tractor-

I'll let you know of any developments. I am surprised that Stan Lemke did not follow up on this himself and complete the Job for Larken Ramdisk owners.

The keyboard overlay is a great idea and it would be nice to have similar overlays for other complex programs. I resort to a 3x5 index box with all pertinent info handy within arm's reach for many programs such as Mscript, Zeus, Maxcom, Profile, Tasword, etc, etc» I did a rough Job for HOT Z but it needs work. What we really need is a blank template cut out or with press outs that could be used for a variety of programs but I suppose that would be a special order for some print shop- Will have to stay with the exacto blades!

I had already done some of the fixes you mentioned but I adopted yours for line 5000 although I still use a GO SUB 950 which does

,,,.e L..^rrM rxenny ana asK ror

hav

ior-^tinn<=i, eq, in line 9999 1 have it

the same thing m other l^^-^^-^^"""' f^! •INPUT "Drive #? ";drv:

si-art GO SUB VAL "9ri0"o Line 9S0 reads -INHU! PRINT #4". GO TO drv: RETURN.>.

, ,o .nu fresh thoughts about getting RAMDISK to Well, it you have any ^^^f.*" . 'i;. it's on the back of the

work with PPProf, let rr.e know, otherwise

stove for now«

T i-=.^yinu CRC errors with my last four chips

You remember 1 was having CRC er ^^^^^^ ^^^^^^^ ^^^^^ ^^^^^

mounted on ^oc:U^l^on toP of the I finally gave

rr;alirb-;^b:th^of-Z:.o Residue Cleaner (from Radio ---ck) and the problem cleared up- For

Bha

now

That's about all for no. and thanks again for the info.

Best regards,

Bob

p. 2, TS Bui. News Suppl./^0-90

Amateur Programmer's Line

By Bill Harraer

Amateur programming with home computers has swept through its first phase, that of mass pop-ularity, and is entering a more mature and perhaps level stage of its unfolding. Will it end up as a niche market like the hobby of radio building, which was done by the mass market when a radio was too expensive for anyone less than the quite rich to afford and dwindled off to a niche hobby of radio amateurs and experimenters, by the 1950' s? Something the kids and stud- -nts of a wide variety would still tackle then (like the old crystal sets) but which held the interests of only a few adults, after passing its peak of popul- arity in the 1920' s. Has amateur programming become a niche m the market, ^ a passinf^ stage of school children but a hobby of only a few~adult enthnisiasts?

The home computer has become a reality for perhaps 12% of the homes in America, and perhaps (a guess) two thirds of the homes have an adult usmg^he computpr. But probably it is safe to say that other than word- processing for nersonal ur^e and for runninpr v;ork brought home from the office, only a small fraction of 1% of the home users that are adults do any programming with them and probably only5fo of the students that have a home computer use it for hobby programming as opposed to school assignment programming. So we amateur program- mers are rare birds indeed, „ti,-^„ Now that we know who we are, let's look around and see who are our allies in the battle of the consumer to see the programming hobby supported. The ichools and the school children/ students are natural allies and indeed we profit Considerably from the programming efforts of students, particularly ^at the univ- «?siiy level, whose programs go on to become public domain A crucial early RaItc compiler was done at a US Naval Academy, placed in the public domain and proSabirbeclme ?he starting point for the development ^ of MS BASIC compiler for

DOS (It's separate runtime module looks like the inspiration to say the leas? for the BaIrUN module with early versions of MS BASIC for MS D9S). Many ?nM?ities emulators/ simulators were developed in the schools as assignments or for teaching Th^Utar^^^ Nevada compilers, Pascal, FORTRAN, COBOL, came from univprtitief and offer a way to get into those languages at prices between 4>50 anniOO( compare MS FORTRAN and COBOL at $W-500 plus). The first microcomp- uter Pascal UCSD Pascal using a unique speed code [p-code) which is interpreted durinp extckion to. shrink the memory requirments of a complex language like Pascal to ?he capacities of the early micro-computers, is another case ^ of univ- ersity support!"^ Now even the source code for such a Pascal compiler is avail- ablp f^r anyone who wishes to port it to a home computer (assuming they have an mVcoinpatible and C compiler to develop it on). It appears ^^at the Japanese data/ disk file compression utility LHARC was dona by a student, with the help of his professors. The examples could be paraded on and on.

The^p?ofessIoAal programmers or technical people who wish to work on a prog- ram on their ovm on their home computer and perhaps even sell it someday out of a pos? office box address are other allies. They may have seen some new program or idea in the course of their technical work and want to adapt it, redo it or^ sLp]ify i? for the home computer market. Their ads can be found in the classii- i^ ad sections of ComputerLand electronics) magazines. By the way, dBase III wis born tha? wav by a^rogrammer from NASA, Wayne Routliff moonlighting to make a d^taSase for his earl? kit computer, and the various versions ^^^/^P?; led via dBase II to Ashton-Tate' s current cash cow.x^.Wayne has left Ashton-Tate and his introduced his own database, by Emerald Bay, when he found work stultifying.

Last but not least in support of the amateur programmer are the user groups and th^bu^fetin board system's^BBS) that allow the ^^^^Jfjf^.tf ^r"'

+--;r^o ar^ri tf.r'hninups sources and source code, and a lot or technical aaza. m m rn^t of diik files tha? would be uneconomical to, publish and distribute in the form of disk tiles, tnaT: ^^uia o have submitted a whole realm ,

most other forms. f^^^^.t^^^^^^flT^^^^ loosely 'reverse engineerii^'

^o\%flrs*of mlL^slm^S^nlf ogHi;l^iidS,"|So/amateur programs are typically labours of love.

r.r.nn^i^ftr-^ ^v/ARMmG,: I^,M^^ BILL HARAAER

12jffluU(siiUL6) P'«''i-V- B6P.^e r»H cvrf/^, 97 Ruskin Avenue

d*^f o*. Sr^^ j^MLtf 4o«ifcY Ottawa, Ontario

I-:ar-»',1990 (2pp^ t5 Bulletin News Supplement #3-1990: Pub, by f__^f_A_Hobby

This last month or so has seen the v/riter experiment v;ith v/ord processing us- ing; an MS DOS wordprocessor from Radio Shack at about $20 in price, X3foflTer M-il09 dot matrix printer, sold locally at C$169, provides hard copy. The only problem has been that you need a little BASIC pro/?ram to get control codes to the printer to change the mode of printing, to small type for example, and eventually a program was written to write a file to disk with just the control codes required and\hen the DpG commands alone can be used to append textto the control code file. This solves the problem of having the printer connected to a non-standard port no. and may help when used with other operating systems and disk systems than MS DOS, which is why it is mentioned here. Otlier work includes the preliminary evaluation of a fast and short m/ c alniorithm for compressing text/files. It seems to compress to about of original size, and better figures are being sought by modifying it. The problems of text compression in a 16K-32K orphan computer require such novel approache3(a short m/ c subroutine) since the standard algorithms like Huffman & '^mpel-Lev require at least 3 or 4 K of text to make any saving and if the vjhole thinr, is locked in with a 2+.3K BASIC routine to compress or expand the code, it is hard "to make any saving in the little orphan, BASIC operating system computers like the ZX-Sl/TSlOOO, ToZOb^ or Commodore 64. CP/M computers don»t suffer from this limita.tion hov/ever, and it is not to these more sophisticated computers (like the QL, and l6-bit computers) that this approach is addressed. It is hoped that the sub-routine code will fit within about 400 bytes I Anyone wishing to exch.inge tips ,^nd tricks and ideas on data compression for orphans (and bigger computers in some cases) may v/ish to v/ribe the publisher at the address above. Utilities like ARC, PAK and SQ use Zempel-Lev and Huffman codes. Somecomparative figures:- (based on straight, dense text files in ASCII;aiK) PKZIP,LHARC PKPAK,ARC 50^, SQ 57?^. Ir

some cases, files perhaps with a lot of spaces in them, ZIP v;ill bring the file tc as little as 19'^ or original size and ARC around 30^, SQ around 35?^. LHARC by the way is the first program that the v/riter has seen from Japan,

The last Ottawa-Hull TSUG meeting included a long exchange of experiences in Pascal pror^ramming with Dave Solly doing some programming in HighSoft Pascal on the TS206S. A Pascal compiler for the TS2068 has been placed in the public domain for non-commercial exchange and is up on the club BBS at (613 )745*^^3o, 300 baud, and maybe faster soon, (?5/n/l), after normal business hours. Another v;ay to get at Pascal on the TS206^ is to use a CP/M version if you have CP/M (with the Aerco DOS), and of course the QL can also use this with a CP/M software emulator.

The BOSTUG, TSUG has mutated,' * closing dov/n as a general TS SIG within the Boston Computer Society and being reborn v/ith many of the old members as the New England QL User Group, with a planned quarterly n/l & membership at USi|lO/yr,, contact: Richard Taylor, 309 Holly Cir Tiverton, RI , USA 02873 .to join or Joyce Blaho,971 Fel- lsv/ay,Medford,M ,USA 02155 about n/l exchanges. The final n/l of BosTUG, mentions that Update Magazine (by Bill Jones, on TS Disk Systems, esp, Oliger), has been turned over to Frank Davis of ISTUG as Bill Jones is going to spend time sailing the Cariibean with his wife and take a break from the computer publishing hobby. At US|l^ for four issues around 50pp each, UPDATE has been a real buy for subscribers,

Donald Lambert of CRAGIST ( lov/a n/l) reports that he has his ZX-Sl LDOS disk system up and running with a Tandon disk drive and he has the fix for mating the tv;o if you wish to contact him. He also is v/orkiag with a sort of short board ZX- 81 to use m/c pro^^rams developed on the ZX-^l/TSlOOO in a shortened controller board with Z-^O and SRAI^CMOS RAM; Mike LeDuc has developed the board design. Mr. Lambert nay be contacted at 3310 Clover Dr. S ,V/. , Cedar Rapids ,IA,USA52404,

Mark Yost, P. 0.3. 1^7, Canton J *CT JuSA O6OI9 sent us a notification that he may get info oath e TSIOOO/TS 2063'*' program tape stock of an out-of-business store. The tapes, if available will go for about US|5.50 and include M-SCRIPT, Vu-Cal , Vu-File Timachine (BASIC compiler), Vu-3D, Aerco Print Master, Chess, 32/64 Gol,M-Term,

May/ June 1990 May 1* 1990

Dear Out-of-Town Members >

Sianunertime is here. But our club members still seem to be busy with their computers. For the last three Mondays the mailman has brought 10 and 11 letters from members. A few of them were exchamge newsletters # but mostly they vere members writings

There's an interesting thing about our club. It is thriving. Our newsletter is thriving. This is in marked contrast to the experience of a number of other Timex clubs . For example today's mail brings word that the SINCUS newsletter will cease with the July issue. They are going to send all Timex articles to the SNUG group to be put in the SNUG newsletter. And further; they are opening up their club to MSDOS machines since, to quote...* Over a period of time more of our declining enrolment has been switching over to MSDOS machines."

The Boston T/S User Special Interest Group is closing up and re-forning as the New England Sinclair QL User Group.

The Harrisburg T/S group ceased publication of their newsletter several months ago.

The Seattle Area T/S Users Group newsletter contains only material provided by the Editor & Sub-Editors.

Even the CATS group* sponsors of last year's ComputerFest writes, to excerpt i "Baclc to the problem at hand, which is the lack of material being generated by the members. I hope this month is just an aberration rather than a trend. If it is the latter case then I'm going to recommend that we publish the newsletters every two months. .1 just know we can't keep going on this way."

I said earlier our newsletter is thriving. Take a look at this issue? if that's not thriving I don't know what it is. And our memberships stays up at about 70 members, (55 of them out of town). We could easily increase it but 70 is just about a many as I can handle. Some of you are having to wait for answers from me, as it is,

I have been getting letters from some members containing material which is too good not to share. Some of it is rather lengthy, but with the increased size of the newsletter, it will be easier to put it in without dominating it. Shall do!

Bill Jones (UPDATE magazine) says that Frank Davis is going to take over publishing UPDATE. Frank has been the mainspring of the Sinclair National User Group (SNUG) for some time I it is not clear, but it seems to me that Frank is rimning UPDATE as a separate operation, not associated with SNUG's newsletter called "SNUG ROUND-UP". With Frank Davis wrapped up in UPDATE, SNUG is going to lose an active member. Does not bode well for SNUG, I should say.

We had an executive meeting a couple of weeks ago. We faced an interesting dilemma > our finances are too healthy!! Since we have been meeting in a school classroom for the past several years, and have been getting a good deal on the newsletter printing, our bank account has been growing. A decision was made to purchase a bare QL for the club. Then, after

some consideration the executive decided to give a 6-month membership extension to all who were members as of the meeting date of May 2, 1990. This would benefit all members equally, at the same time without tampering with the existing dues structure. Proposal approved by a quorum of members present at the May 2nd meeting. Note that this does not apply to newsletter subscriptions.

Note to any members who have borrowed the Larken Library disk #28, Pixel Print Professional. Bob Mitchell has been taking a look at it for me and notes an error in one of the programs. I shall identify it here. In the PP+ program, in LINE 2000 there are a couple of PRINT #4 statements together. One of them needs to be removed. Also in the same line there is a statement "LOAD "N$ CODE". It should be changed to read "LOAD N$ CODE 35926", Seems that the icons in the other library disk #10...PP+ will load in the wrong place otherwise.

Note with this program that it all goes on one Single-sided disk. There are no spare tracks, it is a full disk. The LOAD/SAVE routines in the program make the assumption that the program disk will be installed in drive 0, and the data generated by the programs will be directed to a second drive, drive #1. If you do not have two drives, 0 and 1, you should modify the LOAD/SAVE parts of the program to suit your particular set-up.

Last month I mentioned that I had several drives surplus to my needs, and offered them for $20. I have sent out 4 of them. Now I shall be able to buy some more! ! No, No, slap my wrist ! !

I am relieved a bit by word from Andrew Zettel, an out-of-town member, that he has his up and running. I say relieved, because it would be hard to troubleshoot -a drive problem at a distance, as you can imagine. Two of the drives were sold to an in- town member, so that was no problem. Well, there was no problem anyway, but you know how these things can go.

I still have three drives, if anyone is still interested. (I went and bought still another one! )

I should also like to mention that a couple of members have come to my rescue. Bob Mitchell has picked up a printwheel for my Smith Corona LI 000 > and another member, John Austin, has sent me another three. So I'll be able to print many more articles for the newsletter* and also this letter!! Don't buy any more for mei I have enough to last to the year 2000, I think!

I have another disk ready for the Larken library. It is a disk holding the interbank data base programs developed by Larry Crawford. It also goes into details about bank-switching using the Larken RAMdisk. It is on a DS 80 tracks per side disk. If you do not have a Quad drive, mention that to me and I shall put it onto two DSDD disks. I caution you that it will interest the more serious TS2068 users, but it is a bit heavy for rest of us. Well, if you have a need for a large database file, this is just the thing. There is quite a bit of documentation on the disk, so you are coached on it's use pretty well. It's just that I have not had the time to get into it very deeply, and it's still somewhat of a mystery to me. It will be known as Disk #30 Interbank Database .

Did I mention in the last n/1 that I have

the RMG Enterprises catalogue on library disk #29. It is available as either DSDD or QD format. Ask for it.

I was into a appliance repair shop* and inquired about used UV bulbs. They are the ones used in clothes driers many years ago to sanitize clothing as it dried. They make good EPROM erasers. But he wanted $4 for the bulb« and a further $4 if you wanted the socket. The socket holds both the bulb and a necessary 40 watt bulb that is used in conjunction with it. Since I already had one, I was not interested in paying his price. But if any one is interes1;ed in getting one, I can pick it up for you.

I thought I had written an article about building an EPROM eraser for the newsletter, but when I searched for it, I found that none had been published. Maybe that would make a good article. 1*11 think about it.

I have just written a good Larken disk header reader. It uses a 178-byte m/c routine to do the task, and it is very fast. To put a screen display of each file name on the disk, its starting address, and length you simply have to do a RAND USR call. I have written a Basic routine to enhance it. This allows you to print the output to screen, 2040, or large printer. Also to select the drive, and to print in regular or compressed mode* Other header readers do the same thing, but I like this one best. Ask for it if you are interested. I am going to put it onto the TTSUC Larken library disk *1.

Some time ago I came across a tape that a member inadvertently sent me in place of one of the club tapes. I did not realize it when it came ini it was only later when I came across it. I then connected it with a member's earlier letter apologising for the late return of a tape. Seems he thought he had returned it, but no. The tape I have in my hand is labelled Inaugural Florida Unity Breakfast, Holy Family Church, North Miami January 1990". Would the member please drop me a linei I don't recall who it was ! !

Larry Crawford has sent me a correction for his article on the Larken RAMdisk, that was published in the last newsletter. It came in too late to put in this issue, but we shall publish it in the next newsletter. But I shall put a copy of it in this letter to put anyone who has tried the article, out of their misery.

Faster slow mode

G W Hewitt, Edinburgh.

If, like me, you like to type in programs in slow mode, you will have found that it can be annoying when adding lines to a long program to have to wait while the computer writes the entire screen every time. It is especially bad if the line is a long Print or Rem line.

This small program can be temporarily stored near the start of the program using a few spare lines. When one has a screen full of lines, type Goto (first program line). Answer the prompt with the last line you have entered and it will retvirn you to that line with an empty screen below. It also Pokes the listing- system variable to ensure that every relist after that will return to your chosen line.

2 3 4 5

8

CLS PRINT INPUT POKE POKE LIST STOP

May 20th, , , ,J9ff Taylor has Just phoned and told me that his issue is going to have 3i* pages to it. I said to him, I hope that you've saved some material for the next n/l. But he said, we'd tetter hope that members continue to send in material. So here's hoping, ,do come through, July and August are slow monthsl

May 2ttth. , , ,Jeff brought the newsletter over to me today. Well, as you can see by looking at it, Jeff has rather overdone it this day. But don't you like it!! Trouble is, this issue now can't be folded so I have to go out and get some large envelopes and more postage to mail this issue, I'll have to speak to him to keep the n/l under WO grams, say, or we have to pay another ^tO cents to mail it! But anyway, it does look good, doesn't it? I think we outdid ourselves this time!

I had to make up a new set of large envelopes for this issue, including a new set of address labels. If you check the expiry date on your label this time you will see that it reflects the 6-month extension to your subscr ipt ion. I'd like to clarify something. When I read Jeff's column it gave the impression that the subscr ipt ion rate was for 18~month periods, rather than the current 12 month. Not so. We are simply giving a one-shot 6-month extension to members,

I shall have to put the following item in the next newsletter, but I shall make brief mention of it right now. I received a letter from a former member, David Solly, He mentions that he and Larry Kenny have a BBS which has been upgraded to run at 1200 baud. It is called "Sir Clive's Castle", and can be reached by dialling (613) 745-8838, It is, of course, dedicated to the Sinclair product. The BBS software is Larry Kenny's MAXCOMM, David says, in his letter, that if you are looking for some specific programs you should download two files on the BBS which lists their holding, 1) a VuFile data file under "Libr,Cv" and 2) an Mscript compatible file under "UD.CT", Feel free to download them, David says.

I've run out of things to say, so I shall put in a short ZX81 routine. We seem to be short of ZX81 stuff this month; maybe this will make up for it a bit,

************************************************** ******************* CORRECTION ******************* ********** OTHER aSES FOR LARKEN RMDISK ********* *************** ARTICLE MAR-APR '9^ ************** ************************************************** Most humble apologies to anyone who tried to create a BASIC AROS by following my instructions. The following corrections will remove some of the frustration: 1. The LOAD statements in two of the sections of the article will need to have RANDOMIZE USR m added. 2. In the "CREATING AN AROS" section: line 33 should have FOR X= 32768 not 62768. The instruction in para 6 should read: OUT 244, 242: RANDOMIZE USR 133: LOAD "test. CI" CODE 32776: OUT 244,0. Once again, sorry!! Larry C **************************************************

"TVPE LINE NO"

16419.. 16420..

AAA

INT

INT<XX^:/256>*256