48
8/7/2019 The Transactor V2 09 http://slidepdf.com/reader/full/the-transactor-v2-09 1/48 (Ecammadare comments and bulletins concerning your COMMODORE PET"" The Transactor VOll BULLETIN;;: 9 PET™is a re istered Trademark of Commodore Inc. LIST in Lower Case Robert Oei, a PET user in Mississauga, has discovere0 a sequence that will cause PET printers to LIST in upper/lower case rather than graphics and upper case ••• The rae t hod to accomplish this is ac t uaILy quite simple: 1. POKE 59468, 14 2. Enter the following line in direct mode: openl,4,1:open2,4,2:printI2,"9":fora=lto 2:printll,a;a;a;a;a;a:next:closel:close2 After pressing RETURN, the pr inter will pr int six "l"s and then six "2"s on the next line. If a file is then opened to the printer and the "ced" conmand is given, the printer will respond with the wore "ready." in lower case. Any program listing performed from then on w i Ll appear in uppe rz l.ower case. Power down and up to get graphics back. I regret to say that I don't know what caused this phenomena to occur, except that it works. I would be most interested if you or any PET user can provide a logical reason as to why?.. Robert Oei This was tested on 2022/23 printers and found to work on some but not all. Editor's Note A number of readers have expressed concern about the duration of their subscr iption to The Transactor. Let me clear up any misunderstanding. Volume 2 Transactor subscriptions include issues 1 through 12 and are renewable upon receipt of issue 112. Therefore, anyone with a subsc ript ion to Vol. 2 should nov have issues I to 9 and can expect 3 more bulletins before subscribing to Vol. 3 (a subscription form will appear in #12). The Transactor is now produced on the new CBM 8032 using WordPro IV and the NEC Spinwriter. 1

The Transactor V2 09

Embed Size (px)

Citation preview

Page 1: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 1/48

(Ecammadare comments and bulletins

concerning your

COMMODORE PET""

The TransactorVOl lBULLETIN;;: 9

PET™is a re istered Trademark of Commodore Inc.

LIST in Lower Case

Robert Oei, a PET user in Mississauga, has discovere0 asequence that will cause PET printers to LIST in upper/lowercase rather than graphics and upper case •••

The raethod to accomplish this is ac tuaILy quitesimple:

1. POKE 59468, 142. Enter the following line in direct mode:

openl,4,1:open2,4,2:printI2,"9":fora=lto2:printll,a;a;a;a;a;a:next:closel:close2

After pressing RETURN, the pr inter will pr int six"l"s and then six "2"s on the next line. If a fileis then opened to the printer and the "ced" conmandis given, the printer will respond with the wore"ready." in lower case. Any program listingperformed from then on w iLl appear in upperzl.ower

case. Power down and up to get graphics back.

I regret to say that I don't know what caused thisphenomena to occur, except that it works. I wouldbe most interested if you or any PET user canprovide a logical reason as to why?.. Robert Oei

This was tested on 2022/23 printers and found to work on somebut not all.

Editor's Note

A number of readers have expressed concern about theduration of their subscr iption to The Transactor. Let meclear up any misunderstanding. Volume 2 Transactorsubscriptions include issues 1 through 12 and are renewableupon receipt of issue 112. Therefore, anyone with asubsc ription to Vol. 2 should nov have issues I to 9 and canexpect 3 more bulletins before subscribing to Vol. 3 (asubscription form will appear in #12).

The Transactor is now produced on the new CBM 8032 using

WordPro IV and the NEC Spinwriter.

1

Page 2: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 2/48

Transactor tl0

LIST in Lower Case •••••••••••••••••••• 1Bits and Pieces ••••••••••••••••••••••• 3NEWSBYTES............................ 6

PET Machine Language 1/0••••••••••••••10An Instring Utility ••••••••••••••••••• llPET as an IEEE Logic Analyzer ••••••••• 12COMPUTER PHILOSOPHY ••••••••••••••••••• 14

A BOOK REVIEW.................... ..17CROSS - REFERENCE................ ..18••23••24

DATA Line Prograrn........ ..39Music Monitor Review..... .40Language Case Converter.. .42Announcernent•••••••••••••••••• 44

Better Auto - Repeat ••••••••••••••The 'UNWEDGE I••••••••••••••••••••

RESTOREVisibleMachineProductBack - Up ••••••••••••••••••••••••••••• 46

Page 3: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 3/48

Bits and Pieces

Printer Tabbing

When using TAB to print on the screen, PET looks at thecurrent position of the cursor first ( POS(O) ). If the TAPargument is less than the cursors' position on the line thenthe data is simply printed in the spaces immediatelyfollowing the last character printed. If the argument is

greater than or equal to POS (0), PET subtracts POS (0) fromthe argument and prints the resulting number ofcursor-rights.

However, when printing to the printer, the cursor isusually in column zero and TAB acts like the SPC function(the printer has no "internal cursor"). Therefore, to nakeTAB work on the printer, print the data to the screen firstthen to the printer. This can be done with duplicate PRINTand PRINT#: statements or more efficiently with one "dynarnic"PRINT#: statement. For example:

10 REM OPEN OUTPUT FILES TO

SCREEN & PRINTER20 OPEN 3,3,130 OPEN 4,4,040 PRINT#: 3+X, "ABCDEFGHIJKLNNOPQRSTUVlv";50 X=l-X : IF X THEN 40

Line 50 toggles X from 1 to 0 thus repeating line 40 onlytwice. The semi-colon is important else the POS(O) goes backto zero. When a carriage return is required on the printerthe following might be inserted between PRINT# and togglestatements:

45 IF X THEN PRINT#:4,CHR$(13);

Dynamic PRINT#: statements are only more efficient if theDATA being printed is within quotes. If variables are used,more bytes are probably saved by duplicating the outputstatements.

More on Printer Output

L. D. Gardner of Leisure Books Ltd., St. Laurent Quebec,wrote in with:

Dear Sirs,

Our company uses 2 32k Commodore Pets withCentronics printers*.

The printers are used to produce formalreports of a statistical nature, and we have foundthat the most difficult task is not in programmingthe calculations, but in printing the data inacceptable format.

If 2 decimal places are required, a value of"302" is not printed as "302.00", which makes the

3

Page 4: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 4/48

reports difficult to read. Also, a very smallvalue such as ".001" is printed as "IE -03".

I have corne up with a subroutine to handlethis problem. Undoubtedly, it could be shortened,but for clarity is is shown in the detailedversion.

I am also enclosing a simplified program whichillustrates how a program can be made to update

itself. It has value when not sufficient datamakes tape or disk files worthwhile. At the end ofthe program, DATA lines are printed and the cursoris moved up. All that's neede is to hit RETURN.

SUBROUTINE TO FORMAT OUTPUT DATA

1 9 8 Q $ = " . 0 0 0 " : L Q = L E N ( Q $ ) : L T = L O G ( 1 9 )

1 1 1 3 P = L Q - 1 : I F Q $ = " a T H E N P = 0

1 5 0 I N P U T I N U t 1 B E R " ;A

1 6 0 A 1 = I N T ( A * 1 8 ~ P + . 5)/19~P

1 6 5 I F A 1 = 0 T H E N 2 2 0

1 7 8 B U = S T R $ ( A 1 )1 8 9 B 2 $ = S T R $ ( A 1 * 1 8 ~ P )

1 9 0 L G = I N T ( L O G ( A B S ( A l » / L T )

1 9 5 I F A B S ( A 1 ) = 1 T H E N B $ = a 1 " + Q $

2 0 0 I F A B S ( A 1 ) ( 1 T H E N B $ = L E F T s ( Q $ , A B S ( L G » + R I G H T $ ( B 2 S , L E N ( B 2 s ) - 1 )

2 1 9 I F A B S ( A 1 » 1 T H E N B $ = M I D $ ( B 1 S , 2 , L G + 1 ) + " . " + R I G H T S ( B 2 $ , P )

2 1 5 I F A B S ( A ) = 1 T H E N B $ = " 1 " + Q $

2 2 0 I F A 1 = 9 T H E N B $ = Q $

2 2 5 I F A 1 ( 9 T H E N B $ = " - " + B $

2 3 8 P R I N T " 3 ·

2 4 9 P R I N T A t , B $

2 4 5 P R I N T "

2 5 1 3 G O T O 1 5 9

* This would also apply to Commodore printers and others

DYNAMIC TEXT PROGRAM

1 0 0 R E M R = R O W S , C = C O L U M N S

1 1 0 R = 4 : C = J

1 1 5 P R I N T " R E W I N D C A S S E T T E T H E N P U S H A N Y K E Y "

1 1 6 G E T G $ : I F G $ = " " T H E N 1 1 6

1 2 0 D I M A ( R , C )

1 3 9 F O R 1 = 1 T O R : F O R J = 1 T O C : R E A D A ( I , J ) : A ( I , J ) = A ( l , J ) * 2 : P R I N T A ( I , J ) : N E X T : N E X T

2 0 0 P R I N T " 3u

2 2 0 F O R I = 1 T O R : P R I N T 2 0 0 1 3 + ( 1 9 * ( I - 1 » ;

2 3 0 P R I t H " D A T A H;

2 4 9 F O R J = 1 T O C

250 P R I N T A ( I , J ) ;

255 I F J ( C T H E N P R I N T " = , H ;

2 6 0 N E X T J

2 7 0 P R I N T

280 N E X T

2 8 5 P R I N T " S A V E "

2 9 9 P R W T "

4 0 0 S T O P

2 0 0 9 D A T A 3 2 , 6 4 , 9 62 0 1 9 D A T A 1 2 8 , 1 6 9 , 1 9 2

2 0 2 9 D A T A 2 2 4 , 2 5 6 , 2 8 8

2 9 3 0 D A T A 3 2 9 , 3 5 2 , 3 8 4

Page 5: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 5/48

Hints on developing this program could be found in theDisk Merge article (Transactor 8) and Paul Barnes article onfinding DATA statements (this issue).

Consider a program that could receive data from thekeyboard and then SAVE itself with the dataincluded •••dynamically! Such a program wouLd have to firstdetermine a line number for the DATA statement. This wouldbe PRINTed followed by "DATA" and your information. ByPOKing the keyboard buffer (623-632 see also 158 Icharacters in buffer) and ENDing program execution, carriagereturns could be released over top of the line uponrelinquishing control to PET. The screen editor would enterthe DATA statement into text and a second carr iage returncould be placed over a RUN or GOTO xxx back into the program.Once the program reaches memory capacity, it can be filed forfuture reference and a new program started. Ideal as a lightdata-base.

F R A N K & E R N E S T

we'~E ttef!1!.

,-0Fa" T H e .C:OMPuTE~.

TH","iES4-8c 1110 by NEA . . tftc, T.M. M e t a . U. s,,,~.Ott.

5

Page 6: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 6/48

NEVIS BYTES {II.T • GarbuttMississauga, Onto

waterloo Extended PET BASIC

Vlaterloo University recently announced the availabilityof an extended Basic for the Commodore 16/32k PET. The 2kRon chip resides in expansion ROM socket at 9000, comes witha 160 page user manual and costs $75 in single quantities.Waterloo University is introducing the product in a series of3-week seminars of particular interest to high schoolteachers involved in the programming sciences. The seminarparticipant attends a one day introductory session, takeshome a PET and returns for a 2 day concluding session. Yourstruly is presently attending the course and will file an indepth report of the Basic and the course in a futureTransactor. Essentially the new Basic supports all existingPet Basic syntax while adding powerful commands such asLOOP •••ENDLOOP •••WHILE ••• ENDIF •••CALL ••• PROC(edure),etc. topermit a fully structured program approach consistent withaccepted industry practices. For further information contact;

Prof. W. J. Graham,Computer Systems Group,University of Waterloo,Waterloo, Ontario Canada,N2L 3Gl,(519) 885-1211

Coming Reviews or Articles

KRAH 2.0

United Software of America's 2k RON provides the heart ofan advanced keyed Random Access (disk) management system,essential for comprehensive data base managementimplementations.

Rabbit

Eastern House Software's (Carl Moser) utility softwarethat among other things increases PET tape speed by a factorof four.

ROH Expansion

\1hat to do about conflicting expansion ROM assignments.

How to use the expansion Rom area of the PET.

Structured Symbolic Basic Compiler

Softside Software's Basic program that implements astructured two pass compiler on the PET!

6

Page 7: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 7/48

computer Nusic

Beginning in the next issue of The Transactor adefinitive series of articles on all you ever wanted to knowabout PET and music.

Micro-Computer Communication

A look at MicroNet and the Source, as well as thewhere' s, why's and how's of establ ishing contact viith other

micro-computer users over telephone, radioctc.

New Products

Scheduled for Irnu inent release are several suj.e rbsoftware packages •••••Personal Software's VISICALC ~ata Lasemanagement with advanced mathematical rr.odeLlinq I'eatures ....•S!\RGON supe r chess for the PE'l'•••an 80 char acter vicreodisplay equippe d PET.... a 1.1 megabyte dual floppy 5 1/<1"oisk PET peripheral.

Meetings or Eyents

12th June

The 1st annual Sheridan College nusic Syr.iposiun: A oneday seminar featuring an expe rt, look at tile state of the artComputer r<usic hardware and software technologies includinglectures by Hal Chamberlin, Jim Butterfield, Prof. SterlingBeckwith and others. For further information contact;

Eargo llartin,1430 Trafalgar Fd.,Oakville, Ontario,L6H 2Ll,

(416) 845-9430 ext 132.

13th J~

'I'ornrao rr ow is Here: The Impact of the New Technogy OnEducation. A one day International Conference of interest toEducators from Pre-school to Post Secondary levels under theauspices of the Hamil ton Board of Education, the Ontar iof.1athematics Coordinator s' Association and rlcf.'iasterUniversity. For further information contact;

TOt-mORROVlIS HERE,P.O. Box 558,Hamilton, Ontario,L8N 3Ll

15th-18th June

The 1980 Summer CES (Consumer Electronics Showplace)

7

Page 8: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 8/48

r·lcCormack Place, Chicago, II. The def initive dealer andtrade show that covers the whole consumer electronics ball ofwax ••• audio, video, communication and computers.

Special Note;

The Transactor is a national periodical. As such wewould like to keep readers abreast of maJor events ormeetings of regional or local interest. If you are aware ofsuch occurances please drop a note to The Transactor's editorat the following address;

Editor,T he T ra nsa cto r,Commodore Business Machines Ltd.,3370 Pharmacy Ave.,A gi nco ur t, O nt ar io,MH'l 2K4( 41 6) 4 99- 42 92

Please provide as much lead time as possible (2 to 3

months is a safe bet.)

Interested in Micro-computer Networking

PET Community members interested in forming computerbulletin board communication networks are asked to contactthe Editor. The Transactor will regularly publish articlesand software, act as a clearing centre or catalyst to furtherthe establishment of this important facility.

FLASH! FLASH! FLASH!

Educators ••••Commodore Canada is happy to announce that

the three for two Pet offer is back. For a limited time ••••to August 15, 1980 bonafide educational institutes canreceive, from Commodore, one free Pet for every two theypurchase from an author ized Commodore dealer. For furtherdetails contact your local dealer or the following address;

Commodore Business Machines Ltd.,3370 Pharmacy Ave.,Agincourt , Ontario,MlW 2K4,( 416 ) 4 99- 42 92

(\

o

Page 9: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 9/48

Attention Programmers!

Mr. Bill Twyman has recently been apointed SoftwareManager for Commodore Canada. To further develop thesoftware department of the computer division, Bill hassubmitted the following:

Dear Transactor Reader

Many things - exciting things are happeninghere at Commodore.

As all of you know, a PET won't do very muchwi thout software. As a result, we are solicitingsaleable software which can be marketed byCommodore on a national basis. All you have to dois write it and we will handle the rest. No matterhow specific the use might be, there are other PETusers who would be interested. This is also a goodway to make the PET pay for itself.

Simply do the following: send me a working

copy of the program plus written documentation.All submissions will be treated with the utmostconfidentiality and will returned to you afterevaluation.

Any questions will gladly be answered. Pleasecall me at:

Commodore Business Machines416 499 4292

Let's see what's out there!

Bill TwymanSoftware Manager

9

Page 10: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 10/48

Input and Output from PET Machine Language J im But te rf ie ld 'Toronto

Output to the screen is quite straightforward. Load theASCII character into the A register; then call the routine atFFD2. Special characters, such as cursor movements, will behonoured in the usual way.

The GET activity gives no trouble, either, except forone minor situation. To do a GET, call FFE4 and thecharacter will appear in the A register. If you don't have a

character available, the subroutine will return zero in the Aregister. Since you can't get an ASCII zero from thekeyboard, recognize this as a "no-character" situation andarrange to deal with it as desired.

INPUT is a little trickier. When you call FFCF forInput, you'll get one character back. This seems like a GET,but it's really quite different. The first time you call, itwill prompt and get an input, transfering it via the screenin the usual way; then it will edit out leading and trailingspaces and quote marks. After doing all this work, it willdeliver the first character to you. On subsequent calls, itwill deliver following characters. When it has delivered the

whole input, it will deliver a Return character to signalyou've got it all. After that, it starts over.

Beginners will be happier using the GET call.

Peripheral Input/Output

Surpr isingly easy, once you have the above techniquesmastered.

Start by OPENing the file in BASIC, before you go tomachine language. When you're ready to the actual activity,

the machine language sequence is as follows:

Load X with the logical file number;For INPUT or GET, call FFC6 to set the inputchannel;For output, call FFC9 to set the output channel;

Now use you INPUT, GET, or output calls asde scribed above;

Finally, restore the normal input/output channelswith a call to FFCC. Careful! This routinechanges the A register to zero.

Wind up your program in BASIC by closing all files, as usual.

When you're INPUTting or GETting from an externaldevice, keep an eye on the status word, ST (located at 020Cin original ROM, or at 96 in 2.0 ROM). It will warn you whenyou reach the end of a input file.

The above procedure isn't too hard, and it's likely tocarry through to newer versions of ROM when they appear.

10

Page 11: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 11/48

An Instring Utility for the 16/32K PET

Have you ever wanted to program something like •••

MID$ ( A$, 10) = "Name, Address, etc ••• "

•••well now you can! •••thanks to another fabulous routine by BillMaclean of BMB CornpuScience, Milton Ontario. The routine worksonly with PETs using the 2.0 ROM set.

This is a little utility to allow a programmmer to change asubstring within a main string. Its primary uses are manipulatingdata records in disk files and setting up formatted printer orscreen outputs. It is called with the following command

SYS 826,A$,B$,K

This command string will cause the string A$ to be placed

within string B$, starting at the 8th character. The A$,B$,and Kare all variables. Any variables can be used. The programmer isresponsible for assuring that the length of the main string isnot exceeded.

The machine language routine can be entered using theresident monitor and cursor editing the screen display. The codeis completely relocatable and can be placed anywhere or relocatedanywhere. The calling address (826 above) should be the addressof the first byte of the program.

PC IRQ SR AC KR YR SP

· 0005 E62E 30 00 5E 04 F5·,.M 033A 0382

· 033A 20 F8 CD 20 9F CC AO 00·.· 0342 Bl 44 85 00 C8 Bl 44 85·.· 034A 01 C8 Bl 44 85 02 20 F8·.· 0352 CD 20 9F CC AD 01 Bl 44·.· 035A 85 OF C8 Bl 44 85 10 20·.· 0362 F8 CO 20 9F CC 20 02 06·.· 036A A5 12 FO 03 4C 03 CE C6·.· 0372 11 A5 OF 18 65 11 85 OF·.· 037A 90 02 E6 10 AO 00 Bl 01·.· 0382 91 OF C8 C4 00 DO F7 60·.

11

Page 12: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 12/48

PET as an IEEE-488 Logic Analyzer Jim Butterfield, Toronto

If you'd like to see what's going on on the GPIB - andif you can borrow an extra PET and IEEE interface cable -this program will help.

It shows the current status of four of the GPIB controllines, plus a log of the last nine characters transmitted on

the bus.

The four control lines are NRFD, NDAC, DAV and EOI. Itwould be nice to show ATN too, but I couldn't fit this in:it's detected in a rather odd way in the PET so that fittingit in is somewhat too tricky for this simple program.

The last nine characters are shown in "screen format".This means that you'll have to do a little translation workto sort out what some of them mean. On the other hand, itallows you to see characters that otherwise wouldn't beprinted. A carriage return, for example, shows up as a lowercase mi this is a little confusing at the start, but you'llquickly get used to it and it's handy to see everything that

goes through. Don't forget that original model PETs may showupper and lower case reversed.

I had hoped to show which characters were accompanied bythe EOI signal. It turned out that time is critical - thebus works very fast - and that adding this feature would cutdown the number of displayed characters from nine to five. Iopted for the bigger count and dropped the EOI log feature.

The high speed of the bus makes it difficult to watchthe control lines in real time. When the "active" PET isexchanging information with disk or printer, everything ishappening very fast, and the "logic analyzer" PET will show

an amazing flurry of activity on the cont.roI lines. Onlywhen the activity stops or hangs up will you be able to seethe lines in their static conditions.

You may use the program to chase down real GPIBproblems, or just to gain insight on how the bus works.Either way, it will come in handy if you can borrow thatextra PET unit.

10 REM IEEE WATCH JIM BUTTERFIELD20 REM MAY 1980:;:(1 pm '::E 59468., 14: PR I HT":J DR '... HRFD t·4DAC EO I " : PR I t-n"40 F ' F . : UH" = 12 :34567 :: :9= :p :] "50 : : ; ' T ' : : ; 12~)(1

·t· l

1 2

Page 13: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 13/48

. ' I E l : : . t : . ~ 'JHTCH .J It1 BUTTEPFIELI I r ' 1 A ITI/

1

:::[1

1 1(1 : 04E:~~1 * = $4B(1

120: 04]::(1 DFLAO = $:E:l1 : ' = : 1 7 1 : 04E:0 m·u-~ A'" ,' = $ : E : 2

1 4(1 : (14B0 EOI SA ', ,.' = $f;:;:

2~~1(1 (14B[1 46 1::1 ::;TAF.:T t ,-·r, DFLACi. . - . : . r : .

21(1 : 04B2 7::: ~ = ; E I

220: 04B~: AD 1'-' E': ' t'lA I H LDA $E::!12: : . . '-'

2:30: [14B6 r'Q EF C : T ' 1 F ' #$EF- ' - "

24[1 : ( 1 4 : E : : : : D ~) ~)2 BHE cour25[1 : [i4BA C ' . - . C:LI_ " : _

250: [14E:B 6[1 ):;:tT'-.'0 l.:.

2!:: (1 : 04:£:C AC 10r - . - . cour LIJ !TI $EB10 . ;EOIc.':'

290: [14BF AD 40 E'-' LDA $E:::40 . ; I 1 A I,/ .. t·~F~FII., t ·WAC:.

300: 04[:2 AE 2[1 E ':' L I t > : : $E:::2(1 . ;DATA'-'

310: [14C5 29 Cl At·m #$[:1 . ; E > = : T F . :A C : T BIT::;

: : : :2 [ 1 : [14C7 C5 E , r : , Ct'1P II t·~t·~A \ , 1c:

:3:3~~1 04[:9 D [1 11 I:t'~E mH'~:~:40: [14CB ,:'t:_ 1'T'A, - - 1 _ ,

:~ :5[1: [14CC 29 40 A t · m #$4~) . ; E : : ' : : T ~ : R C : T EOI:~:6[1: 04CE [iA A::;L A

:~:70: [14CF 49 A~) E C I F . : #$A[1

: 3 f : { . , : 04Dl C5 E " - ' EOI C : t ' 1 F ' Ee l I= ; A I , . "•:J

:390: [14D~: F~3 DE BEG! t'1AIt·.)*)[1: [14D5 Cle:- E":' :=:TA EOISA\ '_1o_I 1,_

41~3 : [14D7 !::II 61 :::0 ::;TA $:::[161

42[1: ~~14DAD0 D? Bt'~E t'lA I H.; ACT I '','' 1 'T ' SEEt-~ - UPDATE ::;CF.:EEt·~

4~:~3: 0411(: . - . c E"":' m · u · ~ ~:;TA mU·6A'", ': •• _1 ,~

440: 04DE . - . . , : . 80 AHD #$80: " _ 0

450: 04EO 49 A~~1 E C ; F . : #$A~)

46[1 : t14E2 sn C " . - . :::~3 ~:;TA $:::(152_''::'

47~3 : [14E5 1 [1 in E'CII NDAV .;t·m IIA"/ ::;EEt·~I '-

500: 04E? A4 E:l LD 'T ' DFLAG

51(1 : (14E9 :3~~1E: Btu DCOt-H .;DA'·/ ::;EEt~ BEFOF.:E52 ~) : {NEE: , - . e : : : "Bl ~:;TA DFLA( ;: ._ .

5:3(1: 04ED•.e:"

E"":' STA DHHSA '",'= ' 0 _ ' ''::''

54[1 : [14EF A~3 [n] LIt'T' #(155~3: 04Fl E:9 A'-' se SCROL LItA $ : : : 0 A 2 0 ' 1 1: : . .

56~~1 04F4 ,::,q A l B0 STR $8[1Al. , 'T 'o _ .

57[1: 04F7 C : : : : Ir·N5:::(1: 04FB C0 0::: r·...... #':'·r T :_ ,

59~3 : 04FA In) F5 :Bt'~E ~:;CF.:OL6[n] : 04FC :::A T>::A600: (14FD 4'::' FF ECtF.: #$FF- '6[uJ: ~J4FF :::II A 9 :::~:1 : : : : T A $:::0A961[1 : (1502 B(1 AF : B C : : : ; t ' 1 A I t · i

64[1 : [15~~14'-Ie:- B l t·mA'·," 3TA DFLACi: ' 0 _ 1

650: 0506 Ae: ' E ' o - , I ICONT LDA I l t o ~ t " i : = ; R \ "'- ', c . : . ,

66(1: (150::: 29 4(1 At·m #$4~~1 .;t·jF .:F It67~1: [15(1A (1A A~:;L A6:::~:1: ~~15[1l::49 A~3 E C t F . : #$A069~): [15(1It : = : I ! 57 :::(1 3TA $:=:(157

7 ~ J 0 : 0510 A 5 p''':' LItA Dt-~t'6A'""'::''

71[1 : [1512 29 01 At·m #$1 0 ; t'~IIAC:-,.-"-,, . 0514 4A L : : ; F . : A. a :: : . 1 o ' :1 • .

7 :3 (1 : (1515 6A ~ : C J F . ~ A74(1: 0516 4'::' F lO EO F . : #$RO'

7 5(1 : (151::: !::II 5[: : : : ( 1 ::;TA $:::05C

76£1 : 051E: ne 96 Bt'~E t'1AH1

Page 14: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 14/48

COMPUTER PHILOSOPHY W.T. GarbuttMississauga, Onto

"It was the best of times, it was the worst oftimes, it was the age of wisdom, it was the age offoolishness, it was the epoch of belief, it was theepoch of incredulity, it was the season of Light ,it was the winter of despair, we had everythingbefore us, we had nothing before us, we were allgoing directly to Heaven, we were all goingdirectly the other way--in short, the period was somuch like the present period, that some of itsnoisiest authorities insisted on its beingreceived, for good or for evil, in the superlativedegree of comparison only."

So began Charles Dickens in the famous introduction ofthe 18th Century setting for "A Tale of Two Cities" over acentury ago! As with all great literature, the visionDickens gives is perhaps centuries ahead of its time, in anyevent just as germane today as it was when Dickens first

wrote it. Today Western civilization is on a precipice; thebrink of a great leap forward for Humanity or a momentary orperhaps fatal fall.

While less than one-sixth of the world's populationconsumes over 80% of world resources, hundreds of millionsfight daily to survive on the remainder. And those whosurvive remember!

For the fortunate few, the leap forward has begun. Whilescholars will argue for generations as to the precise time,(there probably is not one ) the race to the Moon will likelysymbolize the start for many. None of the generation of thesixties will forget President Kennedy's proclamation to reachthe Moon by the end of that decade ( nor will they likelyforget his tragic and senseless death). The last briefdecade has witnessed a massive expansion of knowledge, theextent of which is beyond human comprehension. If allknowledge known were increased by the order of a magnitude inthe 70's, is there any doubt the increase will be two ordersof magnitude this decade? Is there any certainty that thisexponential knowledge explosion will quench humankinds'thirst by the 21st century?

Yes. There is serious doubt if the knowledge does not

bring with it a maturity, a compassion for fellow man, asharing and a sacrifice. The dismal scenario has alreadybeen summar ized by Mr. Dickens in the 18th century: war,pestilence, famine and destruction. And even with ourpresent limited knowledge is there any doubt that a similarorder of a magnitude, an exponential order of horror couldsoon be our legacy.

There are disquieting signs that the future optimism, ourtraditional western belief in historical progress may be opento serious question. What Western civilization must guardagainst is introspection. Cultural isolation will almostcertainly provide the impetus for an apocalypse. This

14

Page 15: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 15/48

introspection can take many forms. Host famil iar to thereaders of The Transactor is the discipline of electronicsand more particularly computers.

Certainly this is a paradox. The computer, the singlemost important element in the recent knowledge explosion, thegenie that could provide the key to the crucialinter-relationships in what at present is an incomprehensiblemass of data, surely could not be viewed as retrenchment. On

the contrary if a limited number of well educated andaffluent people become preoccupied with the computer solelyfor their own personal intellectual gratification that isprecisely what could happen.

However it need not happen. What is required is anatmosphere of freedom, freedom of thought, expression,knowledge freely accessible to all as well as freedom fromhunger and poverty. A vast educational challenge existscertainly as great as that witnessed in the race to the Moon.And the micro-computer is ideally suited as a centralinstrument in meeting the challenge.

One of the major micro-computer applications will becommunications. The micro-computer must become asuniversally used as the light bulb. It must be available tothe 'outbacks' of civilization as well as the present templesof Western civil izations (Universities) • Computer literacymust become, with literacy, the prime objective of man afterthe basic survival improvements over hunger and poverty. Nolonger must language create communication barriers betweennations, no longer may state bureaucracies hide knowledgeclandestinely or inadvertently, no longer can corporationsshape consumer habits through controlled ignorance.

These freedoms of course carry risks. Change createsinstability. Governments and citizens fear unbridled changeespecially anarchy. But the risks of not accepting thechallenge is greater. We could lose all the significantadvances that civilization to date has witnessed. Thepresent world population could turn away from a Westerntradition that failed to solve humankinds most immediateproblems.

The computer can become a central tool to manage today'sknowledge, freeing man's creative and underutilizedimagination, permitting him time to examine himself.

Today Western civilization senses the future. One hasonly to witness the long lineups and multi-billion dollar boxoffice receipts for 'science fiction' movies. Today'saudiences are seeing implemented yesterday's dreams. Andsuper realistic depictions of tomorrow. The audiencesunderstand, as never before, the revolutionary technologicalconcepts. Indeed they will accept nothing less. In manyinstances these special effects were only made possible withthe aid of the computer. We must not permit this phenomenonto become a form of escapism. It is important to feed thescientific needs of our citizens. But we must also considerthe equally important spiritual needs. ego beliefs and

values.

I S

Page 16: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 16/48

The computer can provide assistance to man. For everyself-gratifying use there is equally a use that will helpmeet the challenges. From simple energy conservation methodssuch as controlling house temperature, or arranging car poolsto complex techniques to improve work effiency computer usesabound to cut waste.

A recent industry census indicated there are over 500,000

computers in personal use today. Within two years personalownership is projected to quintuple. Think of the immensenumber of applications such a user population can generate.

As a member of the micro-computer community, ask yourselfthe question "What uses can I derive and implement that willaid, no matter how insignificant it may appear, in meetingthe challenges of today?" Talk to fellow users , share yourideas and you will likely find yourself in the vanguard ofto mmo rr ow 's l ea de rs.

16

Page 17: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 17/48

A BOOK REVIEW Tom vlojdyloSES (Computing) Inc.

About a month ago I received a copy of "PET and the IEEE488 Bus (GPIB)" by Eugene Fisher and C. W. Jensen. I took animmediate liking to it because of the very readable approachthe authors take to a potentially very dry technical subject.The use of diagrams, cartoons and timing sequences alsoenhances the reader's understanding of what is being

discussed.

Chapter one discusses systems and the developement ofthe IEEE STD 488 Bus.

Chapter two describes each line of the GPIB, the basicbus structure, control lines and data bus lines. A handshakeprocedure with the PET as controller/talker andcontroller/listener is detailed.

The fourth and fifth chapters get into programming thePET for the IEEE 488 Bus. There is extensive coverage of theBASIC statements and commands and how they are executed, withdetailed diagrams of the timing sequences which are generatedon the GPIB Bus.

In the last three chapters, typical interfacingapplications to standard and non-standard devices areexplained. For example, there is information on printerswhich are usually non-standard devices and an HP DigitalVoltmeter which has an IEEE STD 488 Bus.

All the data in the book is related to both old and newROMs and this is a very important feature.

I found this book addresses PET users at all levels -from the hobbiest to the digital circuit designer; from thecollege student to the scientist.

It is an excellent reference for community collegeinstructors and students which help them both to understandthe fundamentals of the IEEE 488 Bus.

In today's rapidly changing technology, a book with suchexaustive, up-to-date information is an excellent referenceworth having in any PET user's library.

17

Page 18: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 18/48

CROSS - REFERENCE Jim Butterfield, Torontoalso in Compute #4

One of the handy things about the 2040 disk system isthat it allows you to read programs - or write them, for thatmatter - as if they were data files.

The possibilities are endless: you can analyze orcross-reference programs; renumber them; repack them intominimum number of lines deleting spaces, comments, etc.; or

even create a program-writing program that is tailor-made fora particular job.

This program does cross-referencing of a BASIC program.It's written in BASIC: that means that it won't run too fast(all those GET statements) but you can read what it's doingfairly easily.

There are two types of cross-references normally neededfor a BASIC program. One is the variable cross-reference:where do I use B$ ? The other is a line-numbercross-reference: when do I go to line 360 ? CROSS-REF doeseither. An example of both types is shown - the program inthis case did the cross-references of itself.

CROSS REFERENCE - PROGRAM CROSS-REF

A 270 280 300 310 390 400A$ 180 240 260 270 300 460 490 500 510 520 560

570 580A$( 100 200 330 340 350 360B 190 200 220 320 330 340 350 360B$ 180 240 480 500 520 580 590

B$( 100 120 480C 280 370 390 410 420 430 440 450 540 550C$ 480 520 580 620C( 100 140 150 160 310C1 280 310 370 420 440C2 130 150 205 280 370 380 450 565C9 310 410 420 440 470 480J 140 150 200 210 220 330 340 350 560 630K 200 210 220 320 340 350 360 565 570 580L 260 280L$ 200 206 280H$ 330 340 360 370 450 460P$ 170 5500$ 120 510S$ 120 280 590 610 620X 200 220 560X$ 200 205 206 210 220 560 580 590X$( 100 210 220 560y 590 600 610Z 540 600Z$ 130 530 540

18

Page 19: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 19/48

100 DIH A$(15) ,B$(3) ,X$(500) ,C(255)110 PRINT"CROSS-REF JIM BUTTERFIELD"120 Q$=CHR$(34) :S$=" ":B$(1)=Q$:B$(3)=CHR$(58)130 INPUT"VARIABLES OR LINES"iZ$:C2=5:IFASC(Z$)=76THENC2=6140 FORJ=lT0255:C(J)=4:NEXTJ:FORJ=48T057:C(J)=6:NEXTJ150 IFC2=5THENFORJ=65T090:C(J)=5:NEXTJ:FORJ=36T038:C(J) =7:NEXTJ:C(40)=8160 C(34)=1:C(143)=2:C(131)=3170 INPUT"PROGRAH NAHE" i P$ :OPElU, 8,3,"0:"+P$+" ,P,R"

180 GET#1,A$,B$:IFASC(B$)<>4THENCLOSEl:STOP190 IFB=OGOT0240200 PRINTL$i:K=X:FORJ=BTOlSTEP-l:PRINT" "iA$(J) i:X$=A$(J)205 IFC2=6ANDLEN(X$)<5THENX$=" "+X$:GOT0205206 X$=X$+L$210 IFX$(K»=X$THENX$(K+J)=X$(K) :K=K-l:GOT0210220 X$(K+J)=X$:NEXTJ:X=X+B:PRINT:B=O230 REM: GET NEXT LINE, TEST END240 GETtl,A$,B$:IFLEN(A$)+LEN(B$)=OGOT0530250 REH GET LINE NUf-1BER260 GETtl,A$:L=LEN(A$) :IFL=lTHENL=ASC(A$)270 GETtl,A$:A=LEN(A$) :IFA=lTHENA=ASC(A$)

280 C=C2:Cl=-1:L=A*256+L:L$=STR$(L) :IFLEN(L$)<6THENL$=LEFT$(S$,6-LEIJ(L$»+LS290 REM GET BASIC STUFF300 GETtl,A$:A=LEN(A$} :IFA=lTHENA=ASC(A$)310 C9=C(A} :IFC9>CIGOT0380320 K=0:IFB=OGOT0360330 FORJ=lTOB:IFA$(J)=M$GOT0370340 IFA$(J)<M$THENNEXTJ:K=B:GOT0360350 FORK=BTOJSTEP-l:A$(K+l)=A$(K) :NEXTK360 B=B+l:A$(K+l)=M$370 C=C2:Cl=-1:M$=""380 IFC2=5GOT0420390 IFA=1370RA=1380RA=1410RA=167THENC=6:GOT0470400 IFA=440RA=32GOT0470

410 IFC9<>6THENC=9:GOT0470420 IFC9=CTHENC=-1:Cl=4430 IFC>6GOT0470440 IFC<OANDC9>CIANDC9>6THENCl=C9:GOT0460450 IFC2=5THENIFLEN(M$»20RC>OGOT0470460 N$=H$+A$470 ONC9+1GOT0190,480,480,480:GOT0300480 B$=B$(C9) :C$=""490 GET#1,A$:IFA$=""GOT0190500 IFA$=B$GOT0300510 IFA$<>Q$GOT0490520 A$=B$:B$=C$:C$=A$:GOT0490

530 CLOSEl:INPUT"PRINTER"iZ$540 C=3:Z=6:IFASC(Z$)=89THENC=4:Z=12550 OPEN2,C:PRINT#2:PRINTt2,"CROSS REFERENCE - PROGRAH ";P$560 X$="":FORJ=lTOX:A$=X$(J)565 IFC2=6TEENK=6:GOT0580570 FORK=lTOLEN(A$}:IFMID$(A$,K,l)<>" "THENNEXTK:STOP580 B$=LEFT$(A$,K-l) :C$=MID$(A$,K+l) :IFX$=B$GOT0600590 PRINT#2:Y=0:X$=B$:PRINTI2,X$iLEFT$(S$,5-LEN(X$» i

600 Y=Y+l:IFY<ZGOT0620610 Y=1:PRINTt2:PRINT#2,S$i620 PRINT#2,LEFT$(S$,6-LEN(C$)}iC$i630 NEXTJ:PRINT#2:CLOSE2

10

Page 20: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 20/48

CROSS REFERENCE - PROGRAH CROSS-REF

190 470 490205 205210 210240 190300 470 500360 320 340370 330

380 310420 380460 440470 390 400 410 430 450

480 470490 510 520530 240580 565600 580620 600

Reading a BASIC Program as a File

To read a BASIC program, you must OPEN it as a file,using type P for PRG rather than S for SEQ. Line 170 ofCROSS-REF does this.

If you read a zero character from the program (that IsCHR$(O), not ASCII zero which has a binary value of 48), theGET. command gives you a small problem: it will give you anull string instead of the CHR$(O) you might normally expect.You need to watch this condition and correct it wherenecessary: you III see this type of coding in lines 260, 270and 300.

The first thing to do when you OPEN the file is to getthe first two bytes. These represent the program startaddress, and should be CHR$(l) and CHR$(4) for a normal BASICprogram starting at hexadecimal 0401 (see line 180).

Now youlre ready to start work on a line of BASIC. Thefirst two bytes are the forward chain. If they are both zero(null string) we have reached the end of the BASIC program;otherwise, we donlt need them for this job (see line 240).

Continuing on the BASIC 1ine: the next pair of bytesrepresent the line number, coded in binary. Welre likely toneed this, so we calculate it as L (lines 260 and 280) andalso create tt's string equivalent, L$. We take an extramoment to right-justify the string by putting spaces at thefront so that it will sort into proper numeric order.

From this point on we are looking at the text of theBASIC line until we reach a zero which flags end-of-line. Atthat time we go back and grab the next line.

20

Page 21: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 21/48

Detailed Syntax Analysi~

When digging out variables or line numbers, we haveseveral jobs to do. As we look through the BASIC text, wemust find out where the variable or line number starts. Fora variable, that's an alphabetic character; for a linenumber, it's the preceeding keyword GOTO, GOSUB, THEN or RUNfollowed by an ASCII numeric.

Once we've "aquired" the variable or line number, we

must pick up its following characters and tack them on. Forline numbers it's strictly numeric digits. For variables,things are more complex. Both alphabetic and numeric digitsare allowed, but we should throwaway all after the first twosince GRUMP and GROAN are the same variable (GR) in PETBASIC. We must also pick up a type identifier - % forinteger variables or $ for strings - if present. Finally, wehave to spot the left bracket that tells us we have an arrayvariable.

To help us do this rather complex job, we construct acharacter type table. Each entry in the table represents anASCII character, and classifies it according to its type.

Numeric characters are type 6. If we're looking forvariables, alphabetic characters are type 5, identifiers aretype 7, and the left bracket is type 8.

To help us in scanning the BASIC line, we define theend-of-line character as type 0; the quotation mark as type2; the REM token as type 3; and the DATA token as type 4.

Every time we get a new character from BASIC, we get itstype from table C as variable C9. If we're looking for a newvariable or line number, we see if it matches C - alphabeticfor variables, numeric for line numbers. Once we find the

new item, we kick C out of range and start searching based onthe value of CI. This mechanism means that we can search fora variable starting with an alphabetic, and then allow thevariable to continue with alphabetics, numerics or whatever.

To summarize variables in this area: A is the identityof the character we have obtained from the BASIC program, andC9 is its type. If we're searching, C is the type we arelooking for; otherwise it's kicked out of range, to -lor 9.CI tells us we're collecting characters and what type we'reallowed to collect. C2 is out variables/line numbers flag;it tells us what we're looking for. M$ is the string we'veassembled.

The routine from 480 to 520 scans ahead to skip overstrings in quotes and DATA and RE~l statements.

Collecting the Results

For each line of the BASIC program we are analyzing, wecollect and sort any items we find, eliminating duplicates.They are staged in array A$ in lines 320 to 370.

When we're ready to start a new line, we add this tableto our main results table, array X$, in lines 200 to 220. To

21

Page 22: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 22/48

save sorting time, we merge these pre-sorted values into themain table. At this point, our data has the line numberstuck on the end; this way, we're handling two values withina single array.

Because the merging of the two tables must start at thetop so that we can make room for the new items, the items arehandled in rever se alphabetic order. ~ve pr int this to thescreen so that you can watch things working. At BASIC speed,

this program can take quite a while to run; it's nice toconf irm that the computer is doing something dur ing thisperiod.

Final Output

We finish the job starting at line 530. It's mostly aquestion of breaking the stuck-together strings apart againand then checking to see if we need to start a new line.

DO Your Own Thing

The size of array X$ determines how large a program you

can handle. The given value of 500 is about right for 16Kmachines; with 32K you can raise it to 1500 or so.

If you're squeezed for space, change array C to aninteger array C%. As you can see from the cross referencelisting, you'll need to change lines 100, 140, 150, 160 and310 - see how handy the program is ?

As mentioned before, run time is slow. A machinelanguage version or even a BASIC program with machinelanguage inserts - would speed things up dramatically.

NOTE: Some ASCII printers may give double spaced output. Ifthis is a problem the PRINT#2 statements in 590 and 610should be changed to PRINT#2,CHR$(13);.

Page 23: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 23/48

Better Auto Repeat

David Berezowski of ASCII Computing, Thunder BayOntario, has submitted another repeat key program which mightbe used instead of the one printed in Transactor 17.

o REM RELOCATABLE AUTO-REPEAT BY ...1 REM DAVID BEREZOWSKI

2 REM ORIGINAL CODE TAKEN FROM BEST OF TRANS. VOL 13 REM UPDATED FOR NEW ROM AND PUT INTO RELOCATABLE FORM BY DAVID BEREZOWSKI4 REM RELOCATABLE FORMAT TAKEN FROM J. BUTTERFIELDS TRACE ROUTINE5 K= O1(1 F 'R I r'~TI::1!!ITH::; PROGRAt'1LOCATE::; :.fiUTO-REPEAT~ It ·~"20 PR nrr IIAt·N ::;ZE r'1Et'1OR'r'HAT I::; FITTED •.• : ! . l "

30 IFPEEK(65000)=254THENE=52'D=0:GOT06040 IFPEEK (650(10)<) 192THEt·~PF.:rH"?? I Ilot·~.T ~: :Nm·J 'r'OURRD t ' 1 " ? " ? II :Et·m50 E=134:D=4:K=3:FORJ=lT056:READZ:NEXTJ6~:1PP It-H"I:::;EEHAT 'r'OUHA"/E fit·~.;70 IFE=134THEt-WRHnIORICin~AL".:~30 IE=52THHWR It - n IIUPGRADE II .;

9(1 PR I r-H" F - : 0 t·1."95 FOPZ=lT02000'NEXT100 DATA 162.3.181.255.157.45.3.202.208101 DATA 248.56.169.233.229.145.133.145102 DATA 96.165.166.201.255.208,10.169103 DATA 0.133.15.169.48.133.16.208.19104 DATA 230.15.165.16.197,15.176,11105 DATA 169.6.133.16,162.255.134.151106 DATA 232.134.15.76.46.230

150 REM**** ** * * * * ** * * * * ** * * * ** *160 REM* END OF UPGRADE DATA *170 REM**** ** * * * * ** * * * ** * * * * ** *200 DATA 162.3,181.255.157,132,3,202.208

201 DATA 248.56.169.233.237.26,2.141.26,2202 DATA 96.173.35.2.201.255,208.18,159203 DATA 0.133.60.169.48,133,61,208.29204 DATA 230,60.165.61.197,60,176.12205 DATA 169.6.133.61.162.255,141.3,:206 DATA 232,134.60.76,133.2301000 S2=PEEK(E)+PEEK(E+1)*25611(15 ~:;1=~:;2-56-II

1010 FORJ=S1TOS2-11020 READX:POKEJ.X:NEXTJ1030 S=INT(Sl/256):T=S1-S*2561040 POKE0,76·POKE1.T+18+D/2·POKE2.S1050 POKEE.T:POKEE+1.S

1060 POKEE-4.T:POKEE-3.S1130 P F . : I tn II).'!~!!l===AUTO-REPEAT===I

1140 PR I t·n"! ! l T O Et-~AE:LE:svs II:::;

1150 PRItH IITD D I SABLE: ::;'r':::;":;1160 PF.:tH" :!!l::HAr·H3E:;PEED~.JI TI-!:FCJ}:::E"'::;1+4::;:t : : : IIU. :: <

1170 PPItH"CHAt'KiE DELA'r'L·~ITH: F·C!<E"::;1+~~9+t:::"n,::·::: : : : < > 1 0 )

11:::0 F .: I H T W!!l::.rrO> O : :P E F . :I E t -~ C E THE F S U : ; : : ; T F J i T I O r '~ F r - . : : m ' ; "1190 P F . : nn" ::·I<E'r'-OUtKE THAT F i L L TF~:r~:':;H-::::0 OW··IEP::;"1;;;;:00PHlT";::i'1U::;TUT UP LHTH. T F'r ' F 'CW :H ~IJ " : : : ; 1 + < 2 : ; 1 + 1 .::

1210 PP I HT II : : - l . J I TH "_·'ALUe:;E::;::;HAt! :;!"122(1 PPII·n"lNOTE: 'r'OI_!'1U::;TI';::;f{r::U::: PUT'=i····F:EFEr~·r"1 . 2:30 F'F:I ~ ·~ ·TIf . :EF~:!F:~E~_!~:;n o THE C : : = I : : : ; ~ : ; : : ' T · r ? II

23

Page 24: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 24/48

THE 'Um1EDGE' -- A TAPE APPEND AND RENUMBER PROGRAM

Hany PET users have only tape input for their system.(Until a fevl weeks ago, I was among that majority). If youhave often wanted to append a favourite subroutine, you mayhave been stymied. I use the input subroutine from Cursor 14

('INP', Oct 1978) in many programs. You may have your ownfavourites, if only there was an easy way to append them.

Another possibility might entail merging several shortprograms together, such as the Osborne & Associates: 'SomeCommon Basic programs'. Individually, most are quite short,which could permit a 'menu-driven' composite program.

I am sure that other applications may come to mind.

Most of us have a Renumber program of some sort, whetherit is in Machine Language, or as a Basic subroutine which istacked on to the end. The main disadvantage is that thelocation in memory is fixed.

\velcome to the Upgrade-RDr1 combination of the two, whichoffers:

* ** Machine Language for speed of operation.* * * Full relocatability to anywhere in RAM. When run,'APPEND/RENUM' places itself in high memory and protectsitself from intrusion by Basic.* * * The 'Unwedge' (or '< ' key) attaches itself to theoperating system. It may be used in the Direct Mode with aminimum of user input.* * * It is compatible with the Disk Wedge routine. Although theAppend function works only with tape input, both Wedges maybe active simultaneously.

* * * The routine may be implemented and de-activated with thesame 'SYS' command.* * * Uses only 771 bytes of memory.

Bill Seiler deserves the credit for nearly all thecoding. In Pet User Notes (Vol 1,#7 Nov/Dec 1978), hepresented his 'PET Renumber 3.0' for Original ROM. This hasbeen converted to Upgrade R0l1 and allows for user input ofparameters.

In our own Transactor (Vol 2,#3 July 1979), Billpresented the Append Wedge for Original ROM. In the same PetUser Notes issue, Jim Russo and Henry Chow gave us fr17171.This is a high-monitor with merge capability for OriginalROM. Features of both of these were converted to Upgrade ROM,and several additions made.

TO USE THE PROGRAM:

1. Copy the program listing.2. Save it immediately, since Machine Language routines havea nasty habit of crashing, with even the slightest error.3. 'RUN' the program, and copy down the information whichappears (after about 20 seconds).

24

Page 25: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 25/48

4. Save the Machine Language code with the ML Monitor if youwish to use it in the same memory location every time.5. Activate the routine with the given 'SYS' command. Sincethis has been made reversible, you may de-activate with thesame call. (Don't save the program when the Unwedge isactive).6. Enter 'NEW' to clear the Basic portion. You are now readyto use 'APPEND/RENUM'.

TO RENUMBER A BASIC PROGRAM IN MEMORY;

1. Clear the screen, and move the cursor 3/4 of the way downthe screen.2. Enter the ' < I key in the first column of a line, then hitthe 'R' key.3. If you hit 'RETURN' now, the program will be renumbered,starting at 100, in steps of 10. (The default conditions).4. For a different starting point, simply enter that numbernext. Be careful that the final line number will not exceed63999.5. If you wish a different step size, enter a comma (','),then the new increment. Values up to 255 are acceptable.

6. After you have hit 'RETURN', the message 'RENUMBERING'will be pr inted. The screen memory is used for stor ing theline numbers, so it will now show a variety of characters.7. When the cursor returns (5-20 seconds), the job iscomplete. All 'GOTO','THEN','GOSUB' and 'RUN' destinationswill be changed. Any illegal or unreferenced line numberswill be numbered '65535' as a flag to the error.8. The screen memory will handle only about 500 lines. Thisshouldn't be a real limitation on most programs.

TO APPEND ONE BASIC PROGRAM TO ANOTHER;

1. Place the program to be appended in Cassette #1 drive. The

first line number of this program must be larger than thelast one currently in memory. Use the Renumber function toprepare the program tape, if necesssary. (This is the benefitof combining these two utilities).2. Enter the ' < I key in the first column of a screen line,then the letter 'A'. (You may enter the whole word, 'APPEND',but the program only checks the first letter).3. If you wish a specific file to be Appended from tape,enclose the file name in quotes, just as with a normal Load.4. If there is Machine Language after the end of Basic (ofprogram in memory), then the routine aborts with message;'?NOT ALL BASIC PROGRAM ERROR'.

5. If the program on tape is l-lachine Language, then thisprogram simply Loads normally, but does not Append. The samemessage is printed, but without the 'ERROR'. Be careful herebecause the the Basic pointers will have been changed.6. If the whole program will not fit in memory, the routineaborts. An 'OUT OF MEMORY ERROR' message will be printed.7. The message 'APPENDING' will be printed, while the routinesearches for the correct program.8. The routine accounts for the differences between Originaland Upgrade ROM. The Original ROM saved an extra byte afterthe end of Basic.

25

Page 26: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 26/48

I hope that this proves useful for you. I am particularyindebted to Jim Butterfield, for his counsel and patiencethrough many elementary questions.

David A. Hook58 Steel Street

BARRIE, Ontario L4M 2E9

2G

Page 27: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 27/48

RELOCATING APPEND &RENUMBER

10 EA= PEEK (53)* 256+ PEEK (52):B= 770 :SA= EA-B:J% = SA/256 J= 3R-J% * 25620 POKEEA-1JJ%:POKE53,J%:POKE49,J%:POKEEA-2,]·POKE52,J·POKE48,J30 J%=(SA+31)/256:J=SA+31-J%*256:POKEEA-3.J%·POKEEA-4.J40 FORI=SATOEA-5:READA$:A=VAL(A$)5(1 IF LE FT$(ri:t: ..i):::tH iiTi-iEt·4.J=I··i- lr/AL<r '1III$(f i$. : 2~» . :q=.J:·/256: C i C ; T C ; 7 ( ,

6(1 I FLEFT :$ : (A $.= 1 ) = IIL IIT}-IEtlJ = I +·\,'tiL (ttl I It$ (A $., 2::: ) : A = = .J+ s ~J5-'~?56* I f ·~T( .J 1 , · ' : ; : 5 6 >7(1 POKE I.' :r·~E::<T1 (1(1 F ' F . : I t · 4 1 ' · : 1 ::1:~ iC :T \t'A TE C :F .~ C ~ R t · ~ C : E : L ~ ~ : : - i F ' F I E t · ~ I f i · · t F . ~ E t · ~ t J f : 1 1 i :-')~: t·~·TTf':i:B'(2[1) ;::~J·--·~:.iT H : ~ 4 ' " ~ : ; I T l ~ : : 3 ! ~: ; A 1 1 1 1 /

11 [1 FJ~~t'~TII

~~:~:;A\,'E: ~I T~"i f:'lLt

f

1:II :

F'F.~t'1'rii

~~J.~ :;i

C:~ iF~ :$:~:~.~ >II

f:JF:F'Et'4I):/F::Et'~ijt"I'i C:~if"l~~~l34)i1.:

01!I ,;

120 X=SA/4096:GOSUB170:X=EA/4096:GOSUB170:PRINTPRINT:END1 7(1 F ' F . ~I t · 4 T II .' II.; :FCIF.~.T = = 1 TC~4: > : : ~ . ~ = > : : : : < = (::<-::.:;;.~)* 1 ~ ; : I F>::~,~:~:·S~THEf'{;:'::~'~=>::~'~+?

180 PRINTCHR$(X% +48); :NEXTJ:RETURN10000 DATA173.L767.H766,133,52,173.~763,H752.133,53.162.3,181,12010010 DATA72,189,L748,H747,149. 120,104,157.L742,H741,202,208,241,76,121,197,96

10020 DATA 165,119,201,0,240,S, 104,201,5S,176,239,76,125,0,32,11210030 DATA 0J201J65.240,7,201,82,20S,237,76,L282,H281,152.1,134,21210040 DATA 202,134,209.134,157, 169,2,133,219,32,112,0,170.240,23,20110050 DATA 34.208.246, 166.119,232,134,218,32,112,8,170,240,8,201,3410060 DATA 240.4,230.209.208,242,32,86,246,32,18,2~8,32,18,244,16510070 DATA 2 09.240,8,3 2,148,2 44,2 08,8,76. 110,2 45,3 2, 166,2 45,2 40.2 48

10080 DATA 224.1,208,235,165,150,41,16,20S, 127,162,24,173,124,2,20110090 DATA 4,240,7,162,0.32,L128,H127240, 108,32,L123,H122,56, 165,4210100 DATA 233!2, 133,42,165,43,233,0,133,43,160,0,177,42,240,2410110 DATA 3 2,L91,H90,3 2,110,2 42 .169,13 ,3 2,2 10,2 55, 169,63 .3 2,2 10,2 5510120 DATA 162,1,32,L83,H82,76, 119,195,32,L70,H69,177,42,20S,3J3210130 DATAL63,H62,173, 125.2,56,237,123,2, 170,173.126,2,237,124,210140 DATA 168,165,42,56,233,2,141.123,2,165,43,233,0,141,124,210150 DATA 138,24,189, 123,2,141,125,2,152, 109.124.2,141.126,2,19710160 DATA 53,144,3,76,85,195,32,185,243,76,221,243,32,L2,Hl,23010170 DATA 42.20S,2,230,43,96. 189,Ll1,H10,240,6,32.210,255,232.20810180 DATA 245.96,13,78,79,84,32,65,76,76,32,66,65,83.73,6710190 DATA 32.80,82,79,71,82,65,77,32,0,13,65,80,80,69.7810200 DATA 68,73,78,71,32,Q,13.82,69,78,S5,77,66.69,82,73

18210 DATA 78J71,13,0,32.112,0,240,33,176,249,32,115,200.72,16610220 DATA 17,164,18, 134,62,132,63,104,240,24.32.112,0,240,19,17610 230 DATA 249,32,115,20 0.166,17,134,66,20 8,12,169, 10 0,133,62, 169,O10240 DATA 13 3,63 ,169, 10,13 3,66,162 ,3 6,3 2,L-115,H-116,169,2 54, 13 3,3 3,16910250 DATA 127,133,34, 165,40.133,31.165,41,133,32,32,L292,H291,160,3:0260 DATA 177,31,145,33,185,92J0,145,31. 136,192.1.208,242,177,3110270 DATA 240. 16,32,L301,H300, 170,136,177,31,133.31.134,32,32,L267,H26610280 DATA 208,220, 169.255,200,145,33,200. 145,33,165,40,133,119,165,4110290 DATA 133,120.208.3,32,L277,H276,32,L274,H273,208,3,76,57J196,3210300 DATAL266,H265,32,L263,H262,32,L260.H259, 170,240,233,16 2,4,221,L262,H26110 310 DATA 240 ,5,20 2,20 8,248,240 ,238,165,119,72,165, 120 ,72,32, 112,O10 320 DATA 176,230 ,32,115,20 0,32,L51,H50 , 10 4,133.120 , 10 4,133, 119.160 ,010330 DATA 162,8,189,l,l,240.15,72,32,112,Q,144,3,32,L82,H8110340 DATA 104,145,119,232,208,236.32,112,0,176.8,32,L102,H101,32,llS10350 DATA 0.144,248,201,44,240, 192,288,175,32,L134,H133!169,0.133,3310360 DATA 169,128,133,34,160,1, 177.33,19718,240,21,201,255,208,2410370 DATA 133,95,133,94,165,94, 133,96,162, 144.56,32,85,219,76,23310380 DATA 220,136,177.33,197.17,240,236,32,L96,H95!32,L116,H115,20S,21210390 DATA 32,L62,H61,160,0,177,31,200,145.31, .L90,H89,208,8,23010400 DATA 42,208,2,230,43, 136!96.164,31,288.2,198,32,198,31,7610410 DATAL-2 9,4-3 0, 3 2,L2 8,H2 7, 160, 1,177. .ISS, 145,3 3.32 ,L56,H55,2 4010 428 DATA 5,32,L65,H64!20 8,239, 164,42,20 8,2,198,43, 198,42,96, 165

~i ,", ' t , -, .- ,

,: ,~ , 1 . . :::' : J,,:: I-,:; .

!J440 DATR .~ ~ ,133,94,110450 DATA '44,2,238,95,

.... , ,! ; ,.',-:,

i, .: 1~::I:' " ,: ::',·•.I·. ; ,-,-:'I '--1'; ,--",-

,:,~:;:::,:,,':? f " ") '- r .: .:::!:::~ .:: ,-: .-, :-" ,-'I -r - ,

,:1i :? .:~:~; : . i : : : . : : : : .

.' .: . '~.' :" '

Page 28: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 28/48

0 0 1 0 ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *[ 1 ( 1 2 0 . :* A P P H W A r m F . : E f - 4 U j { B E PA : : ; C P F . : O G f ~ : A t ' l : : ;

0 0 3 0 ;* *0 0 4 0 ;* (C) D A V I D A . HOOK. 5 8 S T E E L S T R E E T *0 0 5 8 ;* B R P P I E . O N T R R I O L 4 M 2 E 9 *0 0 6 0 ; * *0 0 7 8 ;* C A N A D A ( 7 0 5 ) 7 2 6 - 8 1 2 6 *0 0 8 0 ;* *0090 ; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *~i(1S15

~3i)Ci.', ; E : F ! ~ : ; c~ ' ' , ' I A r ; ; ~ I A :BLE~ :;

31 i~3[l12(1 T~:<TF:Tf:;~

[114[1 \:friF.~TR:B(115(i r I 1 E r 1 1 ~ : ;IZ0160 r::TTflB

II IIE $ti2(i0

II IIE $~~AIt TiE $:~;4

• I 1 E $~:;:;

0 2 0 0 ; B A S I C R O U T I N E S,

C:t~f;;~CiET

C:~·~~?C1CIT

024fi F = - I r · · 1 I

L I r · ·H 3 E T

II IJE $:"('(1

It lIE $?~_;

It I~E$C:4:;~9

II liE :$::::577"IIE $C:!:!?:3

0 3 0 0 ; O P S Y S T E M V A R I A B L E S~3:3i~) ,=

(i:32~~iFA: Z ! : ~ ; : ~ : ~J \ 1 1E k ~C :t : : ~

[i:~!4f) Ft'4LEt,~~i:~!5~)Fr'~f~I!~~

~]:~;:::30riLt1 :~ :9 ( 1 E r iH[i·:l(1Ci L_I t · i t · i f J t '1[141 [1 :::;C:~~EEt·~

. D E $ D 4

. D E $ 9 D

. D E $Dl

. D E : t D A

II

IiE $36· D E $ 0 2 7 1 ;

• D E : t C A· D E $ 1 i· D E $ ; : : [ 1 0 0

-.,--: .~LLL

0 4 5 0 ; O P S Y S T E M R O U T I N E Sli~16~~i[1470[i4:::;~3 :-01-'''-:- of,_..::, : c. L

~14sn)[15(1(1

9510 FFj~1C!F '16[i

ti::;:~;~:1: 1 E r r 1 F ! J L~:i54~:;Af;f;:T355[; F'k~T~~!560 EF.:~:t :1~:;C1fa57fi C:;Jr'{TLli

t159Ci FL_C lf~TC :[i6(i~J F O C i i J T

aIlE $F656II IiE $F:::12. D E $ F 4 0 A

. D E $ F 4 9 411 liE $F5A6:I I~E $F56E:l I~E $[::355

"'IiE $F26E11 lIE $FFII2e IiE $[::377:I I:E $F:3IiIl:I I~ E $ F :::::B 9"I!E $11:£:55"IiE $In::E9

28

. ; E > : : T P O I H T E F . :

. ;I t ~ P U T B U F F E P

. ; T A R T ' , / A RI A B L E : : : :;T O P O F t ' ll O F . :T';! : ; T A R T O F B A : : ; C

. ; E T t · ~ E > : : rH A R

. ; E T L A : : ; T C H A P

. ; E R F O R t ' l . . .L R . . .

. : E T L I t·iE #

. ; E . . . .I C E t · 4 U t ' 1 : B E R

; L O A D O R V E R I F Y ?. ; I L E t - ~ A t ' l EL E t K i T H

; F I L E N A M E A D D R E S S

. ; : ; T A T U : : ;B ' r ' T E

. ; A P E # 1 B U F F E P

.;am A D P L O

. ;Etm A D P H I

; P L A C E F O R L I N E #

; S T A R T S C R E E N M E M O R Y

; S E T T A P E B U F P T R. ; A P E tt:;G

. ; ~ : I t·n F I L E t · 4 A t ' 1 E; F I N D S P E C I F I C F I L E

. ; I t - H I A t · ~ ' r 'I L E; P R I N T / N O T F O U N D /

; M E M O R Y F U L L E R R O R; A B O R T 1/0 A C T I V I T Y. ; F . :ur C H A P

. ;I : : S U E E F . : F . : O F . :'1::;G

. ; I t · { I : : ; H L O A D

. ; O A D F I L E

; F L O A T A B I N A R Y N U M B E R. : ' 1 A K E A : : : ; CI

Page 29: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 29/48

70(10-· A D (10

~:='(i(1:~:-:-It:" :~:4: I._!

7(1(15- A D (11

?'(i(1!::-' '-IC' '-It::::~._I . ' : 1 . _ 1

0670 BECiHUf'l06:::0 I t·~ C t~ Ut'10690 FfiCTOe7~JO I r · m E : : - = : 10710 I t ·mD : :2[172(1 ~:;TEF'0730 BECilt·~[174(1

0750

0760~377(i(17!::~:1

[;:::(1(1

• DE $5F· liE : ! : 1 F

n DE :L21

· IiE $42

L . I i · · · J #,-. T-::r: :. L : ': :" C .

;STOPE START LINE #

. .;ADJUST MEMORY POINTERS AND EXCHANGE

(;:::5(1

(1:::7(1

700E- 48 0910700F- BD Fe 72 09207012- 95 78 09307014- 68 09407015- 9D FC 72 09507018- OA 09607019- D0 Fl 0970701B- 4C 79 C5 0975

' ; : : ' [ 11F.-

:9 : 3 C :.

i._

-:':-:z.-; < H" n o ( i : : :! ; : _ i : : : : . .L

~::'(12:3- 4 : : :

7024- :-,C' -,~n·_ ' ((

7[126-. . .:9 00_

~?02::;-- f-, .:,

l1!:!" ' : '

7ti2A- l S ~ = :

~:::~:;2E:- C : 9 : 3 A

{IJ2Ii- I:(1 E f - -

q : B l 1 $7(1(i0

LIil~ r~1Er'1Et··IIi= : ; T A * r ' 1 E r ~ 1 ~ = ;2 :

/UNWEDGE/ SEQUENCE

;GET MEMORY POINTERS

F :r · l E L C ! C i F '

, . . r f l1 F r C : L F . ~ ' + 2

RTS ;RETURN TO BASIC;RESET BASIC POINTERS

c r 1 F #., < :F . ~1 " , 1 E : i, j C i2 ~J~~iF > ; - 1fi ,; [ : 1 fi i T ! : B E

1 [ !S ' :( i ~ , J C 1 1~:i(i

11 [1(1 ! :J C J 2 ( i [ 1

1i1f J

702F- 4C 7D 00 1120

-:; :-~.-',.-,2[1 " ? ' ( i (1(1£::.1.,;,,::,-

'73:35- C : 9 4 1'?~):37-'- F fi 07?'(;:39- C : 9

C::-'-I. _ I s : : : ,

i' ( 1 : : _ : ; I:- DO ED70311- 4'-' c,-,

7i_ . ,_II:'

'?~i4(1-A 2 ~]1

'?0~·2- ! : : 6 II4

1000i[ilti

1 [12~:~~'JEIICiE1[1:~:l11 [1::+(1

1 t':.i5(1

1 (if'::fi

1~J7~J

1130

1140 ~'~C!'1D

1150116[1

1170

119[11200121 ti-I ' - " - ' 1 - . 1.Lr::.~,:,.i .:

12:3~J L'4Ci:~:[i[i12;4~3i2~;~=i12f;(i

;A WEDGE COMMAND?. ; ~.~()

LDA *TXTPTR ;WAS ~ (/ IN COLUMN 1C:;t iF ' #L .I E;l_lF

BED WCMD ;YES-IT/S ~UNWEDGE~

PLA ;FINISH CHRGOT

I : E : G ! ~1~C1:3(ii:i

C : f ' 1 F I # ,.'~~

:E : r · iE ! , J C i 1 (iiJ

. J t : 1 F ' F : ~ E r ' - H _ ; r : ' 1

29

;ZERO FILENAME LENGTH

Page 30: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 30/48

70.:.1-7-' ::;6 3I!

?e>+9- A'~ 02

7050- F iR7[151- Fti 17"('(15:3- C :5 1 227~:155-11(1 F6"('(15 7 - A 6 77

7[159- E : : !

7(15A- :::6 IH"i

7[15C- 2(1 7(1 (1li

705F- HH7(16[1- F(1 ( 1 : : :

7[i62- C:9 22

((164- Fli ( 1 ; = = 1 -

'?[166- E6 Iii

7[i6~::- Ilia F2

'-I-~I-':c; f f o ' : l

2::~029[1

i '-I-I:-oJ

l":'I~t':'!

i;~:3f1

1 :34(1

1 :35(1

1 : 3 6 J ai '::7:-:-~.i "_I i t " _ .

1:3~:~fi

i4~:it)

142(1-! A '-'1'-"1 'i",.)::')

14::::5

i: : . 1 i - : 1

1 , ; l~+5

146[;

.'

~ : J C :1( 1 £ 1

.'

L,~C:2[i(1

oJ .l -.-,

1 ,: + (~::.1

706A- 20 56 F6 1490 WC210

706D- 20 12 F8 15007070- 20 6A F4 15107073- A5 Dl 1520 WC215

15:3(1

7077- 20 94 F4 1540

707A- D0 08 15507~]7C:- 4C~t : i : : . F~5 156[i t'JC:22fi707F- 20 A6 F5 1570 WC2507082- F0 F8 15807084- EO 01 1590 WC2707086- D0 EB 16007 I a : ; : : : . : ! - A 5 ~~6

7[1:::!A- 29 1[1

7~,)::::C:- 110 7F

70BE - A2 1:::

161(1162~3

16::::~)16(:S~:i

i675

7090- AD 7C 02 16907093- C9 04 17007095- FO 07 17107(197- A2 ~3(1 172f1

. '

~·JC2:::0

7099- 20 1A 71 1730709C- F0 6C 1740709E- 20 lA 71 1750 AP100

i7t::1::".i. I

, _ 1 0 _ '176(1

70A1- 3:::70A2- F"i52A7~ )A4- E9 [127[1A6- ;::5 2A7(1 A::!- A 5 21 :

70AA- E9 007DAC- :::521::70AE - FI~:1070BO- :t:l2A7(fB2- F(1 i:::

177017:::~~117901:::001:::101:::2[;

1~ : : : : : : ( i

1:::40ieso

STX tVERCK ;SLl l U =LUHDLDA #$02STA tFNADR+l ;POINT TO BASIC INPUT BUFF

J : : ; F . : CHPCiET ;CiET NEXT CHARACTER

BED WC210 iIS THIS THE LAST ENTRYCl1P # ..." .;::;TARTOF FILE t·~At·1E?BNE WC100 ;NO--LOOPLDX tTXTPTR ;START FILE NAME ONE PLUS

STX *FNADR ;STARTS HERE

: B E C ! L : J C : 2 1 (1

Ct'1P# .."E :E G ! t ,J C :2 1 [1

It4C tniLEt·1

.J::;RIi30(iLDA tFNLEt··1E :E G ! l ,J C : 2 5 (1

m-~E ~·JC270. J [ r 1 F ' e 1 F ' 1 6 £ 1

J::;R FAHBEG! ~·iC22DC : F r > : : #$~:11E:t' ,IE i :JC:215

;FIND END OF FILENAME

.;THE Em?;am QUOTE?

;f1Ci--KEEP IT;At·m LOOP

;::;ETTAPE BUFFEP

;CiIVE TAPE MESSAGE.;F.:TFILEt-iAt'1E

;FIND A SPECIFIC FILE.;:;1<P Ii="FOUHD.;·40TFOUr·m.;EAD At·N FILE.;·JOTFOUt·m?

LDA tSATUS ;CHECK FOR LOAD ERROR.;F.:'r'CiAIt·i

;PREPAPE TO GIVE ~APPENDING' MSG

LDA TAPE1+2 ;GET LOAD START ADDRESSCMP #$04 iIS IT BASIC?BED API00 ;YES--BRANCHL I t ; : · : ; #,$[1(1

" J ~ : : F . : L : J F . ~ t l l~ : ; I J

: B E G ! i tJC:290

J::;R L,JF.'t'1::;Ci

iGET ~NOT ALL BASIC~ MSCi PTP

~ :; EC : .: : :; l_ 1:BTF .~AC :T2 F~~~Clt'1:;TA~~l" r i , lA F .: I AE:LE::;

LIlA t...'APTAB: : ; : B C : #$(12~:;TA * ' , / A F : : T A I !

LDFI t'..,'AF.:TAB+::;:8C #$00::;TAt'...APTA:B+1LD']"'$00

30

,IF ZERO THEN NO EXTRA M.L. AFTER

Page 31: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 31/48

FiSIC

i ;::-:~c:1. ;_ I ,_I

70B4- 20 10 71 189070B7- 20 6E F2 190070BA- A9 0D 191070BC- 20 D2 FF 192070BF- AS 3F 1930

.J~:.;:~ I ; " 4 1 ' F l f ; : : 2

. J F 1 E ~ F : T

L_I1H#$ijIi.J::;F .~ F' f; : TL I 1 F " i # :"?

70C1- 20 D2 FF70(:4- r1 2 0170C6- ~~O iA - ? 17C1C:9- 4C: 7'( [::3

70(:C-- 20 13 ?1

70CF- 1:1 2A~?(1II1- I; (1 (1:3

1S - l ~ : : ; ( l1 9 1 5 i : : ' 1

19'?~]

19!::~i1 9 ~ = - 1 ( i

. T:-', "" :-',"r",I !p:c~n I

1995 ;CHECK I~ CURRENT PROGRAM

20052~:;1~:i2(12(1

--

PT400

70D3- 20 13 71 2040

i:'OD6-AD 7D 02'?CiliS f - :3:::7-:'i2iliA,- sn (1; ~~J2

70DD-- fiA

2~:;5Cl2~:i55 . ; C : r i L C :

2060~;~a'?~:1- '

! il--"-':-'t:'"~'.f!...r . : : . ; : : . _ i ~...U r1 o r 1+:~: ; ;~i.iT"

Ci"l.U

2 [ 1 : : ; £ 1

21 ~:i[i

;'~11(i

70DE- AD 7E 02 212070E1- ED 7C 02 2130

70E5---A5 2f~?OE7- ::::;::~::'(1E!:~-E S t [12

LDA TAPE1+ 4 .~ I END~bG TAPE1+2 ;01 START7' i~-:jT! .; ::; f~ i/E I :' l F~~:, '' r' ' ::

~:1':-1~ ; "

2150 * VARTRB ,:ALC APPEND BEGIN--::-T.>r-· ,U,;- ;":':'-j

_ ._ 1 ": '" ~ _ . +r + ' J::'I~. BRCK jp OVER LAST TWO70EA- 8D 7B 02 2180 TAPE1+1 ;NEW LOAD START LO

?0EF- E9 00 220870Fl- 8D 7C 02 221070F4- SA 2220

:., ".....1.._._.

-?OFC--9;::?1~]F'I~-sn 7[: (~2

78F6- 6D 7B 02 2240?8F9- 3D 7D 02 2250

tiliL· T S F > t : 1 · + 1

~ : ; T j= i ' T A F ' E : L + · : 3

···.-.·-;1.-::

:.::..:.:.:.' ~":.i

7100- 8D 7E 02 2280'? 1 l i : ~ ;- _ C :5 : ~ ;s7 ' 1 ( i 5 ~ - S - i t ~ i ( i:3

- - _ ..

_ ..

I rn·- 'c .l +4

2:~i~a~J2:3t~'f5

. T ;: : ".: .:':

F · - t i L L .'[:('.:'W,

.l.::_-'_

7107- 4C 55 C3 2310 - ..:

-I·-!··.:-~

c;..,::~r~!

;CONTINUE WITH LOAD JF

j 'I:,! ,,-

L.Ll L C,

- 'J ;:-'··-:r'-_Jl·-J,~:.;!..._'::i:);:)

31

Page 32: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 32/48

-: .1 1:: :-~

~""_!t:.;

246~:125~X1251~3252~3

. '

I·~'I/AF.:2I· 4 \ l A F . ~11:3- E6 2A

E F . :7115-· Dfi f12 2 5 : : : : ( 1

254~3117- E6 2I:7119- 6(1

2560

257(125:::(1 .:

711A- BD 26 71 2590 WRMSG711D- F0 06 2600711F- 20 D2 FF 26107122- E8 26207123- DO F5 26307125- 60 2640 WRTS

265~3 .:7126- OD 4E 4F 2680 MSG17129- 54 2(1 41

7112C:- 4C: 4C: 2~3712F- 42 41 5:371:32- 49 4:3 2~:171 :~!5-5 € 1 52 4F?1:~::=:- 47 52 4171:31::- 4I1 2(1 (i~~i

713E- 0D 41 50 26907141- 5f1 45 4E7144- 44 49 4E7147- 47 2fJ f1~:1714A- 0D 52 45 2700714II- 4E 55 4D7150- 42 45 527153- 49 4E 47

7156- en fi~:l2 7 1 - : 1 5

271(1272(1",),,? .•)t:'~i . : . . . _ 5

2 : : : ( 1 ~ Z i

.;Ut'1PHJ ICE;INCREMENT START OF VARIABLES POlluc :+:'.,.'AfnAB

B r·4EIF.::: ;It·1C*"lAF.:TAB+

LDA MSG1.X ;OUTPUT MESSAGE

I t ' 4 ; : - : ;

: B t · i E t : J F . : t : l ! : ; ( 3F . : T ~ : ;

.BY $OD /NOT ALL BASIC PROGRAM / $00

.BY $0D /APPENDING / $00

.BY fOD /RENUMBERING/ S0D S00

. '

;RENUMBER BASIC PROGRAM

.'

F.Et·4Ut'115:::- 2(1 7(1

715E:- FO 21715D- se F9

2:::202::::~:£i

715F- 20 73 C8 28407162- 48 28507163- A6 11 28607165- A4 12 28707167- 86 3E 28807169- ::::4:3F 2 ; : : : 9 ( 1

716B- 68 2900716C- F0 18 2910

~:915716E- 20 70 00 2920

7171- F0 13 29307173- BO F9 29407175- 20 73 C8 29507178- A6 11 2960

. .

I.,,-·r,

1·11_·(,:.

717A- ;::6 42

'7 1 7 [: - 11(1 f ie:

.J~:;~:: H F . : C i E T

BEG! :3TAPTBe:; ~:H1Ut'1

.;ET CHAP;DEFAULT IF NO NUMBER ENTEPED

.JSF-::IHOET .;ET HUr'l1::EF.:t·m CON',lEF.:Tt · i . . .L It·~HPHA ;KEEP LAST CHAPLDX *LINNUM ;LO START #

LDY *LINNUM+l ;HI START #

STX *BEGIN ;SAVE STARTSTY :+:BEGIN+l ;LINE NUMBERPLA ;RESTORE LAST CHAR

;IF NO MORE CHARS

.JSR CHROET ;GET ANOTHERBEG! DFLT.INC ;IF NO MOREBCS INCR ;WAIT FOR NUMBERSJSR LINGET ;GET NUMBER AND CONVERT IN /LINNlLDX *LINNUM ;GET LO INCREMENT

. : t< E E F ' I T

BNE COPNUM ;BRANCH ALWAYS

32

Page 33: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 33/48

717E- fl9 64EP=10(171 :'::(1- :::5 :3E71 :::2-A9 (1t1

71 :::4- :::5 :3F71 :::6-A9 (1A71 :=::::-:=:5 42

. .'-"I-ILI.:' I ni".1010 ~DEFAULT STARTING LINE NUMB

3020 STA * BEGIN3030 LDA #H ..EGNUM3040 STA *BEGIN+l3050 DFLT.INC LDA #INCNUM ;DEFAULT INCREMENT =103060 STA *STEP3065 .;::::(17 0 .;:307*5 .;

71 BA- A2 24 3~~1BOCOPHUH71:::C-20 lA 71 3090

310071:::F-A9 FE 31107191- :::521 31207193- A9 7F 31307195- :::522 31407197- A5 2::: 31507199- B5 IF 3160719B- A5 29 3170

719D- B5 20 3180719F- 20 C4 72 319071A2- A0 03 3200 COP1071A4- PI IF 3210 COP2071A6- 91 21 322071AB- B9 5C 00 323071AB- 91 IF 323571AD- ~ ~ 324071AE- C0 01 325071BO- DO F2 326071B2- Bl IF 327071B4- FO 10 328071B6- 20 E4 72 329071B9- AA 330071BA- 88 331071BB- Bl IF 332071BD- 85 IF 333071BF- 86 20 334071Cl- 20 CD 72 335071C4- DO DC 3360

71C6- A9 FF71 C :::!- C :::!

71C9- 91 21'? 1 C : E :· - C : : : :

71CC- 91 2171C:E- A5 2 : : : :7111(1-' :::5 77

i= ' 1112- A5 2971 I14- :::5 7:=:

71 D6- DO (1:;:

71D:::-2 ~ : : : 1 EE 7-I c;

71DB- 20 EE- , . - ,!' . : : : .

?IDE- DO ( 1 : : :

?IE(1- 4C :39 C4

:3:~!7ti: 3 : : ' : : : : : [ 1

. .C : C I FI::! (1

33903400:341(1

:::4:;:~[13430 F . E t · H · ~

3440:345£1

346~:1:34';::'(1

. '

~~~t'·J1

:351(1.-,t:' ; c:. ': 1 0_ 11 _ _1

::::52[1

LD;:'::$24J : : ; F . : ~'JRt'lSG

;PREPARE FOR /RENUMBERING/ MSG

LDA #L ..CREEN-2 ;USE SCREEN AS BUFFERSTA *IHDE::-=:2LIlA #H.,::;CREEt-i-2STA * H m E : = - = : 2 + 1LDA * n::TTAB .;EG It·U·it4G OF TD::TSTA * HWE> aLDA *T>::TTAB+i

::;TA* I r·mE>::+1JSR SETFAC ;SET NEW # COUNTERL D ' T ' # : : ; : :

LDA (INDEX1) .. ;GET LINE NUMBER::;TA (I t'~IIE;:'::2) a iTt

LIlA FACTO-::::.T ' .;ET t'~ E~ '~·4Ut'1BEF.:.;EPLACE OLD

CP'T ' #1.;t '~CI--LI)C:;F'

LIlA (I r·me'::l ::..' 'T '

E : E G ! C:I]F':::[i

.J~:;F: : B I _ ! F l : : < 2 ;NO--BUMP POINTER 2TAX ;SAVE HI L I N KrlEITI

LDA (INDEX1) .. ;GET LOSTA *INDEXl ;MAKE NEW POINTER::;T>::I t · m E :- = : 1 + 1JSR ADDSTP ;CALC NEW #

BNE COP10 ;BRANCH ALWAYS

LIlA #$FFT!..Ii!lnT~:;TA (I t · - l I t E ; : ' = : 2 ) " 'r '

I t 'l 'r '

~:;TA (I t ·4IIE>::2) . ,'r'

;FINISH IN BUFFER

LIlA * TXTTAB ;START CHRGET AT SOURCE~:;TA * T > : : T F t T k :LI IF I tT> : ;TTAE: '; - i::;;TA t.T>-=:TPTF.:+

.; !3ET HI L.I t·4f= ::

.J~:;~~l ~ : A : B

.J : = ; ~ . 1 !JF .~ = t E !

:Bt'~E F:~t~2(1

. ; ~ : ; ~ <F ' L ei L I t · · i t : : :, :GE- r ~i L I t · ~ } : : :

.HiP FUH

33

Page 34: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 34/48

·:It::·:'t::: .,_1_1_;._1 ,I

71E3- 20 EE 72 3540 RN2071E6- 20 EE 72 355071E9- 20 EE 72 3560 RN30

, _ T : : ; k : C i F . ~ A : E :

,J~:;F~iF~RE:. J ~ : ; .~ C i ~ ~ A : B

71 EC :-- fiR

.? 1 E D - F(l ES~

71EF-71Fl- DD F8 72 3610 RN45

I"' :

IC_,.',7iF6- C :A.? 1F7·- Lit; F ; ; : : ;

?iF9- F"(1 EE

;SKIF LO LH4E #.::;KIPHI LIt'4E#;GET BASIC SOURCE

TAX ;END OF LINE?

.~:59t1:~;6~=i~3

,

f~:t'44(i

: B r ' i E F.:t·~4~;~ B E C ! F : : t - ~ : 3 [ 1

:3655 . .~~1"45~) Lln'~

F ' > - ! A

J8R CHRGET ;CHECK TO SEE IF A NUMBER IS NEXT201- 20 70 00 37007204- B0 E6 3710

J8R LINGET ;YES--MAKE BINARY206- 20 73 C8 37207209- 20 3D i~ 3730720C- 68 3740

.::I::: 7-::',_,._: I J

7212- Ali t1i~i7214- A2 (ii]

;LOOK FOR 4 TOKENS

.:IF FOUt·W

. ; t : :: E E F ' L C IC l t < I t · iC i

POrtHER

J8R FINNUM ;FIND OLD ..MAKE NEWFILA .; ~: '!C! ': /E F:TF.~ Te l t~IJi"1E;Ek: ~:;·-:A~~T

:~~7:;(1:3?6[1

: 3 7 : : : [ 1

::::79(;

Lli:rl #(1

LI!::< #0LDA $0101,\ ;GET ASCII NEW NUMBER216- BD 01 01 3800 RN60

J8R CHRGET ;IS OLD CHARACTER ASCII?;YES--SKIP TO REPLACE21F- 90 03

721C- 20 70 00 3830

7221- 2 1 1

7225- 91 77 : : : : ~ : : 7 C f

:~;::::=:(i

....:-: 1-:C". ':~: :I .: :: :,_ i . ,

7228- 20 70 00 3900 RN70 .J::;F~ C : H ~ : C i E T

: B C : : : ; F : : t ' 4 f : ~ ( i

.;~'~Cl 1:1l]i' lE~ I _ lF ' T E > :: " T

~: ;A! ' iE lj r'~E~IJ #

.;EPUiCE Ol .D #

. ; t iC·- ·· - DO t·iE

722F- 20 96 72 ~~~~ RN787232- 20 76 00 39307235- 90 F8 3940

JSR MOVDWN ;YES--MOVE DOWN 1J8R CHRGOT ;TE8T NEW CHARI~C:C:F~fi7::~

~72:39- F(i [:[1

723D- 20 C4 7~~

'?24~:!-- A(i ~:i'?24A- :B1 21

C : r r 1 F ' # ..."

: E E G ! ~:t·i::;Ci

~ B r · 4 E ~ ~ t ·; :. :! .: = 5

. : I :: ; I 1 - " C j t · ~ . .'?

.;!TtE~:;--"Ij() F : : E ~ : ; T

,;t'~IJ--LCiCiFi

3985 ;FIND OLD NUMBER IN BUFFER. GENERATE NEW LINE #

4~jb](i

4 iJ 1 (1

4 · 02 [ ;

.'

F I t·~t'~iJr11 .J::;k~::~El'FAC:Lln~ #L" ::;C:f,:~EEt,~

4~)4(1

4~:i5~a

~:;T!=i :+ :I' 4 I I E > : : 2

LDA #H.,:::CF.:EEt·~

; 1:1 i .ll i

Ll.i T it1

L _ I l i = i : : : I' ,i IIE>::2 ) ) !T '

34

Page 35: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 35/48

'('24C:- (:5 i

724E- FO 1572:; ~ ") -9 FF

7252- 11(1 1:::

7254- !::55F7256- :::55E725:::- A5 5E725A- :::5 6(1

725C:- A2 9[1

725E - :~::::

725F- 2(1 557262- 4C:E9

4(i:::~:;4(19(1411-X14110412041304140 Fr·QO4150416(14170

DB 4 1 : : : 1 - 3DC 419(1

UiP t.L I [~riUtl+1:tEG! Ft4::;OC i ' 1 F ' #$FF

: ::: ;TA t .FACTO::;TA t.F A CTO -l

L IlA t.F AC TO --1

::;TA t.FACTO + 1

;FLOAT#

JS P FLOATC. J f :1 F ' F C I t _ !T

4200 .-7265- 88 4210 FN507266- B1 21 42207268~ C5 11 4230

D E ' T '

LIIH (I t',iIIE>::2 > . ' 'r'CNP tLIr'k~Ur'1

726A- F0 EC 4240726C- 2j.JD?2 4250 Ft'46(1726F- 20 E4 72 42607272- D0 D4 4270

J : 3 F . : ADDSTF.J~:;f? E ! I J F 1 : : . : : : ; : :

Br'~Et-110

,-I ,_,~_t£:"- t a :; : . I : : , , _ J "

4290 ;MOVE TEXT UP ONE BYTE

43j.]j.~143(15..

7274- 20 B3 72 4310 MOVUP JSR SETFTR7277- AO 00 4320 MU10 LDY #07279- Bl IF 4330 LDA (INDEX1) ..

4400

4410 j'1U2 0442044304440

I r · 4 lri

: :: :;TA . ::I tHlD:; 1 : :.._IT'.J sR C t - 1P : :<

:Bt'~E nU4(1INC t''AF.:TABBt4Ej-1U20I He t'...A F.:TA B+ 1

D E ' T '

~:T::;

727B- C8 4340727C- 91 1F 4350727E- 20 D9 72 43607281- D0 08 4370

72:37- E6 2E :

7283- E6 2A 4380?285- DO 02 4390

?28E:- A4 1F. -t'lU40 L D ' T ' t. I t m E > : : 1

m~Er'1U60DEC = + : It ·m E : < 1+ 1DEC t HmE ::< 1

728D- D0 02 4450728F- C6 20 44607291- C6 1F 4470 MU60?293- 4C 77 72 4480

4490 .'4495 ;MOVE TEXT DOWN ONE BYTE4500451(1.;

7296- 20 B3?2 4520 MOVDWN7299- AO 01 4530 MD10729B- B1 21 4540

L Il'T' #1

729D- 88 4550729E- 91 21 456072A0- 20 D9 72 457072A::;:- Ft1(15 45::;(1

?2A5- 20 E7 72 4590 MD2072A8- D0 EF 460072AA- A4 2A 4610 MD3072AC- DO 0272A E - C:6 21::

DE'r '

.J~:;~:: t l i F ' ; : ' : :

I:t: c ! r l1 II :~ :f 1. J : : ; F . ~ I :! J F' ;: '; ; 1

:Br'~E r : 1 I i 1~JL D ' T ' l'.,,'riF.:TAB

462(1

4630

35

Page 36: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 36/48

'?2I;(i- C:6 2r"i

72:[:2- 6(1

'?2E:5-

'?21:7-'72:E~9-'?21{B-

A5 2r:;:!::I 2 ~ 2 1~,t:" .0-"

n,_i {(

' ?2~BI1' - es 21~ ::t2I;F - , A 5 7f:~

72C:4- A5 ~ 3 E ~

'?2[:::;-' A5 : ~ ! F - -

72C:A- ~::5 5F7~2C:C: - 6(1

'?2C:Il- A5 5E

72Illi- E:~~42

'?2Ii2- ;:~55E7'2II4- 90 ti2'?2I!6- E6 ::iF

i'2119- AS 1F7'2I(t;- C:5 2i72IiII- II(i (14

'?2IIF - A5 2(1

'?2E4- 2f1E772E7 -. Ef5 21';::'2E9- II[1 [12

'?2E:B- E E ; 22

46.:. lC1 tf' !I I:~:5465~3 ; 1 1 1 1 4 ( 1

nee *i,lAF:TAI:

F . : T : : ;

. '

; S E T P O I N T E R S F O R,i,.-,-,t:'~tC;;:'·_1

46::;7

46904 · ?(i~:l

4?i0

472[1

.'

: : ; E 1 M F ' T l - ?

,1 '7"':I('~-r! ._;~:

.4 -:: .-i ;-o

" '; ' ( ' "t J: ;. !

·47::~(i4 ~7t;~:i

4??t1.:-:-Ir--

. . : + { {_:i

L D A : + : ' / A P T A B

:::;Tii l : I H D D : : l

L I I I · i f,'...' A F : : T r i B +: : : ; T A : + : I t ' ~ I i E > : ;1 + 1

L _ I ! A * T : : < T F J T ~ :~:;Tji : + : I f'~IiE;:<2L I l A ~ :T > : ; · T F ' T F . : +1::;TA :+ : I t'~IiE;:'::2+11'.,:-,

r:. J ' : :

.o f -;"I:-I:-o

-t ( :::i-;_i

4785 ; S E T O P F A C T O & F A C T O - l T O G E N E R A T E N E W L I N E N U M B E R S

4;:;~tfi

4~::~i~:i·1 ,:,=:0:::,:_,_1_

L I l A : + : B E G l t - i

' ; : ; T l ~+ : F A C T O - 1LIlA ~(BECi1[·4·+·1

sra t . F A C T OF . : T : : ;

4865 ; A D D S S T E P T O F A C T O - l & F A C T O

4!:!75 .'4:: ;; :: (1 AIIIi: :;TF'4:::5 1 (1

,;l9[i(i

4·91(1492[i·1 I:J':1 f~-l,_.,_:'_1

49::55

49604S~(:5

497(; ,I

49:::~~iC : f : 1 F ' > : :499~35f1(i~35~)1ti

L I l A t . F A C T O - · · 1

C : L C :

I [ · K : : + : F A C T O

F L A G I F I [ ' l I t E > : ; i I r · 4 I i E > : : 2

L I l A * I· i I i E ; : ' : ; iC : f : 1 F : :+ : I r · 4 I i E > : : 2

I;r'iE C :F :T ::;

L I i H * I' ~ I f E ; : < 1 · + 1

C : t : 1 F J :+ : I t · · I I i E : : < : ; : ~ + 111'1"':-·

r : , i·::

'5055

.'

; I N C R E M E N T S I N D E X 2 ( 1

.'

: B iJ F I : :: ; 2

I ~ L ! F ' > : : 1

5(lS~~J::::::~i(~._1.L ::"'11'_1

i:.~.f -i i::

'_1·_ =

.J~~;F: ~ i J F ; > ; ;i

I c :+ ; I'~IiE::-::2

I f · } e : ~ : I t ~ I)E> : :21- 1r-:T-

f". 1 . : ,

36

Page 37: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 37/48

72EE··· 80 0072F[i-' E6 7772F2- Ill) (12

i'2F4- E6 7:::

72F6- :£::1 7 -;:'"('2F:::- 6(1

. : : i 121;:1

;= _ i ' : : c . :....;.L ,_:,_1

:514(1;GET R CHARACTER & SET

51,;i5

5150 CiEAI:516f)

517051:::0

5190 Gk:l052t1(1

52(15521~j52155220

I tK : tT::<TPTF + 1L IlA < T::< TP TP ::' . . 'T '

. '

;TOKENS FOR /GOTO/

7~r.;:'r!1.-:"": "_

...T! !iML i,,'

j nc.fi

; : : " , - , . - . : : : : : -._f"::'~._J .'

72F9- 89 8A 8D 5240 TOKEN72FC- A ?

5242

5245

5250. '

;JUMP A DDRESS FOR UNW EDGEC'-It:"t::._i~._i._1 .'

72FD- 4C 00 00 5260 WG.RESTt:"·-:.·-·-t

· _ J . : : . e · . ; : : .

5265 "5270 ;STORAGE FOP END OF MEMORY

529(1 .;

5275 .;528~) t ·lE r·lE t·HI

: : , ' : : ' : : . t : ". _ . _ .. , . E t i

LABEL FILE: [I - EXTERNAL]

..··t'1Ett:;12==(1(134

.··· 'CHF.:GOT0(1";:'6, · /L I r '4 C -iE T =C:!::7:~:..··Ft·{LH4=00D 1.····TAF'E1=(127A.··.L I t·H·~un=O(i11z , · .l C : :: ;T E1 = F ! :: 1 2

, · . . 'FAH=F5A6

.··.ABF .:T= F26E

.··.CO tHLD = = F::::DD

.....OUT=DCE9,··.FfICTO= = 005F1···l~:;TEFI=l1~:i42~=;TF.:T~:;=(11 E

~·JG200==02B~·JC100=704DL·JC:215=7(!7:3

~'JC:27~3=(1: :~4PT400=70CC~·~C:: ::OO =?1 OIlI ~:T::;=711 - i

nso 1=712f ' : ::::;TAF.:T=?17ECO P 1 [ i=7 ii2

Fo£t·ir·i=?1CEPt·Qf1=71 E3

....BUF=02[1(1,/l~::<l 'TA:B=(1(i2:::

,T I t·iI =C439,...FA=0f1D4....Fr·1ADF.'=00DH.·.EA L= 00C9,/::;C:f~~EEt'~=:::(i(1(i

.·'LD300=F 40A{"f)F'16(i=F56E

..·'FPT=FFD21 , · · l L I i 16=F:3E:3

, - -- = :B E C i t·~J t : l : : : :~ = i~~i6 4.: I ~'~IIE>:;'= ( 1: · Z ! 1 F

/ ' : S E C i I r·~=tiI'):3E~'~EIH3E=7(~F

~·~c~r:1Il=[1:~:2~IJC:2[il)=~ : : = C i ~ 3 C :

~,JC2~=:(i=?f.1~:~E~·~C:2~:;5==7t1:D6I t ' ~ ( ' /P i f ; : ~ 2 : - - - :7i1 (1t , J ~ ~ r 1 1 : :; C i = ?1 1 A

f~Er'~Lir;1=715:::;IiF L T. 1 ;"1 [::::1 ; : ~ f _ ;

C:CiF'2i~1= ( = ' 1 A 4

F .: r ' ~11J::: 7iI~::::r;:r'~:3~:!:::1 E S I

37

:./11/AF.~·TA:B=~](12A

, /C:~1~:CiET=(1[ii'~:i

' - " :C:L~~=C:577.' \,iE~~C~t::~(1(i9 II,/~3ATI_:~:;=0~j96

./EAH=OOCA

..TAF=F494t/r1Et'1FLfL=C::3~55/'Ef~~F.:= 1 ~ : ; C i = C : : ~ :77/ :F~LCiATC:=IJ:B55. : I t ' 1 C : t 4iJtI1=~3~J(lr i

: . . . . C 1 C l F ! : = 7~~i[1F~

L , ~ C 1 1Cn: i=702A

; .<:3:~:~?[i=C14~~ i

~,JC:29Cl= 71 ~:iAI·~!/F1F:=711:3~ , J r ? T : : ; : : - . : : ?i ~ 5

1 , r .. iC : ~ ~ : : :; :7 1 ; E

:::~J> t - · j j_ ! r ; ~=i~ ; : : r:~

Page 38: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 38/48

~J'~~1(1==(~EF

f;~:t'~6ti=721~F.~t·i?:~=?22Ii

F .J 445= 7 iF'l

~:r~65=722~~ ~:r·~~7Ci:::::722A1:' !-::O:-I_ -:1.-: ....1,-

r:,i·i,. : : : _ M ( z : : : : . : : : . r ·

: = ~ . ~1~:1=724:::;~i··~6(i=76C~t:'li_f2(1= 72:::9; - ' 1 1 \ : 1 1 ) ~ , J t ' 4 : : : ' ? ~ ~ ~6

Ft' i~~l1=72f;:5t'ILfi0=7277f'1LI6(i=7291t '1D2(1=72A::~f '1D40=72B2ADD: : ;TF '= 72eD

F - - r · · J 2 ( ; : : : :7 2 5 : : :

i ': lCI\ ii_iF'= : '?27 4

( : 1 : . 31: + (i::= 7 12 : : : 1 : :

j:1Ii1e = - - - : 7299r 1 1 I l : ; : ~ ; : : : :72~B~~i

::;ETF--FfC:=72C:4C : l " 1 F ' ; : - : ; : : : : 72I19t ; ;_ i F ' ; : '= : 1 =?2E?'C~F~li:::72~F6

~'iEi'1[l··m:::73[H)

C:F.~1'S=72E:~!

E:~:T~:;=72EliTOKEN=72F9

-,r,-;--.__,.'-,"al-,rt r : . i . : 1 _ . J' c;L J ': 1

E ; ; _ . . ! F ' ; : : : 2 = 7 2 E ~ +

/10000,7302,7302

Page 39: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 39/48

RESTORE DATA Line Program Paul BarnesDeseronto, Ontario

Executing the RESTORE command causes the next READ tooccur at the very first DATl\ element in your program. Thissubroutine can be used to RESTORE the DATA line pointer at aline other than the first.

It doesn It matter if you don It give the number of theline that has the "DATA" keyword in it that you want to start

at, as long as it is past previous DATA statements so thatthe next data to be read will be the one desired.

4 REM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *5 REM * * * RESTORE DATA LINE PG!~ * * *6 REM * * * BY PAUL BARNES * * *7 REM * * * DESERONTO, ONTARIO * * *8 REM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

10 DATA 166, 142, 134,10 DATA 166. 60. 134.15 DATA 134, 9, 32,15 DATA 134. 18. 32.

8, 166, 14317. 166, 6134, 197, 14444, 197, 144

142, 132, 3

142, 132, 3133, 3 96133, 3 96132, 3, 162

3, 96READ S . POKE

20 DATA 11, 166, 174,

20 DATA 11, 166, 92,25 DATA 166, 175, 142,25 DATA 166, 93, 142,30 DATA 162, 0, 142,35 DATA 0, 42, 133,40 FOR F = 826 TO 860 :

F, S : NEXT50 DATA "GOOD-BYE!"60 DATA "ANYBODY HOME?"70 J = 26545 * 10 : FOR D = 1 TO 100

DATA "MAYBE!"80 NEXT: DATA "HI!n

100 DATA "GO HOt4E!"110 DATA "GO DIRECTLY TO JAIL!"120 DATA "DO NOT PASS GO!"130 DATA "DO NOT COLLECT $100!!!"200 GOSUB 1000210 FOR T = 1 TO 3 : READ A$ : PRINT A$230 NEXT : PRINT : GOTO 200998 REM * * * SUBROUTINE TO RESTORE DATA999 REM * * * AT A CERTAIN LINE NUr-lBER

1000 INPUT "RESTORE TO LINE"; A1010 H = INT (A/256) : L = A - H * 2561020 REM POKE CURRENT DATA LINE POINTER1030 POKE 142, L : POKE 143, H

1030 POKE 60, L ; POKE 61, H1040 SYS 826 .1050 L = PEEK(900) : H = PEEK(901)1060 IF L=O AND H=O THEN PRINT "LINE NOTFOUND" ; GOTO 10001070 REM POKE MEMORY ADDRESS OF DATA LINE1080 A = H * 256 + L - 1 : H = INT(A/256); L = A - H * 2561090 POKE 144, L ; POKE 145, H1090 POKE 62, L ; POKE 63, H1100 RETURN

Editors Note; Paul has submitted the above program for theOriginal RO~1 set. The duplicate underlined statements arefor BASIC 2.0 ROM.

Page 40: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 40/48

fi_first Look at the Visible Husic Bonitor P.T. Garbutt,Mississauga, Onto

It all started in September 1977! Hal Chamberlinprouuced the classic wor k on 6502 generated music in BYTE.This article was recently updated in the April 1980 issue ofBYTE to the current state of the art for PET with theprogramoing help from Dr. F. Covitz and Cliff Ashcraft.

Unfortunately until very recently the 'Chamberlin' style

music has suffered from a serious problem , humaninterfacing, a problem that incidentally plagues a number ofmicro-computer programs. Readers of The Transactor in theMetro Toronto area are no doubt aware of Mike Bonnycastle'ssignificant work to correct this problem, initially with an'old RON' version about a year ago and more recently with an'upgrade RON' version. Pike's pioneering efforts should notbe overlooked as it still offers an effective humaninterfaced implenentation, albeit the music graphics arenon-standard and not available on playback and the editing islimited. Mike's work nevertheless issued a challenge toserious PET music users to build a better music mousetrap.

Hell someone has taken that challenge seriously and whatthey bave produced is a quantum leap forwara in this temporalmicro-computer world of daily future shock!

The product is called THE VISIBLE MUSIC MONITOR. It isprogramumed by Dr. F. Levinson and is marketed by Gene Beal'sAB COIIPUTERS. (Readers of PET USER's NOTES will rememberGene as the editor.)

The following is a brief outline of the major features ofthis superb package ( we'll take a closer user look at it ina future Transactor):

1. Written almost entirely in machine language to operateon any PET, 'old' or 'upgrade' ROM, 8k or greater.

2. Requires a simple user port 8-bit DAC, ego asmanufactured by AB COMPUTERS, Micro TechnologyUnlimited or Jim Butterfield's Poor ~an's DAC aspublished in an earlier Transactor.

3. Full seven octave range and four voice polyphony.

4. Comphrensive screen graphics with full edit, cursorleft/right, delete and insert.

5. Music graphics available on playback.

6. huto baring.

7. Initial and subsequent key and time signature setting.

8. Silople two or three keystroke note entry including theprovision to program your own keyboard entry syntax.

9. Adjustable dynamics (volume).

10. Preset or Fourier derived voices.

40

Page 41: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 41/48

11. User programmable sequencer that permits scoring musicin phrases and playing those phrases in user specifiedorder during playback.

12. Adjustable tempo during playback.

13. Individually selectable vioce duration includingdotted and triFlet whole to 64th notes.

14. Full transposition.

15. Competively priced at $29.90 US.

What does the VISIBLE MUSIC MONITOR lack. Well you don'thave tie notes. Accidentals are not carried throughout ~ barrequiring repeated user programming. The first and seventLoctave are shown as the 2nd and 6th octave albeit withappropriate identifiers. The graphics are not entirelystandard.

Finally chord entry is not the familiar 'one over the

other' style but rather step horizontally across the screen.As each voice is tagged with its appropriate identificationnumber along the bottom of the staff this method is actuallyhelpful in enteringone's music. On playback however thenon-standard notation takes some getting used to.

Will AB Computer (or others) stand still? I doubt it.In the interim if you our looking for a definitive musicmonitor do yourself a favor and audition this package. Foravailability contact the following:

AB Cm1PUTERS,

115 E. Stump Road,Montgomeryville, Pa.,18936,(215) 699-8386

REFERENCES

1. Chamberlin, Hal, "A Sampling of Techniques for ComputerPerformance of Music," September 1977 BYTE, pages 62 thru83.(Reprinted in the BYTE Book of Computer Music, edited byChristopher P. Morgan, Byte Books, 1979, pages 47 thru 63.)

2. Chamberlin , Hal, "Advanced Real-Time Music SynthesisTechniques", pages 70-94, 180-196.

3. Butterfield, Jim, "Poor ~an's D/A Converter", The Best ofThe Transactor, Page 58.

Page 42: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 42/48

MACHINE LANGUAGE CASE CONVERTER S. Donald Rossland, B.C.

This machine language program will convert strings tothe correct upper/lower case condition for printing on CBN2022/23 printers with an original ROM PET. It is relocatableso will operate anywhere in memory. The routine given hereputs it in the second cassette buffer, but changing thelocation given in line 10100 will place it wherever you wish.

There are several things which must be done in order forthe routine to operate correctly. These are best

demonstrated by the following program.

0 NL$=" II : GOSUB 1000010 POKE 59468, 1420 NL$="az123AZ"30 PRINT HL$ : OPEN 4,4 PRINT#4,f.1L$40 SYS 82650 PRINT#4,ML$ . CLOSE 460 PRINT NL$70 LIST10000 DATA 160, 2, 177, 124, 141, 25110010 DATA 0, 200, 177, 124, 141, 25210020 DATA 0, 200, 177, 124, 141, 253

10030 DATA 0, 172, 251, 0, 136, 17710040 DATA 252, 201, 219, 176, 22, 20110050 DATA 193, 144, 5, 56, 233, 12810060 DATA 208, 11, 201, 65, 144, 9

10070 DATA 201, 91, 176, 5, 24, 10510080 DATA 128, 145, 252, 192, 0, 20810090 DATA 223, 9610100 FOR A = 826 TO 881 . READ B10110 POKE A, B : NEXT . RETURN

Note that line 20 is altered once the program is RUN.This is done by the SYS command in line 40.

Now alter line 20 to:

20 ML$ = ML$ + "az123AZ"

and reRUN from line o . This time line 20 has not beenchanged in the listing. Whenever a string is formed byconcatenation, the new string is stored in a locationdifferent from the original strings i.e. up in high RAM. Itis this new location that has been altered. The majoradvantage in working on a string stored away from the programlisting is that you don't have to worry if the string hasbeen previously altered.

Now change line 0 to:

o A = 0 : GOSUB 10000

and reRUN from line O. Two points to note are:

1. Make sure that the variable string tobe printed is II in the variabletable, and

2. form the string to be printed byconcatenation.

42

Page 43: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 43/48

ASSEHBLY LANGUAGE LISTING OF UPPER/LOPER CASE CONVERTER

LDY 2LDA l24,y

STA 251,0

INYLDA l24,Y

STA 252,0INYLDA l24,ySTA 253,0

NOVE VARIABLE POINTERS TO Z ERO PAGE

Set Y register offset.Load A with byte from variable table pointed to by124/125 + Yand move to location 251. This byte is thecharacter count.In cr em ent o ffs et.

Shift start address of string to zero page.

ADJUST STRING

LOY 251,0 Load Y with string character count from location 251.DEY Decrement Y offset. Y points to character to be

altered next.

LOA 252,Y

C ~ 1P 219BCS 22Ct -1P193BCC 5

SECSBC 128BNE 11

Cf.IP 91BCS 9Cf.iP 65

BCC 5

CLCADC 128

TEST FOR LO\'lERCASE

Load A with string byte pointed to by 252/253and offset by Yand compare to lower case 'z' andif greater than, skip to COMPARE Y.Compare to lower case 'a' andif less than skip to TEST FOR UPPER CASE.

ADJUST LmlER CASE

Set carry flagSubtract 128 from the string byte in A andalways skip to STORE MODIFIED CHARACTER.

TEST F'OR U PPER CASE

Compare to upper case 'z' andskip to COMPARE Y if greater than.Compare to upper case 'A' andskip to COl-iPAREY if less than.

ADJUST UPPER CASE

Clear carry flag.Add 128 to string byte.

STORE MODIFIED CHARACTER

STA l28,y Store byte at location pointed to by252/253 and offset by Y.

COf.1PAREY FOR STRING END

CPY 0BNE 223

RTS

Compare Y to '0' andskip to OEY in ADJUST STRING if stringnot finished.Otherwise, return to BASIC.

43

Page 44: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 44/48

PRODUCT ANNOUNCEMENT

Without fanfare General Instruments introduced an LSIchip in the early Spring of 1979 called the ProgrammableSound Generator (PSG). The chip was primarily intended forsound effects generation under micro-computer control. Thisfacility clearly seperated it from the Texas InstrumentsComplex Sound Generator. The potential of computer control

was (and is) enormous. Make that memory mapped registeraddressing , which the PSG is, and the benefits becomenothing short of spectacular.

With equal understatement Steve Ciarcia published acomparison of the GI and Ti products last July (~, July1979 , "Ciarcia's Circuit Cellar: Sound Off"); well as best acomparison can be between apples and oranges.

Imagine if you can a single 24 or 40 pin device ( calledthe AY-3-8912 or lW-3-8910 respectively ); operating off asingle 5 volt power supply; requiring a minimum of externalcomponents ( a 6520 as far as the PET is concerned )--the

pull up resistors are for the most part included in the chip; containing three DAC's, three envelope generators, threeVCA's, three mixers; an noise generator and one or two 8 bitparallel user ports depending on which pin-out you need. Aswe mentioned the whole works is controlled by a memory mappedregister addressing scheme requiring minimum processoroverhead.

Performance specifications you ask? How about a range ofeight octaves, a possible 45+db SiN, an optimum clockfrequency of 1 mega-hertz, etc. The price? An incrediblylow $15 or $20 depending on pin-out.

One enterprising firm from Chicago, ACKERMAN DIGITALSYSTEMS INC ( a company you should be hear ing a great dealmore about in the future) were not caught sleeping when thePSG arrived. ACKERMAN DIGITAL quickly produced an S-IOOboard called the NOISEf.1AKER,incorporating tJi.Q. of the 40 pinversion! Imagine, six channel mono or full three channelstereo.

Any PET owner with an S-IOO adapter can acquire anNOISEMAKER PCB from ACKERMAN DIGITAL for a mere 39.95 U.S ••For less than $100 ( assuming a well stocked parts bin ) anda modest programming skill one can have a super PET music

synthesizer.

That's not all though!

If you are not up to the software challenge ACKERMANDIGITAL has developed an 8080 music compiler for theNOISEMAKER. (We will see if a 6502 version can be derived.)ACKERMAN DIGITAL is also manufacturing a NOISEMAKER for

44

Page 45: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 45/48

another well known 6502 system ( was that Apple or Atari?).They are also developing a software package!

PET plans? You bet! The Transactor will keep you up todate with the latest progress on this milestone product.

For more information please contact,ACKERMAN DIGITAL SYSTEMS INC.,110 N. YORK Rd.,Suite 208,Elmhurst, II. 60126

45

Page 46: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 46/48

Back - Up

The notes below refer to articles in previous Transactorsthat contained errors or may require some clarity inexplanation or application. Although everything published istested, the possibility of an unforeseen condition orsituation always exists. Most of the items printed inBack - Up were recognized by our readers •••your feedback isappreciated.

Block Get - Transactor 1 7

By now I'm sure any programmer using direct disk accessis using Block Get (Many thanks to Bill MacLean for thisexcellent routine). However, Block Get can also be used forsequential file access to recover strings of length greaterthan 80. Even 255 character str ings can be retr ieved withBlock Get provided they are f oLlowed by a carriage return(CHR$(13». Essentially, Block Get is the same as INPUTI butwith a 255 character input buffer ••••which brings us topoint 2.

This 255 byte buffer is set up in the very top page ofRAM: $7FOO to $7FFF on 32Ks or $3FOO to $3FFF for 16Ks. Thisspace must be sealed off before INPUTing or INPUTtingstrings, defining strings as the result of a concatenation,LOADing DOS Support or anything else that resides in thismemory space. Otherwise when Block Get is called, the datawill be transfered from the disk into the buffer and clobberyour DOS Support, strings or whatever happens to be there.

POKE 53 , PEEK (53) - 1 : CLR

Location 53 ($35) is the high order byte of the Top Of

BASIC Pointer. Decrementing 53 by 1 brings the pointer downby 256 thus "sealing off" the top page of memory. PET willthen ignore this memory as though it's not even there (try?FRE(O». You may want to use absolute values rather thanPEEK (53) - 1 since each time this is executed, the pointerwill decrement another 256 bytes.

32K POKE 53 , 127 CL R

16K POKE 53 63 CLR

The CLR command equates some other pointers to the new

value of the Top of BASIC Pointer i.e. the Bottom of StringsPointer and the Utility String Pointer. These could also bePOKEd, but CLR does the job quite nicely.

If cos Support is to be used w ith Block Get, thisstatement should be executed prior to RUNning DOS. HoweverBlock Get contains one gotcha that w iLl leave DOS open forcertain destruction.

When DOS Support is LO!\Ded and RUN, it sets itself upjust below the Top of BASIC Pointer (TBP). After executingthe above command, the TBP will nov be 256 bytes lower ••••

but that's ok since DOS can live anywhere. Once set up

46

Page 47: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 47/48

though, DOS lowers this pointer again to protect itself. Buteach time Block Get is called, the pOinter is moved back to256 bytes lower than the TBP at power up. Now DOS is sittingin memory that is available to BASIC. Re-RUN your programand whammo! •••DOS Support gets clobbered by strings. Hit ">"and PET JSRs to where DOS used to be which is now ASCIIcharacters ••••crash!

Fortunately this can be avoided. The first 8 bytes of

Block Get sets the TBP every time it's called:

033A LOA #$00033C STA $34033E LOA #$7F (3F for 16K)0340 STA $35

Therefore when using DOS Support and Block Get, SYS pastthese bytes with:

SYS . B . . 3 .J . , LFt , A$

Instead of: SYS 826 , LFt , A$

Supermon 1.0 - Transactor .8

Those who have entered the code for Supermon 1.0 mayhave noticed an error when using the Checksum program Le.BLOCK 42. The error lies not in Supermon but in the Checksumprogram. Two changes to make:

1. the last number in the Checksum programfrom 4501 to 5392.

2. the end addresses of the monitor Save

commands on page 20 from 0045 to 0046.

Re-DIMensioning Arrays - Transactor 8

One extra note on re-dimensioning some arrays but notall (pg 2). Once the End of Arrays Pointer (EAP) is storedin PL% and PH% (line 100), no new variables should bedefined. This includes all variable types: floating point,integer, string and array.

For a program, RAM is used by PET in the followingorder:

BASIC TextVariables tableArrays

Dynamic Strings

Notice that Arrays immediately follow the Var iables table.If a new variable (one that hasn't yet been executed) isdefined after storing the EAP, the Arrays must all be movedup to make room for the new variable in the Variables table.

47

Page 48: The Transactor V2 09

8/7/2019 The Transactor V2 09

http://slidepdf.com/reader/full/the-transactor-v2-09 48/48

The EAP will now be slightly higher than what was storedpreviously. Therefore restoring the EAP to PL% and PH% willchop off part of the last permanent array.

To avoid any problems involving this, simply set all

variables to zero (including PL% and PH%) before storing theEAP. For example, page 2 of Transactor 18 should include:

90 PL%= O: PH%= O : 1%= 0 : J%= O : K%= O

Also, line 2100 should be:

2100 REM RE-D1M ARRAYS X , Y% AND Z $

Cursor Positioning - Transactor 8

The following is an example for remembering andrestoring the position of the cursor which should have beenincluded in the last issue. First code the two subroutinesas shown on page 3, Transactor 8.

100 PRINT "[CS]";110 PRINT "[5DN]";120 PRINT "THE POSITION OF THE CURSOR\'TILLBE STORED HERE :"; : GOSUB 30050130 PRINT "[Hf.I]";140 PRINT "THEN THE STRING '*****' WILLBE PRINTED FOLLOWING THE COLON";150 GOSUB 30150

160 PRINT "* * * * *"; : END