the transactor v1 07 1978 dec 31

14
8/7/2019 The Transactor V1 07 1978 Dec 31 http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 1/14 (kcomrnodore comments and bulletins concerning your COMMODORE PET™ The Transactor BULLETIN #7 December 31, 1978 P E T ~ s a re istered Trademark of Commodore Inc. Yes, it's finally h e r e ~ Included in this issue of the "Transactor ll are chapters 1 through 7 of the new PET Users Manual. Chapters 8 through 9 and the appendices will be made available in the next bulletin, January 1979. This release will cover November as well as December. Karl J. STANDARD SYMBOLS I have assembled a small table of symbols that are not hard to obtain from a typewriter (if you are using one) and are quite distinguishable if yo u write out your programs in capital block letters. It would be appreciated if you use these when submitting software for publication; especially programs containing cursor control. SYMBOLS h - cursor horne c - clear screen cr- cursor right. cl- cursor left cu- cursor up cd- cursor down d - delete i-insert ¢ - }6 - / - @ - carriage return· space (blank) RVS on RVS off Shift on To represent an y graphic characters clearly, the character below should be followed by the '@'. For example: lSi=M@ (M w/Shift on) Following this standard should make programs fairly easy to read however any suggestions are quite welcome. Karl J.

Upload: cubemanpdx

Post on 08-Apr-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 1/14

(kcomrnodore comments and bulletinsconcerning your

COMMODORE PET™

The Transactor BULLETIN #7

December 31, 1978P E T ~ s a re is tered Trademark of Commodore Inc.

Yes, i t ' s f ina l ly h e r e ~ Included in th is issue of the "Transactor ll

are chapters 1 through 7 of the new PET Users Manual. Chapters 8through 9 and the appendices wil l be made available in the nextbulle t in , January 1979. This release wil l cover November as wellas December.

Karl J.

STANDARD SYMBOLS

I have assembled a small table of symbols that are not hardto obtain from a typewriter ( i f you are using one) and are quitedistinguishable i f you write out your programs in capi tal blockle t te r s . I t would be appreciated i f you use these when submittingsoftware for publication; especially programs containing cursorcontrol.

SYMBOLS

h - cursor horne

c - clear screencr- cursor right.c l- cursor l e f tcu- cursor upcd- cursor downd - delete

i-insert

¢ -}6 -

/ -@ -

carriage re turn·space (blank)RVS onRVS offShif t on

To represent any graphic characters clearly, the characterbelow should be followed by the '@'. For example:

lSi=M@ (M w/Shift on)

Following th is standard should make programs fa ir ly easy toread however any suggestions are quite welcome.

Karl J.

Page 2: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 2/14

Commodore would l ike to take this opportunity to announcethe appointment of Mr. Karl J. Hildon as our new Technical Advisorfor the Computer Division.

Mr. Hildon has a Diploma in e l e c t ~ o n i c q technology and has

taken some courses in computer programmlng. He will be in Ghargeof answering any software and/or hardware inquiries pertainingto the PET computer and upcoming peripherals. I f you have anyquestions, please do not hesitate to cal l Mr. Hildon at Commodoreor write:

Karl J. HildonCommodore Business Machines LtdComputer Division3370 Pharmacy AvenueAgincourt, Onto MlW 2K4

Tel: 499-4292.

Karl is also actively interested in the intenfacing aspect of thePET computer and would l ike to learn more as time progresses. He

has therefore writ ten the following l e t t e r which will be includedwith any hardware information he sends out and has asked that it

be inserted here.

"Dear Interfacers:

Your requested User Port and/or IEEE-488 Bus information hasarrived! Should you find the enclosed data insuff ic ient ,please cal l or write Commodore. However, i f i t does assis t

'you to a solution, please write in with any interest ing

discoveries or They would be much appreciated and mayfind the i r way into a "Transactor" bullet in!

Yours sincerely,

Karl HildonTechnical AdvisorComputer Division

P.S. All published art icles wil l get author recognition."

Page 3: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 3/14

Mr. Hildon wil l also be, for the most part , our "Transactor"bulle t in edi tor . Therefore, le t te r s , ar t ic les , software,circui t ry , discoveries or anything a t a l l that you feel you wouldl ike to see published in our "Transactor" should be addressed to:

Karl J.Commodore Business Machines Ltd."Transactor" bulle t in3370 Pharmacy AvenueAgincourt, Ont. MIW 2K4

Brief replies will be included in the "Transactor" followingany le t ters submitted for the "Transactor" and "any ar t icles

wil l receive ful l recognition of the author provided they haven'tbeen published previously or elsewhere.

In the meantime, your enthusiasm and in terest in the PET

computer is most refreshing. Keep i tc o m i n g ~

Page 4: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 4/14

NEWSLETTER ADDRESSESi ;

1. The !!Tranasctor!! (subs. $10.00 Cdn.)3370 Pharmacy Avenue

Agincourt, Onto

MlW 2K4

2. PET User Notes (subs. $6.00 U.S.)P.O. Box 371

Montgomeryville, PA 18936

3. THE PET PAPER (subs. $15.00 U.S.)P.o. Box 43Audubon, FA 19407

4. Cursor (subs. $24.00 U.S.)P.O. Box 550Goleta, Cal i f . 93017

5. The PET Gazette (Free w/lg. S.A.S.E. U.S. postage)c/o Len Lindsay1929 Northport DriveRoom 6

Madison, Wisconsin 53704

Page 5: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 5/14

TAPE LIBRARY

Club 2001, the Toronto PET Users Group, now has an activetape l ibrary. The deal is $3.00 deposit which is refunded uponreturn. The only drawback is that access to the tapes is l imited

to club meetings and evenings a t Lyman Duggan's, the Club c o ~ o r d i ~ a t o r . Lyman and I have- made arrangements to make copiesof the entire l ibrary, which incidental ly stands a t 70 and growing,and make them available through the day. Anyone who wishes toobtain a l ibrary program is invited to come to the Commodoreoffice in Agincourt and make a copy . l l ea se bring a blank tapewith and any other programs you might l ike to add to the l ibrary.

Karl J .

Peripherals

The Disc Drive and Printers are coming. I know you'vea l l heard that before but we' l l be announcing a date January6 as to avai labi l i ty and so forth. Those of you who purchaseand wish to convert to Floppy Disc storage can get the DOS

ROMs free of charge once available. The Printers are direct lyi n t ~ r f a c a b l e to the PET and will have ' in tel l igence ' such thatthey will accept formatting commands for business applications,etc. More detai led descriptions and specifications wil l beavailable from Commodore as of Jan. 6 and wil l be publishedin the next Transactor.

Karl J .

Page 6: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 6/14

Le PET

An instruction course on the PET i s being offered a tIr isco du Quebec and wil l be taught in French. Cost of theprogramme will be $75.00 which wil l also cover manuals and notes.The course is 15 hours long plus additional practice time and will

begin the f i r s t week of Januar;y, 1979. Anyone interested shouldcontact:

Hr. Ricardo TalbotIr isco du Quebec337 Bo'ul. CharestQuebec City, Que.Tel: 418-647-4422

Est. ,GIK 3J2

Also, Hr. Talbot has a tape available containing 11 games, a l lof which are in French.

Un cours D'instruction en Francais sera a votre disposi t ion chezIr isco du Quebec. Le prix du cours est $75.00 qui comprent desnotes e t des manuels. Le cours va commencer dans la premieresemaine du mois de janvier 1979 e t va couvrir 15 heures deleyons, en plus Ie temps pour la practique. 8i vous etesinteresses contactez svp:

H. Ricardo TalbotIr isco du Quebec337 Boul. Charest Est . ,

Quebec City, Que. Glk 3J2Tel: 418-647-4422

H. Talbot aura aussi a votre. disposit ion les casset tes contenant11 jeux tous en Francais.

Page 7: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 7/14

FLASH

Richvale Telecommunications,10610 l1ayview Ave; Richmond

Hill,Ontario 14C 3N8 884-4165 are p l e ~ s e d to announce

tv:o new interfaces for the Pet 2001-8.

"Hampetu

: Amorse and a ~ r T Y interface.uModpet": }l"lor sending computer information over the phone.

The tfHampet" is a ;norse and RTTY(Baudot) interface. You simply

:plug the "Hampet" into the Pet,and your ready to display,

transmit and receivernorse and RTTY a t rates UIltO 100WPM.

The interface will also send random words and characters,

displayed and with audio from a built in side tone oscil lator

and s!leaker.ln addition the "Hampet" can re-transmit 400

characters from memory for "brc,g" transmissions.

The "Hampet" Is sold \'rired and tested,and comes in an

attractive,blue and sand,sloping front,alurainum case,wIth

on-off,volume control,frequency control,PLL control,tune

LED,on LED,headphone muting jack and four RCA phone jaoks.

The "Hampet l t is capable of perfect copy with an "S4" sIgnal.

The "Modpet" plugs Into the Pet and is interfaced to the red

and green phone wires,the audio level is adjusted with a VU

meter and the user can trade tapes and fJlay interactive gamesover the telephone.The ft1\todpettt is not direct ly audio coupled

into the line resulting in superb send and receive.

I t is suegested that potentIal buyers f i r s t check ~ i t h their

local Bell offIce,for in spIte of recent court rulings,Bel1

may ins is t on Install ing a coupler. The "Modpet" is not suitable

for long dIstance due to dIstortion and the narrower band

wIdth created by "Ma Bell".

The "Hampet" retai ls for 189 dollars with immediate delivery.

The ftModpetfl retai ls for 79 dollars with three week delivery.

Dealer enquiries are invited.

Ben Arnold VE3EYB Richvale Telecommunications.

Page 8: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 8/14

Jim Butterf ield, well known PET enthusiast , has sent toCommodore a couple of interes t ing items which have also beenpassed on to PET User Notes. 'Thanks Jim ••• and thanks forrecognizing Brad as a source--maybe he ' l l send in somethingelse as well . -Karl J .

Summary ot Cassette data t i le "patches"

The following information has been passed around users, and i s

now "otticiaJ!' with the issuance ot a Commodore bullet in. I t seeMSworth while to summarize br1et'lJ" : .

I . Opening a .file tor writing: an om:1asion in current ROM progrell8

makes it highly desirable to precede a l l OPEN .tat.ment8 witha counle ot POKEs: .b e f ~ r e OPENx,l, •• for writing: POKE 2h3,122': PORE 24h,2

before OPEN x,2, •• for writing: POKE 2LJ,58 : POKE 2L.L.,3

2. When writing tanes. i t is useful to increase the s,?acing betweenta!,e blocks; otherwise you might 1I'l1as a block during subsequentreading. There are several a!,'Oroaches to this; I'I'!Y technique is

to cal l the follOWing subroutine il'lll'llediatelv af ter each PRINT#:Cassette ,/;11 Cassette #2

950 IF Z9<-PEEK(625 )GOTO 990 9$0 IF Z9<-PEEK(626)GOTO 990960 POKE 59hl1 ,53 960 POKE 59456,207970 FOR Z9-1 TO 60:NEXT Z9 970 FCR Z9-1 TO'60 : NEXT Z9980 POKE 59hll,01 980 POKE! 59456,22,3990 Z9-PEEK(625) :RETURN 990 Z9-PEEK(626) :RETURN

3. Evan with the above coding,it

seems wise to guard against apotential "dropped block". Think in terms of writing a "numberof items" to ta l on tape so that when reading, you can check thatnothing has been los t .

4. Don't PRINT# a l ine of over 80 characters unless you're preparedto do some careful work with GB:r# statements when you read it backin . In general., avoid "print punctuation" when writing (PRINTII1, A;B

• •• FRINT#2, 1:$,Yl); each data element can be wri,tten as a separate"line" • Watch for long strings.

5. Either: check the value of ST a!"ter evee read, or use your own,checking routines on your data. ST can ueeful, but doesn't

guarantee your data is l()()% good. :no' ST-O •• no errors are seen;IF ST>63 •• you have COl'lle to the end ot t i l e ; it anything else,an error has been detected.

6. AlwaY8 CUl)E your cassette f i les a.tter you're finished with them.When writing, your data is accumulated into a buffer •• if youdon't CLCSE. i t Ny not go onto tape.

Most Basic errors abort the cassette f i le without CLOSEtng i t ;if this happens while you have a cassette tape open for writing,bet ter s ta r t over •• your tape will l ikely have data lItissing.

Page 9: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 9/14

UNLIST Revisited Jim Butterfield. Toronto

Larry Tessler 's UNLIST appeared in User Notes without much fanfare.I ! you can read between th e l ines, however ( ~ n d cope with thetypos) i t ' s quite a blockbuster of a program.

In general,it

allows a program to be handled as data ••• using theUNLIST key, you can re-process programs as i f they were data f i les ,

and create such things as program-writing programs, l.anguage transl!ators,and many other start l ing things.

Perhaps the most immediate use of UNLIST for the casual cOl'llputeristi s to merge two programs together. One program could contamnlSubroutines; and theee could be I)'1erged with other programs to

save a lo t of typing. I t ' s especially useful to be able to mergea single se t of DATA statements into several programs. each ofwhich is set , up to process the DATA in different ways.

Brad Templeton (Toronto) has passed me an even more concise way of

doing the same thing. I ' l l go through the whole operation, ste"!, bystep.

Firs t , prepare the 'Orogram you will want to merge in the followingmanner. Load the nroE'ral'fl. Put a blank tape into the cassette andrewind. Enter OPEN 1 .1.1 : CMI) 1 : LIST. Be sure to 'Out this ona s:ngle l ine. using colons as indicated. Press RECORD and PLAYasinstructed. The tane wi l l move. When i t stops. type ?"POKE6l1,O":P R I N T # l : C I D S ~ l . Your tape is now ready. and PET should be back tonormal operation. You may fi le this tape and use i t a t any futuretime.

Now for the merge. v-1hen you have your second program loaded into

the PET, mount the tape you have previollSly written. Twe OPENl,press PLAYas requested, and wait tor the tape to stop.

' ~ e r e cornes the tr icky bit . Clear the screen, give 4 cursor down's,and type the following l ine, but DO Nor ,HIT RETURN:

POKE6ll,l:POKE525,1:POKE$27,lJ:?I'h" (h is Cursor Home, displaying reverse S)

Don't hit return. Instead, press cursor home "and 6 cursor downs •••then type the identical. line.. This time, hit RETURN at the end ot

the l ine and l is ten to the tape move.

Eventually, things m ll s top with a ?SYNTAX ERROR or ?0U'1' OF DATA

printed between the two l ines, and the tape should stop. (If i tdoesn't , stop it with the RUN-STOP key). The merge is DOW corrrplete.Type CLOSE 1 to close the f i le .

(The ?"P0KE6l1.0" in naragraph 5 may be unnecessary •• I pu t it thereto guard against a processor crash situation I encountered during

early testing ••• )

Page 10: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 10/14

Jim so submitted a schematic of a ci rcui t he demonsdemonstrated a t the f i r s t meeting of the Toronto PET UsersGroup. The schematic has been published in the clubnewsletter and Lyman Duggan suggested I pass it on to

to r subscribers. Thanx again Jim. -Karl J .

Poor Han's D/A Converter

Cheap; good for generating Chamberlin/stvle music. Pr"!cisio"1resistors are preferred. but most anythinp.: wi 11 ~ n e r a t e arecogni7able sound.

Section B of the diarral'1 suu'l"Iorts the CR2 sound effects - so thatone interface board covers most s01m<'i recnirernent.s.

3.a"..n.fftCl'\ C., .Ct",

*PCID

p , , ' U ~ l ( . f L . E'

II-) .,"f:rrFAc..( ' F

H

J

'", - - - --I SfCnoA.J

nl_.

\'.:8 fl'

- ---N

loo\ll

4 00 1(

'lOOl(

,061(

JvWVv--SbK

aSK

-- --

SOtl\(.-- - --

-,I

_J

'8K

The capacitor provides some reduction of the samnling f r e ~ e n c y (when generating music) tone controls on the

~ a m ~ l i f i e r wil l

also help, i f available.

The HUH "?etunia" a high quality equivalent of this converter.Toronto price - about $ho.

Reference: see BYTE, September 1977, lengthy ar t ic le by Hal C h a m b ~ r l i n on computer-generated music. 6S0? programs are given.

Page 11: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 11/14

The "ON . • . GOTO" Statement

e.g. 100 ON I GOTO 10, 20 , 146, 2040

The above statement, when encountered, will cause program

execution to branch to the l ine indicated by th e l ' th number afterthe GOTO. That i s :

If 1=1If 1=2If 1=3

If 1=4.4

GOTO 10GOTO 20GOTO 146GOTO 2040

I is truncated to an integer value. If I is equal to zero, or attempts

to select a non-existent l ine (greater than or equal to 5), in thiscase th e statement after th e ON . . . GOTO i s executed. As many l inenumbers as wil l f i t on a l ine can follow an ON . . . GOTO. Thus the main

purpose is to eliminate successive IF . . • GOTO statements and save on

memory consumption.

e.g. 200 ON SGN(X)+2 GOTO 40 , 50 , 310

In th is case, execution wil l branch to l ine 40 i f the SGN(X) expression

i s less than zero, l ine 50 i f equal to zero and l ine 310 i f equal to

one.

When using expressions in the ON . . . GOTO statement, do not

allow the f inal resul t to be negative. Implement an ABS function intothe expression, else an ILLEGAL QUANTITY ERROR will resul t .

The"ON

• .•GOSUB"

Statement

Identical to the ON . . . GOTO statement except that a subroutine

ca l l is executed instead of an absolute GOTO. On return from th esubroutine, execution continues a t the l ine following the ON . . . GOSUB.

A Short Note On Subroutines

Jumping out of a subroutine can be HAZARDOUS! That i s ,

subroutines containing IF . . . GOTO's or ON . . • GOTO's can cause an OUT OF

MEMORY ERROR for th is reason: When a program encounters a GOSUB, the

machine loads the return address into a stack area. The subroutine is

then executed and l e t ' s say 'jumps out ' on a GOTO statement within the

subroutine. Thus th e RETURN statement is never executed and th e returnaddress is not unloaded from the stack. The stack wil l f i l l to the

l imit and the error message resul ts .

Page 12: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 12/14

To avoid this problem the ON . . . GOTO statement can be used

instead of RETURN. Thus a l l GOSUB statements directed at thatpart icular subroutine must also be replaced with absolute COTO's.

By implementing a control variable just prior to the GOTO, th e

return addresses can be placed af ter the ON . . . GOTO in the subroutine

and th e hazard is eliminated. For example:

100 C=l:GOTO 5000

110 REM RETURN FROM SUB.

500 C=2:GOTO 5000

510 REM RETURN FROM SUB.

5000 REM SUBROUTINE

5 ~ . : 1 0 } 'SUBROUTINE'

50805090 ON C GOTO 110, 510

Subroutine address

Same subroutine

Instead of RETURN

Page 13: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 13/14

FA ILSAFING

Recently I have received a number of inquiries on how toavoid entering the command mode by hi t t ing "RETURN" af te r aninput statement without data entry. I know of three suchmethods:

1 . The "GET" loop instead

e .g . 20 GET A$: IF A$=" " THEN 2030 PRINT A$

The above routine will loop continuously in l ine 20 unt i l akey is depressed. Once entry is made, the routine wil l pr int

the entry be i t alphabet ic, numeric or graphic character .Use of the numeric variable i s confusing because even i f nokey has been struck, the value returned i s zero. That is :

20 GET A: IF STR$(A)=" " THEN 2030 PRINT A

will return 0 immediately.

2. Forced Input

I f af te r an INPUT statement you arrange an invalid input tothe r ight of the '?', hi t t ing "RETURN" wil l resul t in a ?REDO FROM START and go back to the INPUT statement. Forexample:

10 INPUT "A VALUE }1}1}1}1 . . clclclcll l jA20 PRINT A

The cursor is l e f t 2 character spaces beyond the '? ' .Therefore you must arrange your ' inval id input ' such thatit wil l be erased by the entry else i t will be included(be it to the r ight or l e f t of the entry) , and a ?REDO FROM

START will be returned.

Page 14: The Transactor V1 07 1978 Dec 31

8/7/2019 The Transactor V1 07 1978 Dec 31

http://slidepdf.com/reader/full/the-transactor-v1-07-1978-dec-31 14/14

The above routine does not work with string variables becauseI .. ' will be accepted as an alphabetic input i f "RETURN" is hi t .Therefore a tes t statement must be added:

10 INPUT "A CHAR. }6}6}6}6 . . clclclcl" ;A$15 IF A$ = " . . " THEN 1020 PRINT A$

3. Opening the Keyboard as a File

By assigning the keyboard a f i le number using the OPENstatement and opening that f i le for reading, a l l input statementswil l accept data only as an entry. The following program wil ldemonstrate th is .

1 OPEN 1,0,0 ( las t 0 optional)

500 PRINT "A VALUE?";510 INPUT #l,A$520 PRINT: PRINT A$530 END

The open statement may be placed a t the very beginning ofthe program and may even be l ine O. Other programming canbe inserted (between 1 and 500). The preceding words and '? 'must be displayed using a PRINT statement (l ine 500). Thedouble PRINT's in l ine 520 are required to get A$ to printon the next screen l ine . Otherwise A$ wil l be displayedjus t to the r ight of the entry.

I f anyone should find bugs with this due to not closingthe f i le or otherwise, please le t me know so that I may passi t on.

Karl J .