SEPT-OCT'92 VOLlO-5

BIG FALL 1992 ISSUE TORONTO TIMEX-SINCLAIR USERS CLUB

EPT-OCT'92 VOLlO-5

SINC-LINK IS A PUBLICATION OF THE TORONTO TIMEX-SINCLfiilR USERS CLUB AND IS ISSUED 6 TIMES A YEAR, CLUB MEMBERS RECEIVE FREE COPIES AS PART OF THE $20.00 ANNUAL MEMBERSHIP FEE.

NEWSLETTERS ARE EXCHANGED, FREE OF CHARGE, MITH 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, 730 EGLINTON AVE. M, , TORONTO.

SINC-LINK IS PRODUCED ENTIRELY ON SINCLAIR AND TIMEX-SINCLAIR COMPUTERS.

SEND CORRESPONDANCE TO:

Attentions SINC-LINK EDITOR TORONTO TIMEX-SINCLAIR USERS CLUB, 14 RICHOME COURT,

SCARBOROUGH, ONTARIO, CANADA MIK 2YI

TORONTO TIf1E)<-SINCLflIR USERS CLUB

EXECUTIVE OFFICERS:

PRESIDENT TREASURER SECRETARY ACTIVITIES: QL CONTACT: NEWSLETTER: LIAISON OFFICER: ( Out-of-town members

(Area Code 416) RENE BRUNEAU ( 531-9749 ) BILL LAWSON ( 444-8772 ) GEORGE CHAMBERS ( 751-7559 ) LOUIS LAFERRIERE ( 820-3725 ) HUGH HOWIE ( 634-4929 ) JEFF TAYLOR ( 244-8583 ) GEORGE CHAMBERS, 14 RICHOME COURT, SCARBOROUGH, ONTARIO, MIK 2Y1 ( 416-751-7559 )

TORONTO TIMEX-SINCLAIR USERS CLUB

2

SINC-LINK

Editorial

Well, a few things have happened in the club recently. If you check the blurb inside the cover, you will see that the newsletter-only subscription and the single issue price have been removed. These two features were holdovers from the days when the newsletter consisted of six or seven double-sided pages. Anyway, it simply was not economically feasible to continue to offer these options and while we are not out to make money, we certainly aren't out to lose it. So, for your $20.00 you get six issues of Sine-Link, access to our extensive Larken and QL disk libraries, our 2068 and ZX-81 tape libraries, the book library and our huge exchange-newsletter compilation. Not a bad deal, we think.

The QLers are going to get a special interest group (SIG) . We have found that we simply cannot cover all the bases during our club meetings so the QLers will be meeting at a time and location to be determined. Initially these SIG meetings will take place at Hugh Howie's home in Burlington. Hugh will continue to look after the QLers' interests and of course, Sine-Link will continue to be their newsletter.

For those of you readers with the SMUG digitizer, I have finally produced a review of Robert Shade's adaptation of John McMichael ' s VIDEOTEX program. About time, eh?

The cover photo was produced on the 2068 using The Print Factory. It started out as an IBM GIF, was converted to a WordPerfect graphic, transferred to the 2068, converted to PF format then printed on my nine pin Star. Aren't graphics neat? That ' s it for now. . .

J.T.

Help - ALIENS!

Does anyone have the 48K Spectrum program ALIENS! This is the adaptation of the second movie in the ALIENS trilogy. Anyway, I have managed to get the Ripley character to the Queen's room (see screens ) and even shot the beastie but all that happens is that I am returned to the start room. Back issues of various UK magazines allude to different levels, elevators and even other crew members, but I have yet to find any of these features. I have scoured the instructions but cannot find any new info, even though the box screens shows a room number 2121 (for only about 270 rooms?). Any tips would be greatly appreciated. Please contact me via the club. Thanks in advance. Jeff Taylor

Now what happens?

SINC-LINK

A PROGRAMMING EXERCISE by G.Chambers

Recently one of our members, Robert Shade, sent me a suite of disks. These disks had a menu routine which I thought was interesting. I could nov resist re^working parts of it. It became an interesting programming exercise, which I thought I would share with other club members.

We tend to assume that everyone knows how to program, forgetting that there are many who may not be adept at it. I hope that this description may be useful to these members.

The listing is below, and following it are comments on the intent of each program line.

DISK MENU

REM

GO TO 5 CLEAR 26000 1 INK Oi CLS I GO TO 10 PRINT USR 64300 1

BORDER Oi PAPE RANDOMIZE USR

PRINT CHR$

1

2

R Oi 102 1

- k 2

10 CLEAR 653661 PRINT USR lOOi OPEN #4,'«dd" 20 LET X=7i DIM C$(X.9) 30 DATA " HELP! HELP! HELP!

kO DATA -LORDS OF CHA0S-,"L0RD CH . C 1 % " SAMURAI " , " S AMURI . C 1", BL ACK LAMP","BKLAMP.C1'*,"DAN DARE II" , -DANDAR . CI - , -RED DOOR- , -RDLO AD. Bl - , "CHUBBY GRISTLE - , ''CHUBBY. CI"

50 DATA " "

60 DATA - "

80 POKE 23658,8

90 PRINT #4i POKE 8200,163501 RANDOMIZE USR 233IO

100 BORDER li PAPER li INK 61 C LS

110 PRINT AT 1.4 1 INVERSE 1 1 "

";AT 2,4|" SPECTRUM GAMES DISK "jAT 3,4

ll "1 INV

ERSE 0

120 RESTORE 3O1 PRINT AT 5,0t F OR N=l TO READ D$i PRINT TAB 2; PAPER 3i INK 7; - jNj , PAP ER 1,TAB 7i PAPER (1 AND NOl) + ( 7 AND N=l), INK (6 AND Ns>l)-».(2 AND N=1)|D$| INK 5l('* GAME" AND N^>1 AND N^>3 AND N^>6} + ('' DEMO"

AND N=3)+(" ADVENTURE" AND N=6) I PRINT

130 READ C$(N)

140 NEXT N

150 PRINT AT 21,8; PAPER 0| INK 6f" SELECT BY NUMBER " 160 PAUSE Ot LET JUMP=CODE INKE Y$rT48i IF JUMP>X THEN GO TO I60

170 IF JUMP=1 THEN GO TO 3OOO 180 IF JUMP=2 OR JUMP«6 THEN P RINT #4 1 LOAD C$( JUMP) CODE

190 GO SUB 200 I RANDOMIZE USR 1 OOi LOAD C$(JUMP)CODE

200 BORDER Oi PAPER Oi INK Oi C LS

210 PRINT #4: LOAD ("SAMSCl.Cl" AND JUMP=3) + C*BLPSCleCl" AND JU MP=4)+("DANSC1.C1" AND JUMP=5)+( ••CHUBSC.Cl" AND JUMP=7) SCREENS t PAUSE 300

220 IF JUMP=3 THEN PRINT #4t L OAD C$( JUMP) SCREENS t PAUSE 300

230 RETURN 3000 GO SUB 5000

3010 RANDOMIZE USR 100 1 PRINT "h

elp07.CT"i PRINT CHR$ 2i PRINT '

"End of File... Press key for men u"

3020 PAUSE Oi go to 1 5000 INK Oi paper 7t BORDER 7i C LS

5010 IF PEEK 60900^>124 THEN RA NDOMIZE USR 100 1 LOAD "taswi.Cs" CODE

5020 RANDOMIZE USR 60826 1 RANDOM IZE USR 60899» RANDOMIZE USR 643 00 1 PRINT CHR$ 3 1 RETURN 8000 INK Oi PAPER BORDER 7i C LS I LIST I STOP Jf9000 CLEAR 27000 1 RESTORE 9030 1 -^1 FOR n=23300 TO 23309 9010 READ ai POKE n,a 9020 NEXT n

9030 DATA 205.102,0,62,3.211.244 ,201.0,0

9040 RANDOMIZE USR 2 3300 9050 RUN

9994 STOP

9995 RANDOMIZE USR 100 i SAVE "ME NU.Bl" LINE 10

9996 STOP

I

>

4

SINC-LINK

A PROGRAiVIMING EXERCISE a DISK MENU Program description

LINE 3 3 This is the line used to save the program as a SPECTRUM AUTOSTART. That is to say, you must have a Spectrum ROM manually switched in when you want to use this AUTOSTART menu. If you want to use the Spectrum EPROM mounted on the Larken cartridge you would use Line 9000.

The CLEAR 26000 is used to ensure that the AUTOSTART file is less than one Larken disk track in length (509O bytes). The SAVE starts at memory address 22490, and continues to the address 26000. We could have used a Clear 27500 (27500^22490=5010), if we had needed more room for the menu program, and still use only one track.

LINE 4 r? We jump skip over Line k since this entry is needed only after the HELP file has been called up. If we do a USR call to 6^300 without the "taswi.Cs" code in place the computer will crash. See Line 50IO description) .

We clear the screen before saving the file, simply for neatness. RAND USR 102 is the Larken AUTOSTART SAVE command.

LINE 10 n Clears the computer memory to just below the User^defined graphics area of memory. Also opens the TS2068 Channel 4 to the abbreviated Larken disk command "PRINT used instead of "PRINT USR

100:

LINE 20 :j Sets variable "X" to the number of options to appear on the screen. Also dimensions the C$ array. The C$ array is used to hold the Larkenized program names held in the data statements of Lines 30 to 60.

LINE 30 n We have put the HELP option in a separate LINE. Line 120 could be simplified if you wish to use imbedded colour codes in this -HELP" data. Note there are two pieces of data in this line; the second being simply a space. The "space" data is stored in the first entry of the C$ array. We don't actually make use of it; it is needed to regularize the menu display. Delete this "space" data, and you will see what I mean.

LINE 40 n This data line and Lines 50 and 60 are used to hold two sets of data. First the program name which is to appear on the menu screen, followed by it's Larkenized loading name.

LINE 80 n Ensures we are in the "Caps" mode.

LINE 90 Ts This line boots some code stored at 233IO into the Larken RAMj and sets a Larken pointer toward it. This code needs to be loaded into memory before either RUNning or doing an NMI^Save . Otherwise the program will crash. See the article entitled TS2068nLarken NMI^key, in the Jan/Feb'92 Issue of Sinc-jLink for a full description.

LINES 120/140 ^ This FOR NEXT loop gets the program names on the screen and the corresponding Larken load names into the C$ array. The Line 120 IS somewhat convoluted. There are two things of interest. First, we differentiate between the paper/ink colours used in Line 1 and the remaining lines. This is done by the portion of the line which reads as follows I

...PAPER (1 AND N^>l)+(7 AND N=l); INK (6 AND N^>l)+(2 AND N=l) . . .T.,.JSmJ?r,S^^°'^^'''^ define the game description on each screen as GAME, ADVENTURE, or DEMO. This uses the same programming technique as above. The pertinent segment is as follows.

SINC-LINK

5

...(" GAME" AND N^>1 AND N^>3 AND N^>6)+(- DEMO" AND N=3)+(« ADVENTURE" AND N~6 ^ « » «

LINE 160 c The "PAUSE 0" holds the program at this point until a kev is pressed. We use the variable "JUMP" to hold the code of the key that is pressed. We subtract 48 from JUMP so that it corresponds exactly to the key number on the keyboard, which will be between 1 and 7 (since "x" 1«5 7). If JUMP is greater than 7 then the line loops. a is

LINE 170 If menu option 1 is selected (HELP), then we go to LINE

we^wLi^L"io«r««H H^LP""^^ programs in this menu have a SCREEN which ZtrZ t 5f ^2 display for a few seconds before loading the program

proper. However, there Is no SCREEN$ file for the program options 1 and 6 so we proceed to load them immediately. f & ^ upu^ons i ana

LINE 190 If we selected options other than 1 or 6 this linf^ i^^^ irS.*° ^ re?SrniS to iSad tL ^

LINE 210 3 In this Line we load one of several screen options.

-tSSS-^"^ "!? r^^"'' °^ variable "JUMP". Remember, the v4lue of "JUMP" was determined by our menu selection in Line 16o!

to^display? °^ P^*'srams (menu item 3) has a second SCREEN$

LINE 230 5 Returns to Line I90, to finish loading the game program. "tiswi??s".' ^""^ **** "P*^""- *" 5000 to load

^?!nr&^%^2^°s't'r '

Print CHR$ 2 causes the computer to revert to the 32 ohr$:,per,line

LINE 5010 n taswi.Cs contains two other SDectri.m m/r. r-^,,*!^ provide the same ON ERR GOTO routine avaiiaUe in ?he "2068 * . A check is made of address 60900 to see whether th/^nn^ L =1 in place, to avoid unnecessary reloading! "^^^^^"^ =°<i^ already

LINE 5020 r, Three USR calls are made to the taswi Cs cori^ +.0 *

LINE 9000 T This is a m/c routine which is >„H*-»>^i use this program as an AUTOSTART wlt^w ^C f "hen you wish to

cartridge. The m/c d^a in Line 9030 is L^^r^'^i?" ^™ °" ^^^ken call is made to it. The code f ir-,^ ^^t^^i"*" ""^""ry. then a USR

the program is called up ?ater lL ?ema?i?/r^«f^r bankswitching routine d rrV?S^^?^IS68°^R^S%r^L%°;e%trum

SINC-LINK

Dsinq ALTREY to create "macros" in QDILL copyright- - Howard j. ciase. pa,g<L ?

This is an updated version of an article that originally appeared in QL World.

Using the ALTKEY cxMnmand to create "macros" in Quill,

As I indicated in an earlier column, if you have Super Toolkit II and a bit of extra memory the ALTKEY function can be used to save a lot of repetitive key pressing for routine operations while using the Psion programs - it's particularly useful with Quill. "Strings" of characters can be assigned to particular <ALT & key> combinations during your boot and these remain available until they are redefined or the machine is switched off. Some "Front End" programs like Taskmaster or Qram use similar combinations for other purposes, so you may have to change some of my suggestions, but there are plenty of others available since pretty well any key combination that prints a character can be used, this includes the CTRL and CTRL & SHIFT combinations that generate the funny foreign characters - although you may need a third hand to manage some of the combinations and ALT at the same time.

(Remember, you have to be holding down the "modifier" keys before you press the main letter key.) You can even assign some of the combinations that do not generate a screen character.

One pair you must avoid is <CTRL & 7>, since, adding ALT to this combination freezes the machine completely, and a complete reset is required - even Minerva's soft reset is frozen.

The best way to assign your keys is to set up a special SuperBasic procedure that is called in the boot. Listing 1 shows a skeletal form for such a . procedure, you should be able to flesh it out to suit your own needs. Some of the keys you have to press in Quill do not correspond to printable chau^acters, but this does not mean they do not generate codes like the letter keys, it's just that they are intercepted as control codes by the operating system and never reach the screen driver. ALTKEY inserts codes into the keyboard buffer just as though they had been typed in, so you can still use

SINC

CHR$() to put these codes into an ALTKEY definition, and, even better, you can assign them to strings just like printable characters. The only keys that do not generate codes in this way are the "modifier" keys SHIFT, CTRL, & ALT which are used in combination with other keys and modify their values. CAPS LOCK is also treated differently, although it does generate a code (225).

I like to assign the special codes for the function and arrow keys to short string variables with meaningful names at the start of the procedure. This avoids having to use the relatively meaningless CHR$() form during the body of the ALTKEY assignments; I find f3$ much easier to remember than CHR$(240) for example. (In case you didn't see my earlier article, you can find the code generated by one of the "special" keys or combinations using a mini basic program that you can type in directly as a command:

rep k: print code(inkey$(-1)),

This will print the code corresponding to any key or combination (even <ALT & key>) until your press <CTRL & space> or look them up in the manual.) If you want to assign combinations of keys that do not correspond to a screen character, e.g. <SHIFT + ENTER>, you must use the form "ALTKEY CHR$(254)". Most of them can be incorporated into your string with full effect, and this is the power of the method since even the non printing keys like <F3>, <up arrow> etc can be included in your assignment. If the ALTKEY assignment includes more than one string separated by commas an <ENTER> (= CHR$(10), also known as "line feed") is inserted between each string, and you can use this instead of lf$ if you like (see line 150). If you analyse the lines in the Listing you will see that the string can be normal characters in quotes, e.g. "laddress", a string variable e.g. F3$, or a function returning a string - FILL$() is the most useful here since it enables mimicing of repetive keystrokes (lines 165 & 185). These can be linked together with &s to make up a longer string.

To create an ALTKEY definition you

LINK

Usinq ALIREY to create "macros" in QUILL

Copyright - Howaird J. Clase.

should load Quill, work out how to do what you want to do from the keyboard, and then write down the exact sequence of key strokes required (including <ENTER>s.) You then have to

construct a string that duplicates them exactly. i will go through the effect of those in the listing line by line but leave the reader to analyse them to work out how they work. Since there is often confusion in listings between the numeral 1 and the letter 1 I should point out that they are all letter Is, except where obviously part of a number.

110 - 130 Assign values to string variables for use later in the PROCedure.

(127 You will have to either have a real time clock, or have set the clock if this is to be of use.)

135 <ALT & a> loads a file called "address_doc" from the default device. To my mind this is the answer to those who, like Reg Gilbert of Dartmouth, Nova Scotia, write in asking for a way to modify Quill to change the default margin and justification settings.

Whatever you do there will be only one default set available. But you can save as many blank files set up for different purposes as you like, and it only takes a moment to load them if you set them up on different ALTKEYs. In my case "address_doc" contains my standard letterhead, and footer set to "none"!

140 <ALT & b> Selects/ deselects the bold typeface; the other typefaces and "paint" can be set up similarly. You may not think this worthwhile since all it does is to replace two consecutive keystrokes with two simultaneous ones, but I find it avoids confusion between F3 and F4.

145 & 195 <ALT & B>, <ALT & 2> etc. Move the cursor to the bottom of the text, or a specific page number.

150 <ALT & d> goes straight to the "Delete" option in "Files" and lists

the files on the default device on the screen.

152 <ALT & D> Inserts the current date in the form e.g. "1992 Jun 13" at the right hand end of an empty row.

155 <ALT & E> threatens to delete from the cursor to the end of the paragraph. It requires one more <ENTER> to complete this irrevocable operation; press <ESC> if you have got there in error! One other problem is that after using Erase (or Copy) the program may freeze on repeated use of <up arrow >. Save and re-load to avoid this - this is made easy by the next macros (slightly out of order):

175 <ALT & s> inserts a Yen sign at the cursor position and then saves the current document under the name "current_doc" on your default device. It then uses the search routine defined at line 130 to find the Yen sign, delete it and put the cursor back exactly where it was when you started. It assumes that there is already a file called current_doc and overwrites it; if there isn't then it will also add a "y" right at the beginning of your document. Remember to save under a distinctive name before you log off. If you are an international financier and use of the Yen sign proves an em harassment then it can be replaced with any character (or characters) of your choice.

160 <ALT & £> re-loads the file called "current_doc" and then searches out the Yen sign as above. I chose the £ sign for this since it is out of the way and difficult to strike by accident - the active file in Quill is overwritten by this one!

165 <ALT & m> moves the left margin five places to the right and the right margin ten places to the left. You could use this idea to re-set the default margins, justification etc., but it is only relative to the current settings and I think that

8

SINC-LINK

nsinq ALTREY to create "macros" in QUILL

Copyright •- Howard J. Clase.

the solution under <ALT & a> above is better.

170 <ALT & P> print:s the current document, whole, to printer.

180 <ALT & S> like <ALT & s> but doesn't change the name. N.B the Yen sign will be present in the saved file.

185 <ALT & Y> prints "Yours sincerely" and your name in the appropriate places, leaving 6 lines for a signature.

190 <ALT & ?> lists the files on the default device on the screen and waits for a file name to load. Press <ESC> to get out of it.

If you have worked through all these then you should now be able to design a set to suit your own needs, incidentally these macros are much quicker if you have pressed <F2> to remove the instruction panel from the top of the screen, otherwise you have to wait while it needlessly print:s out all its messages. To print the Yen sign press <CTRL & SHIFT & .(full stop)>.

Some extra odds and ends - special to SinkLink

In the last issue of SinkLink a reader has sent in a procedure called Windex to restore the windows after running one of those all too common programs which do not tidy up the windows properly on exiting. This is an

obvious candidate for an ALTKEY command, but it needs to be put into one line form. Of course, if you have ALTKEY you will also have WMON, which does it in a single command; except that it doesn't reset the INK and PAPER colours. The assignment at line 310 in the listings will restore the monitor windows, although not with the Sinclair boot up colours - I find PAPER 6 too bright anyway. Although it occupies several lines on paper, it should be typed in as one long superBASIC line.

But, I don't particularly Sinclair monitor default

like the windows

anyway, my favorite set - the ones you get when you exit most of my programs is much more like the TV defaults, with a full width WIND0W#1 and a 50 character wide WIND0W#2 - that's because 50 charact:ers is what I use as a maximum line length for listings for publications. This is given in line 330.

Don't type this in at your keyboard every time, include it in your boot. One reason that it was difficult to obtain the default colours is that, as you will see, I am fascinated with Boolean algebra and used it to differentiate between the various channels in a long FOR loop. (This one also OPENs the channels first - QDOS doesn't mind if you do this tx> an already OPEN channel.)

If you ever need to edit an ALTKEY expression, especially a long one like these do it this way: type ALTKEY'x',' and then press the old ALTKEY combination, which will appear after the quote, edit as r quired and don't forget to add the final quote! This saves a lot of typing.

Another use you may not have thought of is to store a number, I sometimes want to remember a memory address until after I have LOADed another program, which would wiped it out if I assigned it to a variable, so i put it onto an ALTKEY where it's available until I either switch off the machine, or reassign that key. Finally don't forget the punctuation and foreign character keys <CTRL & SHIFT & key>, all of these and even some of the non-printing combinations can be assigned different strings giving about 120 in all - if you can remember where they all are!

Howard Clase, Box 9947, Station B, St John's, Newfoundland, CANADA, A1A 4L4.

Tel: (709) 752-6415

e-mail: hclase@morgan.ucs.mun.ca

SINC-LINK

Osinq ALTREY to create "macros" in QDILL copyriaht - Howard j. ciase, page 4

AIL-ti^^y L d_ s iz. i in ^ s

If 70U have Toolkit II flesh this out to suit your needs, add it to the end of your Quill boot and include a call to "Altkeys" somewhere before Quill is EXEC_Wed.

100 REMark

105 DEFine PROCedure Altkeys

110 f2$=CHR$(236) : f 3$=CHR$ ( 240 ) ^ f 4$=CHR$( 244 )

115 la$=CHR$(192) : ra$=CHR$ ( 200 ) : REMark arrows

120 up$=CHR$(208): shdn$=CHR$( 220 ) : del$=CHR$( 202 )

125 lf$=CHR$(10) : tab$=CHR$(9)

127 dt$=DATE$: dt$=:dt$(l TO 11)

130 search$=f3$&f3$&'s¥'&lf$&lf$&del$

135 ALTKEY'a* ,f3$&'laddress'&lf$

140 ALTKEY'b' ,f4$&'b'

145 ALTKEY'B' ,f 3$&'gb'

150 ALTKEY'd' ,f3$&f 3$&'fd?' , "

152 ALTKEY'D' ,FILL$(tab$, 5)&dt$

155 ALTKEY'E' , f 3$&' e ' &;lf $&shdn$&lf $

160 ALTKEY'£* , f SS&Ucurrent '&lf $&search$

165 ALTKEY'm' , f 3$&' ml ' &FILL$(ra$, 5 )&' r '

&FILL$(la$,10)&lf$ 170 ALTKEY'P' , f 3$&' p'&lf $&lf $&lf $

175 ALTKEY's' , ' ¥'&f 3$&' sf lpl_current_doc' , ' ' , 'yy' &search$

180 ALTKEY'S' , '¥'&f 3$&' s' \ 'yy'&search$

185 ALTKEY'Y' , If $&FILL$(tab$, 2)&' Yours sincerely,'

&FILL$( If $ , 6 )&FILL$ ( tab$ , 4 )&' Your Name ' 190 ALTKEY'?' ,f3$&'l?'&lf$

195 ALTKEY'2' ,f3$&'g2'&lf$: ALTKEY' 3 ' , f 3$&' g3 ' &lf $ 200 END DEFine

These two ALTKEY assigments will "restore" useful windows for monitors; put them into your SuperBASIC boot

300 REMark <ALT & W> for Sinclair default sizes.

310 ALTKEY' W , 'window 512 , 256 , 0 , 0 : els : f or i=0,2,l: j=not i:window4*i,512-256*(i<>0) ,202-152*0, 256*(i = l), 206*j:borderiii,not j,0,6: inki*i , 7-3*i : paperi^i , ( i + le-10 ) ^i + j : csizeiti ,0,0: cls*fi' , ' '

320 REMark <ALT & w> for Clase preferred sizes.

330 ALTKEY ' w' , 'openitl,con_: open#2,con_: window 512, 256,0,0:cls:for i=0 , 2 , 1 : j=not i: window#i, 512-208*(i=2) , 202-152* j , 0 , 206* j : border#i,not j , 0 , 6 : ink#i , 7-3*i : paperi^i, ( i + le-10 ) ''i + j : csizeiti , 0 , 0 : clsl^i ' , ' '

10

SINC-LINK

ZXS 1 RESOURCES

Rene Bruneau 17 August 1992

6 4k: of»grade

I have revised the 64k SRAM board to provide non-volatile memory above 32K, A revised component list, printed circuit, and layout are provided on the next page. If you have code or data above 32k that is to be protected, you should enable WRITE PROTECT before you turn the computer off. Turn off the write protect to modify data or run machine code that uses this area to store data. By the nature of the board design, the 8-16k block is also non- volatile, but is not protected from erasure or scrambling that could occur when the computer is turned on or off, or crashes.

WlrL& iTG Do O 1 ci ZXS 1 I^ir^o^irsLmme ir^s Go*?

Having been introduced to computing through the ZX81,2068 or the QL, many users are 'upgrading' to the XT, or more likely, the 386 AT, selling off or putting their old systems in storage. I have no doubt that most users retain a lot of affection for their old computers. Over the last year or so, I have seen a number of Sinclair Emulators appear on the bulletin boards for Amigas and IBM clones, written by ex-Sinclair users, of course. Most recently, I downloaded an emulator for the ZX81 called Xtender, written by an old ZX81 programmer by the name of Carlo Delhaz. For those who remember, Mr. Delhaz published several programs in the magazine *Your Computer' around 1983-1984. The program will run on an XT, but a faster machine is preferred. The emulator is quite impressive, in that the display and keyboard work exactly like the ZX81. A suite of programs is included in the package. An added bonus is a complete DOS to access directories and files on the resident computer. For those who are interested in getting a registered copy of Xtender can write to:

Carlo Delhez Emmastraat 3 4651 BV Steenbergen Netherlands

Enclose 50 Guilders (about $38.00 Can) and be sure to ask for documentation for the ZX81 programs that come with the emulator.

I NS I GUT

Many people, myself included, tend to view computers, VCR's and other electronic apparatus as black boxes. You turn them on, push some keys and they do what you want them to do. .. .sometimes. Once in a while you see something that gives you an insight into the inner workings of the machine. Not long ago, I picked up Mike Lord's 'Exploring The ZX81' and was reading through the section on how the display was generated. In a nutshell, The ULA (Undefined Logic Array; this is the chip closest to the TV modulator on the computer board) chip forces the Z80 chip (the CPU) to stop processing by issuing a HALT command. Because the Z80 was originally designed to work with dynamic ram (DRAM), it has provisions to refresh the ram automatically regardless of the halted state. It does this by cycling through the memory addresses and issuing a REFRESH signal. The ULA utilizes this feature to access the display file and character set to generate the TV display. Absolutely Machiavellian! Having just completed the 64k SRAM board, I suddenly realized why the RFSH line was □Red with the RD line to the static ram. When Hi-Rez basic is in operation, the SRAM is activated every time that REFRESH or READ is activated. With the code written by Wilf Richter, the ULA reads the SRAM rather than the character set in the ROM giving a true high resolution display. It is a pity that SRAM was so costly when Sinclair's design team made the ZX81 in the early 1980' s, else we would have had Hi-Rez right from the beginning.

INSTANT RGB

In the past, we have spoken about a product called TEC-200, a mylar sheet that allows you to transfer a photocopy of a printed circuit to copper for etching. One difficulty in using the mylar is in getting a good transfer to the copper all the time. A new product that has just been introduced promises to eliminate this. It is a specially treated paper that releases the photocopy when soaked in water. The transfer method is the same as with TEC- 200. Spraying the photocopy with lacquer gives you a transparent decal for face plates, keytops, etc. For $9.95 (US) plus $4.00 UPS you get 5 sheets of the paper. Write to DynaArt Designs, 3535 Stillmeadow Lane, Lancaster, CA 93536. Ask for Item TTS-5.

SING-LINK

G -4 K SRAM

Co mpao rxe n. -fc 11* i s is

Item Component Comment

UlyU2 62256,43256 Static Ram

U3 74LSH5 Decoder

Ql 2N2222 NPN Transistor

Dl,2j3,4,5 1N4148 Signal Diode

Riy2f3,6;7, 2.2K i/4 watt resistor

R4>8 4.7k 1/4 watt resistor

Ci iOuF Tantalum Capacitor

SUIi,SW2 SPDT slide

SW3 SPST toggle

SW4 SPST toggle Momentary on

61 2 AA B^-Hevv. m^yr

64t>e

"~1

1

. ^

01

R7

I

toff

1^

TUL-f

w-t

-CI>— '

D-t- I

M

CI C3

Component Layout (Not to Scale)

PCB Layout (Not to scale)

SING-LINK

7 - 0

323^2 N. Church Street Bowling Green, OH 43402 July 19, 1992

0

Dear George,

Weil, I haven't heard anything from Bob recently. I had been hoping to hear from him in regard to the changes to the machine language from the Larken version of the format program to read and write 9 sectors (like IBM disks). As I said in the letter which was published in the last Sine-Link (the issue), the corresponding changes (or what I think is corresponding) work for the Larken/AERCO format code, but I don't have any way to check the changes for a Larken I/F. I can't really continue with my 2068 to IBM programs until I know if it will work on your system as well.

Speaking of which, could you do an LKDOS PEEK of address 0004 in your cartridge and tell you what you see? On mine, I get a 41 hex, 65 decimal, which is the ASCII code for the letter A I am hoping that is the identifier for the type of disk i/f, so that I could use it in a program to load the appropriate code. So if you get a 4C hex, 76 decimal, that m^ be what I am looking for.

On another matter, I think I will write another article on LKDOS user-defined commands. Last time I wrote about that, I didn't really supply much information in the article. (TTiat was last year, when I supplied the new version of Grafix24.)

As for what I might do as a simple project to use in that article, I was thinking of an un-£RASE program or something similar so that I can demonstrate using strings. Hiat is to s^, I mentioned in the article that CALL 009C(hex) is a routine to evaluate a string parameter, but never gave any sort of example of how to use it And of course there are lots of other routines I mentioned in the original listing back in 1989 that might deserve an explanation.

In fact, why don't I include the explanations with this letter first, and do the article next time. Hiat in itself should be enough material for this month anywayr. Presumably I will be getting the July issue in the mail soon - yes, in case you didn't know it, the newsletter always arrives here near the end of the given month. So you may be hearing from me again soon, if any articles in it need any comment If not, Fll wait until I hear about the format changes and the version (?) or it is time to write the user-defined command article. Bye for now.

Sincerely,

SINC-LINK

PP.Sc I fealized today (8/4) that I hadnt supplied sufficient details in the letter to Bob for you to actually try the changes I gave the addresses but not the new values to test it with. Here aie the changes to Hcode.Cl wfaidi should be made to read and write MS-£X)S disks:

Address: Current: Change to:

9CE2 (40162) OB OA (10)

9CFB (40187) 14 12 (18)

9DD7 (40407) OB OA (10)

9EBE (40638) 14 12(18) ^

The easiest way to do this is probably the following: ^ ^ ^

10 PRINT #4: LOAD "Hcode.Cl "CODE ^

20 POKE 40162,10 ^ ^

30 POKE 40187,18 0'

40 POKE 40407,10 50 POKE 40638; 18

60 PRINT #4s SAVE "PCcode.Cl"CODE 40000,2000

At this point, the thing to do is find two disks in MS-DOS format (preferably one of them fonnattcd but blank) and the LKDOS FORMAT program. LOAD the FORMAT program into you 2068, then bceak into the program by pressing the cursor down (CAPS- 6) key. Now type PRINT U4: LOAD "PCoode.Cr CODE (or whatever name you used to save it up above). At this point, you should just be able to type RUN, select "Copy entire Disk" (by pressing 2), and f^xxeed to copy the disk with data to the blank disk.

If eveiything woiks as planned, the first thing you notice should be that there are no CRC errors during the copy. If you have set iq> tbs appropriate number of tracks, etc., you should now be able to take both disks to a PC and use them interchangeably. They should have the same files, the same directory, even the same serial number (if they were made with a version of DOS that uses a serial number). You should be able to TYPE any file on either disk, or run any program, or better yet simply DISKCOMP both disks, (a command to ccmpare disks) Sf the DISKCOMP does not say "Compare OK", let me know.

That's it for now. Write you later.

SINC-LINK

LKDOS Machine Laguage CALLs Explained

Several years ago (see the Sept '89 issue), I sent in a list of routines I had discovered by examining my LKDOS cartridge ROM (at that time, version A2). No real explanations were included, an unfortunate oversight on my part Last year at about this time, I wrote a new version of Grafix24 and Autoboot, and included some additional details on a few of the routines I had listed earlier.

Below is a table of the routines mentioned in that article with explanations. While I am working from LFCDOS for the AERCO disk i/f, most of these will be appropriate to any version of LKDOS. Any differences between different versions tiiat I am aware of will be mentioned in the descriptions.

One addition to the memory map from that article. Location 200F hex (8207 decimal) is a sequential file open flag. It is 0 if there is no file open, 40h (64) if there is a file open for reading (by PRINT #4: OPEN #n,"filename IN"), and 80h (128) if there is a file open for writing. Code which intends to access the disk using LKDOS ROM routines should test this byte to see if they can safely access the disk.

Routines accessible without the cartridge enabled: 0062h 98 This address is used by ml to access the cartridge. 0064 100 Hiis is one method to access LKDOS BASIC commands. 0066 102 the address used by any NML

006A 106 used by LKDOS channels except "dd". The calling channel is identified by the D register. Set D=0 to D=2 for LKDOS windows wO to w2, D=3 for "Ip", and I>=4 or D=5 for file OUT and IN respectively.

006C 108 used by LKDOS channel "dd" (as in PRINT #4)

006E 1 10 LKDOS PEEK command See LKDOS manual.

Other LKDOS routines:

0078h 120 write track. Copies data from 2070h-346ni to current drive and track. 007B 123 read track. Copies data from current drive and track to 2070h-346Fh. 007E 126 seek track. Enables the current drive and steps to the track number stored at 201Dh(8221).

0081 129 next track. Step to the next numbered track on disk. Note: on AERCO

cartridge, does not enable drive! 0084 132 Find name in directory. Expects name to be stored at 2022h. Generates

error T if can't read track, sets 2020h (8224) to OAh (10) if name is not

found in directory, otherwise sets 203 Ih to point to entry. 0087 135 Copy directory entry to 203Ah (8250). Presumes 203 Ih points to directory

entry, (see previous routine and 00A2) 008A 138 Pop string and check as valid filename. Reads value from BASIC, copies it

to 2022h, and checks for ".A", " B", or ".C" in string. Error F otherwise. 008D 141 Find BASIC tenninator. Adjusts machine language variable CH ADD to

point to the end of the current BASIC statement (: or ENTER). 0090 144 Evaluate imsigned integer. Reads value from BASIC, and converts it to an

integer in the BC register. Standard errors if too big or not a number. 0093 147 Error message: T File Not Found. Displays error message and quits.

SINC-LINK

0096 150 Test Write Protect Check to see if disk is write-protected Notes: on A2,

des1ro3n3 data in 2070h-346Fh by reading track 0. On A3, moves drive to

track 0 but does not read track. 0099 153 De-aliocate file and find fi-ee tracks. Removes tracks from current directory

entiy (as copied to 203Ah by routine 0087 above) and adds list of fi-ee

tracks at end of entry. Used for ERASE and before SAVE. 009C 156 Evaluate String. Evaluate BASIC value and copy it to 2022h (8226). Does

not check it as a filename. Error if not a string. 009F 159 Call a routine in Home ROM. Expects two addresses, HL to contain

address in 2068 ROM, DE corresponding address in Spectrum ROM. Tests

CHANS to determine which address to use. 00A2 162 Add name to directory. Expects you to have used 0084h and not found

name. Cr9at98 directory entry for name at 2022h, and sets 203 Ih to it Error

U if directory fiill.

00A5 165 Print number between 0-255. Alw^ prints leading O's. Expects number in A register at start

00A8 168 Allocate tracks and update directory. Expects new directory entry at 203 Ah with F5h for unused track and 203 5h to point to end of track list, pointer to old directory entry in 203 Ih. If (2002h>=O, quits, otherwise returns.

OOAB 171 Open stream as "dd". Expects stream number in 2030h (8240).

OOAE 174 Print error message. Expects HL set to text of message. Quits when done.

OOBl 177 Erase block header. Erase data fi-om 2070h-2087h (the track header info for