Section 2

4 downloads 102747 Views 19MB Size Report
CD Atari 1027 Letter Quality 20 CPS Printer. Letter Perfect Word Processer. Atari BASIC Tutorial Manual. All connecting cables & T.V. interface included.
- IB ' "1152K S2K

atariAlARI®

Lowest Price Price In In The The USA! USA! 1i52K Lowest S2K

Computer System Sale

Students •• Word Word Processing Processing •• Home Home •• Business Business •• Students

LOOK AT ALL YOU GET LOOKATALL GET FOR FOR ONLY LIMITED LIMITED QUANTITIES QUANTITIES

$ 399 $399 SYSTEM SYSTEM PRICE

©Atari 130XE 152K 152K Computer (D Atari 130XE

©Atari 1050 127K 127K Disk @ Atari 1050 Disk Drive Drive

CD Atari 1027 1027 Letter @Atari Letter Quality Quality 20 20 CPS CPS Printer Printer Letter Perfect Word Processer Processer Atari BASIC Tutorial Tutorial Manual Manual All All connecting con necting cables cob les && T.V. T.V . interface interface included. included . Monitors Monitors sold so ld separetly. sepo refly .

TOTALS

Other O'ther Accessories ..~ .. \-

12" 12" Hi Hi Resolution Re s olution Amber Amber Screen Screen Monitor Monitor 13" 13" Hi Hi Resolution Re so lution Color Color Monitor Monitor

INDIVIDUAL LIST PRICE

SAI.E PRICE SALE

$249.00 299.00 299 .00 299.00 59 .95 59.95

$134 $134" 179"' 179" 95 199 199"

16 .95 16.95

95 12 12"

$923.90 li sf list $799.00 $199 .00 $399.00 $399.00

95

AII50NLY All 5 ONLY

00 $ $399

95

39 39"

SYSTEM

$567.75 Sale Sale $59.95 $59.95 $159.95 $159.95

SAVE OVER $100 $100 OVER

SALE PRICE

Add $9.95 $9 .95 for f or Add Connection Cables Cobles Connection (Mon i tors Only) Only) (Monitors

(ltd . Qty) Oly) {Ltd.

Add $10 SIO for for UPS UPS Add

15 1S DAY DA Y FREE FREE TRIAL. TRIAL . We We give give you you 15 15 days days to 10 try try out ou l this this ATARI AT ARI COMPUTER COMPUTER SYSTEM!! SYSTEM! ! IfIf itit doesn't doesn't meet meeTyour your expeciotions, expectations . just just send send itit bock bo ck lo 10 us us prepaid prepaid

ond your purchase purchase price! pr ice ! !! 90 90 DAY DAY IMMEDIATE IMMEDIATE REPLACEMENT REPLACEMENT WARRANTY. WARRANTY . IfIf ony any of of the the ATARI ATAR ! COMPUTER COMPUTER SY5TEM SYSTEM equipment equ ipment or or and we we will w ill refund re fund your programs we will programs foil foil due due to to faulty fa ulty workmanship workmanship or or material material within wi thin 90 90 days days of of purchase pu r chase-we will replace replace iti t IMMEDIATELY IMMEDIATElY with wi th no no service se rvice charge! charge ! !!

Best Prices *• Over 1000 1000 Programs and 500 Accessories Available •• Best Service 9• One One Day Day Express Express Mail Mail •• Programming Programming Knowledge Knowledge •• Technical Technical Support Support Add Add $25.00 $25.00 for for shipping shipping and and handling!! handling!! Enclose Enclose Cashiers Cashiers Check. Check . Money Money Order Order or or Persona! Personal Check. Check . Allow Allow 14 14 days days for for delivery. delivery . 22 lo to 77 doys days for for phone phone orders, orders. t1day day express ex press moil! mail! We We accept accept Visa Visa ond and MasterCard. MasterCard . We We ship shi p C.O.D. C.O.D . to to continental con ti nento l U.5. U.S. oddressesonly. addresses only . Add Add S10 S10 more more ifif C.O.D. C.O. D.

COMPUTER DIRECT We Love Love Our Our Customers Customers We

22292 N. N . Pepper Pepper Rd., Rd. , Barrington, Barringt on . 111.60010 III. 60010 22292

312/382-5050 to 'to order order 312/382-5050

any value of MEMLO. That exex plains all the IF-THEN statements which make the program look so strange. To use Atari Atarl Keypad, try the version created by Program 11 first. If that doesn't work, try the other version. Use the second version with the Automatic Proofreader. If you already have an AUTORUN.5YS RUN.SYS file on your disk that you regularly use, you can append it to the Atari Keypad AUTORUN.SYS file so both will boot automatically. Follow these steps: steps: 1. Boot up Atari DOS 2.0 or 2.5. 2. 2. Rename your existing AUTOAUTO RUN.5YS RUN.SYS file. For example, call it OLDAUTO. 3. Exit to BASIC and run either Program 11 or Program 2 to create the keypad AUTORUN.SYS file on disk. 4. Enter DOS and select the COpy COPY option. When the prompt appears, type OLDAUTO,AUTORUN.SYS/A. RUN.5YS/ A. Don't forget the /A /A or you'll end up with your old AUTORUN.5YS AUTORUN.SYS file and have to start over again again.. If your existing AUTOAUTO RUN .SYS file happens to use the RUN.SYS same memory as Atari Keypad, it would be overwritten when the keypad is booted. booted. Another problem could crop up if your present AUTORUN.5YS rouAUTORUN.SYS file installs a rou tine at MEMLO and the routine isn't relocatable. If the keypad is installed at MEMLO first, the secsec ond routine would wind up at a different address than it was dede signed for. This would most likely cause the system to crash. Most of the time there's no trouble, however. If you can touch-type on a keykey pad, you'll find Atari Keypad a great aid when entering DATA statements. But don't forget it can also be useful with other programs that call for numeric input.

For instructions on entering these lfstlngs. listings, please refer to "COMPUTEl's x'COMPUTE!'s Guide to Typing In Programs" published bimonthly In in COMPUTEI. compute'.

Program I: Atarl Keypad 1: Atari For Page 6 PA10 PA 10 OPEN *1,8,0,"O:AUTORUN #1,S,0,"D:AUTORUN . SY5" .SYS" 98

COMPUTEI COMPUTE!

December 1985

E1:2121 EK 20 FOR LE30 LE 30

X-I X=l

TO A:PUT A: PUT

READ

U 16121 160 FJ

17121 170 "ItA #1 , A

III N! 17121 170

PL 4121 40 NEXT X X CP 5121 50 CLOSE II #1 DN 60 m60

END

AJI 1000 1\11 10~'"

HB UJ 1121 1010

DE OE 11212121 1020 JI: IK 112130 1030

DATA 255,255,128,6,2 3a, 6, 32,128,6, 12e1 DATA 173,8,2,141,16'5 ,6,173,9,2,141 TA 166,6,16^,1^6,1 DATA 166,6,169,156,1 ,B,2, 169,6, 141 41,8,2,169,6,141 TA 9,2,88,96,169,6 9,2,8B,96,169,6 DATA ,72,169,167,72 17 DATA 8,8,76 ,164,6,17 •-*

~H 112140 KN 1040

AK1050 AH 1050 6J GJ 11216121 1060

11K nH 112180 1080 AE HE 112190 1090

i

f">

ii~T

—f'-t

PA Fft 24O 240

l.

'-inn

a

*->

*-i(x

a

UK DK 1130 1 130 DATA 6,169,128,133,1 2, 169,6,1 33,13,120 2,169,6,133,13,120 1 140 173,B,2,141,165 HF 114121 DATA 173,8,2,141,165 ,6,173,9,2,141 01 166,6,169,156,1 C! 115121 1150 DATA 41,8,2,169,6,141 41 ,B,2, 169,6, 141 9,2,B8,96,226,2 LH 116121 1 160 DATA 9,2,88,96,226,2 ,.227.2.0.6 227,2,121,6

Program 2: Atari Atarl Keypad For Low Memory

n030 DO 30 D64121 DG 40

AI5 0 AI 50

n: 60 KK 6121

START=4+PEEK (743) +PE E K START=4+PEEK(743)+PEEK (744)'256 (744)*256 *1,B,0,"D:AUTQRUN OPEN tll,8,0,"D:AUTORUN .SYS" FOR 1=1 1=-1 TO 190 READ x~ IF 1=3 THEN X=S X""S X:IF TART-INT(STA R T /2561*25 TART-INT /256) IF 11 ::14121 X=( STAR = 140 THEN X=(STAR T+2)-INT«START+2)/25 T+2)-INT((START+2)/25 6)'256 6)*256 T( ( IF 1""141 THEN X:=IN 1=141 X=INT(( START+2)/256) IF 1:=143 TART 1 = 143 THEN X=S X = START -INT(START/256)'256 -INT(START/256)*256 IF 11:=147 X =INT(S = 147 THEN X = INT(S TART/256l TART/256) X=>(STAR IF 1=155 1 = 155 THEN X=(STAR T+47)-INT«START+47)1 T+47)-INT((START+47)/ 256)'25 6 2S6)*256 X:INT« IF 1""156 1 = 156 THEN X = INT(( START+47)/256) THEN X:=(STAR 1 = 161 X=(STAR IF 1:161 T+48) - I NT (START+481 1 T+48)-INT((START+4B)/ 256)*256 X= INT« IF 1:=162 1 = 162 THEN X=INT- &HCC &H44 + + &HII &H11 &H55 + &H55 &H66 + + &H99 &H77 + &HDD &H88 + + &H22 &H99 + + &H66 &HAA + + &HAA &HBB + &HEE &HCC + &H33 &HDD + + &H77 &HEE + &HBB &HFF + &HFF &HhT

HB 30 30 FOR Y=0 V=0 TO 15 O£ 40 4121 FOR X=0 X=@ TO 15:Z=Z+1 15 : Z=Z+ I E( 50 513 LINE (X»A,Y*12.5)-(X*A+A,Y (X*A , Y*12 . S1-(X*A+A,Y

(X,0)-(X,200I, l; NEXT (X,0)-(X,200>,1:NEXT

KS 70 713 FOR XX=201 = 201

Also, Also. see Table TobIe 5 for for a 0 description description of of the the

(X,0>--0 THEN PAINT PA I NT

(X.A+ l , 0 ZO0

THEN PAINT PAINT THEN

.3 V*1 2 . 5+11,CHRS(Zl YH2.5+1) ,CHRI (Z) ,3

(X* A+ l , (X*A+1,

~ flh

78 :Z=-l:A=INT(320/16):Y= 21 ):Z = -1 : A~ IN T( 3 2 @/ 16):Y=

o0

1 : CL S : KEY OFF: COLOR 1:CLS:KEY OFF:COLOR

3~ 31

10+ 10:TILE= INT > 4 THEN CR CR = CR -- 1 1 4 2 30 RETURN 4230

"Q" "Q" OR C$ C* = "q" THEN HOME : END 4510 IF C$ C* = "P" OR C$ C* '" = "p" THEN POP : GOTO 41121 410 4520 IF C$ 13 ) THEN R C* = CHR$ CHR* ((13) LOAD/RUN ETURN : REM LOAD / RUN SU BROTINE 453 121 REM 4530 REM CS C* MUST BE C OR OR c SO CONTINUE 454121 INPUT" INSERT NEW 4540 HOME : INPUT "INSERT DIS K THEN PRESS < RETURN DISK > " "1" E$ ES < < ) > "r" AND Ei E$ < < ) > "U " AND ES E* < < > "u" THEN 50

92 B2 451210 4500 IF C$ C* '" =

=

30 D,o, Dfi 5045 HTAB 5:

VTA8 VTAB 3:

PRINT" PRINT "

58 7 IF E$ 5047 E* = "U" OR OR ES E* ::: = "u "u"" 5* 504 THEN PAGE ::: 0 = 0 0:: GOTO 41 410 7r 7F 5050 IF ES E* ::: = "L" OR ES E* c= "1" THEN 5100 9E ?E 5060 HOME: HOME : PRINT O$;"-"jFILE D*; "-"; FILE

S * !7 17 5070 NEW EI BAS " T HEN HO tt 5101' 510017 IF TYPES TYPE* ::: = ""BAS" THEN ME :

PR INT OS j " LOAD"jFIL PRINT D*;"LOAD";FIL

ES E* 44 YPE S = ""BIN" BI N" THEN PR » 511121 5110 IF T TYPE* INT OS ; " BLOAD";FILES D*;"BLOAD";FILE» D TO 42103 @ D99 5120 5120 GO GOTO 420 ©

R" 07 INT OS; 2 0 PR D7 3 320 PRINT 0*; "REAO"jVL$ "READ"; VL* D1 l$: INPUT Z$: DI 325 INPUT Z*: Z*: INPUT

330 or DF 335 4E 340 FA 345

"

..

3350 50

n72

370

6fl

Free Catalog) Catalog!

Z$ Z*

ccCC

SF BF 360 7S 75 411113 400 F4 410 52 420

" 420

INPUT L$ (Ll L*(L) CH$ D$ (L$( L ) ,18, 3 ) CHS = MI MIDI CL*(L),18,3) IF L$~(L) 611:1 L*(L) = "" THEN 3 360 IF CH$ " AND CHS CH* < > "BAS "BA5" < " THEN 330 < > "8IN "BIN" LL = L L + 1: GOTO 33121 330 PRINT D$j"CLOSE" D*;"CLOSE" MA X = LL -- 11 MflX PAGE = 121 0 GOSUB 60SUB 20011:1: 2000: REM LOAD PAGE INTO ARRAY I NT ARR AR R GOSUS 11:1011:1 : REM PR GOSUB 3 3000: PRINT

=

=

80-page guide to computer supplies and Your SO-page accessories-including complete new product descriptions. newproduct

=

AY

FF 4 3 0 GOSU8 430 GOSUB 4011:111:1: 4000:

REM REM

ACCEPT

• Packed with with over 1600 products for microcomputers, minicomputers, and word vailable oowhere word processors processors -- many a available nowhere else. efse. •I B ig special ccessories. Big special section devoted devoted to new supplies and a accessories. •■ Comprehensive product descriptions -- including more than 475 full -color photos full-color photos -- clearly explain tealures features and and benefits. benefits. •■ Easy-ta-use Easy-to-use cross reference guides to lo magnetic magnelic media, media, ribbons, ribbons, and more-a long with the industry' more-along industry^s most complete cable guide.

1N IN

PUT

F! O 5 000: REM RUN / LOAD Fl 440 GOT BOTO 5000: RUN/LOAD 86 INITIALIZE ARRAY Bi 2000 REM 6820 10 FOR I = 4 TO 19:A$(I) it 2010 19: At (I) = ": HTAB 5: VTAB I: PRIN ""'■: T SPC XT SPC(C 16> 16):: NE NEXT 27 2020 REM LOAD PAGE INTO ARR

=

AY

•■ H elpful suggestions and lips, Helpful tips, ranging from lIexible flexible disk disk care care to to proper ribbon selection to useful application ideas.

*

44 2030 N = PAGE * 16 16::PAGE PAGE = PAG 64 E + 1 1 2e 29 2040 IF (MAX -- N) > = 16 THEN LIM = » 16: IF (MAX -- N) = 16 THEN PAGE = 0 0 4D 2045 F (MAX 204S IIF : NE

ESBS "BC":NE XT ESB* (X,X+l)«'■**": NEXT

e . (( 1174,1174) -"I;:" BS 1174, 1174)-"IT" REM Set up GR. 2+16 d BR. isplay list for ve r ti verti c a l fine scrolling cal DL""PEE K (56121) EK DL = PEEK (560) +256*PE +256*PEEK (56 (5611 )

PO KE POKE FOR

OKE QKE

DL+ DL + 3,11213 3, 103 X= DL +6 X=DL + 6 TO X,39:N E XT X,39:NEXT

DL +15 :P DL+15:P

X X

lN4 8 121 LH 4B0

REM Start display RAM at beginning begi nning of ESBS ESB* JJ49121 N T(ADR (ES S S)/256) JJ 490 HI:I HI = INT(ADRCESB*) /256) II ADR (ESBS) -256'HI BI see 500 LO -= ADR(ESB*5 -256*HI JB5 1 0 POKE DL +4,L O:PO K E DL+ JB510 + 4, LD:POKE DL + 5,HI E0 0 REM Initialize Initi a lize variab varia b GO 52 520 es for VBI 1 les ~53121 HB 530 POKE 21213,0:POKE 203,0: POKE 21214,121 204,0 :POKE 21217,121 207,0 J" 540 POKE 21215,PEEK(560) JA540 205, PEEK(560) JP 121 POKE 21216, PEEK (561 ) JP 55 550 206,PEEK(561) n dee di spia HO 56121 560 REM Turn vi video displa y back on 4 AB 57121 570 POKE 559 559,,3 34 J1I JD 58121 580 REM Start VBI going; i t will st ep automati it Mill stop

cally oily DB DG 590 616121121 61 600

&11 SH 61121 610

A -= USR (1536) fl ( 1536) REM Thi s iIs s need ed to This needed keep GR. 2 displ ay o display n the screen GOTO @ GOTO 61121 610 ©

°

2_ 20

Commodore Program Chaining Orland o Lee Stevenson Orlando

LOAD In Program Mode

Let's say you have two programs you want to chain together. The odore 's solution can be as simple as placing Take advantage of Comm Commodore's automatic chaining feature feature to link LOAD ""PROGRAM PRO GRAM NAME",8 NAME ", 8 two or more BASIC programs together. (disk) or LOAD "''PROGRAM PROGRAM The method illustrated here applies to NAME" (tape) in place of an END all Commodore computers. computers. statement. In Commodore BASIC, a LOAD command executed as part of a program automatically loads and runs the specified program. program . If Program chaining is a method of the programs are completely unreunre linking separate programs together, lated, nothing more needs to be making them run, in effect, as one done. However, if the programs are large program. Why would you need to chain? Some BASIC pro pro- related, you'll probably want to grams simply grow too large to fit pass variable values from one to the a procedure that reinto memory: Chaining lets you other as wellwell—a re pro- qUires quires some care. On all CommoCommo break them into two or more pro gram modules that work together dore computers except the 128, variables and arrays are stored in as one. one. This method also lets you interconnect an entire group of pro pro- memory immediately following the end of BASIC program text. Since grams, moving from one to another another clifferent whenever you like. different programs are of clifferent different 114

COMPUTEI COMPUTE!

December 1985

lengths, the actual location of varivari ables depends on the length of the program. The computer uses twobyte address pointers to keep track of where everything is stored, and updates the pointers as needed while the program runs. When you perform WAD LOAD in program mode, the computer does not reset the pointers for variables, arrays, and strings. strings. Thus, after it loads a second program, the computer still knows how to find and use all of the first program's variables. The success of this procedure depends on the relative length of the chained programs. programs. If the lirst first program is longer than the second, proall is well: When the second pro gram loads in, its shorter program text doesn't extend as far as the area where variables are stored. stored. (Re(Re member, the first program's varivari ables are still located in the same

pro place). However, if the first pro2. Scan the list of numbers to find gram is shorter than the second, you program:: It's the one the longest program pro with the highest end-of-text have trouble. When the second proover number. Now reload that program loads, its longer text overpro writes the variables. Though the gram and find the contents of pointers still point to the right area, area, addresses resses you PEEKed the two add the variable data which used to be above. For the VIC, 64, Plus/4, pro or 16, there has been replaced with pro16, type PRINT PEEK (45),PEEK(46) in direct mode; gram lines. Once that happens, the variables are lost. substitute the proper addresses PET/CBM. This is not a problem with if you are using a PET / CBM. Two numbers are printed. These BASIC 7.0 on the Commodore 128, because it keeps variables in a sepasepa are the actual pointer values for rate 64K bank of memory. Thus, the longest program. Write them down, labeling the first number 128 programs can be chained freely overwrit La without worrying about overwritLO and the second HI. You now ing variables, and all the following know the lowest safe storage adad vari discussion about preserving varidress for variables in this chain. ables does not apply. However, you should still read the section entitled 3. Reload the first program in the chain.. Do not run it or enter any chain for ""Chain Chain with Care." And don't fordirect mode statements that overwrit get that variables will be overwritwould create variables. Enter ten if you're running the 128 in 64 the following lines, replacing W LO mode, just as they would be on a and HI with the numbers you rere 64. 64. corded in step 2. For instance, if La LO is 20 and HI is 9, you would Changing The Signposts type the first line as POKE The easiest solution is to make sure 45,20:POKE 46, 9+ 1. Don't for for9+1. the first program in a chain is longer to get press RETURN after each than all the rest. However, in many line, line. cases the first program in a chain is For the VIC, 64, Plus/4, and 16: quite short. It may be a menu pro program—one that simply lets you gram-one choose among several programs to run.. load and run answer. Fortunately, there's an answer. By resetting the first program's pointers, you can make it store varivari ables in an area that won't won' t be dis disrupted by following programs in the chain. Here are the steps to follow (you can use any BASIC pro programs to practice this technique): 1. First, find the length of every program in the chain chain.. Load the program and type the appropri appropriate ate line below in direct mode (without a a line number), number), then press RETURN. For the VIC, 64, 64, 128 128 in 64 mode, mode, Plus/4, and 16: PRINT PRINT PEEK(45) PEEK(45) + + PEEK(46)*256 PEEK(46)'256

For PET/CBM PET / CBM (Upgrade and 4.0 4.0

,POKE 46, Hl + 11 POKE 45,LQ 45,LO:POKE 46,HI POKE 47,LO:POKE 47,LQ,POKE 48,Hl 48,HI + 1 1 POKE *9,LO:POKE ~9, LO , POKE 50,Hl+1 50,HI + l

PET/ CBM (Upgrade and 4.0 For PET/CBM BASIC): POKE 42,LO:POKE 42,LQ,POKE 43,HI 43,Hl+l +1 POKE 45,Hl+ POKE 44,W,POKE 44,LO:POKE 45,HI +1 1 POKE 46,LO:POKE 46,LO,POKE 47,Hl 47,HI + 1 1 4. Finally, resave this program. program. Do not delete the the original version 3 (see explanation below). Step 3 sets the first program's end-ofpointers to an text and variable pointers addre5s 256 bytes above the end address the longest program (the extra of the bytes bytes provide aa margin for er erartificially in ror). Though it artificially creases the length of the first program, this this method method lets lets you you entire package without run the entire losing losing variables. variables.

BASIC): BASIC):

Chain Chain With Care Care

PRINT PRINT PEEK(42) PEEK(42) + PEEK(43)*256 PEEK(43)'256

This This method method of of program program chaining chaining

This This number number is the location where where the the program's program's text text ends ends and its its variable variable storage storage begins. begins. Write Write down the the end-of-text end-of-text number number and note note which which pro program gram itit belongs belongs to, to, then repeat for every every program program in in the the chain. chain.

has limitations. User-defined func funchas tions-created with DEF DEF FN()— FNOtions—created cannot be be passed passed at all, all , since since their cannot definitions definitions are are stored in in program program va riables. Such Such func functext, not as variables. tions tions must must be be redefined redefined in every every program program that that uses uses them. them.

Strings may cause problems as well. In the VIC, 64, and PET / CBM PET/CBM versions of BASIC dynamic strings (which result from a string operaopera + B$) tion such as A$ ~ = "HELLO" "HELLO"+ are stored outside the program text, they can be passed like other varivari ables. The same is not true of static strings. Like a function definition, a static string exists only in a program " ) . If you line (10 A$ A$ ~"HELLO = "HELLO"). need to pass a static string, simply add a null string to it (for instance, HE L LO " with 10 replace 10 A$~ A$ = " "HELLO" A$~ HELLO" +""). A$= ""HELLO" + ""). The string operation (+) ( + ) turns it into a dydy namic string, storing it outside the program. This is not a problem in the 128, Plus/4, and 16 versions of BASIC, where all strings are effeceffec tively dynamic. Be careful when editing chained programs. programs. If you lengthen a program, it may become the longlong est one in the chain and overwrite variables when it loads. loads. Do not edit and resave a program after break breaking out with RUN/STOP (since the pointers are set at artificially high locations, the program's length is abnormal). Instead, reload the pro program to set the pointers correctly, then make the changes and save it again. Whenever you edit any of the programs in the chain, you should also repeat steps 1-4, using prothe original version of the first pro gram. gram. It's critical that you know the true length of this program, not the inflated length it was given in steps 4. 3 and 4. There are other ways to pass va ri ables while chaining, but variables they 're inevitably cumbersome. cumbersome . they're One approach is to store variable data in a separate memory area while one program program loads another. while ~ 10. Just instance, say that A A= For instance, first program loads the the first before the second, it POKEs the value of A A into aa safe memory location (say, 64). The 49152 for the Commodore 64). first thing the second program does retrieve A's A's value value with aa state stateis retrieve ment like like A A~PEEK(49 1 52). Since aa ment = PEEK(49152). single memory location can hold single only aa number from 0-255, 0-255, it re reonly multiple POKEs and PEEKs PEEKs quires multiple pass larger larger numeric numeric values. values. Pass Passto pass arra ys, strings, or or more complex ing arrays, numbers (negative values, for in innumbers stance) takes even even more work and stance) ingenuity.

@ © December 1985 1985 December

COMPUTEt COMPUTEI

115 115

Commodore Dynamic Keyboard Part 3 JIm Jim BUiterf,eld Butterfielcf. ASSociote Associate Editor

Parts 11 alld and 2 of this series showed dynamic keyboard tech how the dy"amic IIique-which nique—which allows allozos the computer to to seemingly on its OWII own keyboardkeyboard— seem illgly type 011

things would other yo" do tll illgs that wo uld otherlets you wise be difficult or impossible from within well look at with ill aa program. Now we'll thee trickiest applicat application this techtech th ioll of this nique—writing changes IIique-writilig aa program that challges runs. itself as it rlIIIS. Let's quickly review how the dydy namic keyboard technique works. First, First, the program prints the desired

screen localoca command at aa specific screen tion. Then a RETURN RETUR character is placed in the keyboard buffer. FiFi nally, the program progra m stops with the the cursor cu rsor flashing nashing over over the screen command. The RETURN in the the keyboard buffer causes callses the operat operating system to read the command on the screen and carry it out, just as if you yo u pressed pressed the th e RETURN RETUR N key. Using Us ing the same same principle, principle, we "ve can commands on on the th e put several commands screen and make the program program exe execute them all.

The The following table shows the location loca tion of of the keyboard buffer collnter and the start of the the key keycounter board buffer buffer on most Commodore Commodore board

computers:

computers:

Counter Co un ter

Buffer Buffer

VIC- 20, Commodore Commodore 64 V1C-20, Commodore Commodore 16, 16. Plus/4 Plu s/ 4

198 198 239 239

631 631 1319 1319

PET/CBM PET I CBM (Upgrade (Upgmde and and 4.0 4.0 BASIC) BASIC)

158 158

623 623

209 209

527 527 929 929

Original Original ROM ROM PETs PETs B12S B128 {Model (Model 700) 700)

116 116

COMPUTEI COMPUTEI

525 525

December 1985 1985 December

For a single-line command, POKE a value of I1 into the counter and a value of 13 (RETUR (RETURN)) into the buffer. To execute more than one screen line of commands, use a higher coun countt and more RETURN characters. On the B128 BI2 8 computer, BANK 15 comit's wise to execute a BANK com mand before the POKEs, PO KEs.

other ways to do the job, but yo u you usually wa nt to get it done in the want most direct way possible. You might be wondering why you'd ever need to design a pro program that modifies itself, anyway. Here's an example example.. Suppose you have something in a special special part of memory-a machine language pro promemory—a

Self-Editing Programs

gram, a screen picture, oorr aa data table. Whatever it is, you want to

The usual way to change a program

take the information and build it

is to type in a new line and press

into a series of DATA statements so

RET URN. The line is either added RETURN.

n be reconstituted by by a BASIC BAS IC it ca can

to the program or it replaces an existing line with the same line number. A program can do this, too, using the dynamic keyboard technique there 's aa hi tc h . technique.. But there's hitch. Whenever you enter a program CLR line, the computer performs a CLR command, which closes all open of all files and clears the contents of variables and arrays. This can be proannoying, since it's hard for aa pro to continue running after its its gram to

But with some variables are gone. But programming, you can still careful programming, make make things thi ngs work. The solution is to identify your you r The variables, make the program program key variables, change itself, itself, then reinstate the change va riables with with the dynamic key keyvariables effect, the the vari va riboard technique. In effect, board ables are temporarily temporarily stored on the the ables screen and put put back in in the program progra m screen equivalent of aa direct com comby the equivalent

Crude? Whatever mand . Tricky? Crude? mand. of this this method, method, the the your opinion of point is is that itit works. works. There There are point

program

when

needed. Perhaps

mayou 'd like to publish a small ma you'd progra m in aa news newschine language program lette r or magaz ine , and an d want wan t letter magazine, in as readers to be able to type it in DATA statements rather than the the DATA compl ex hexadecimal code. more complex How to do it? First, let's write vnite some data into First,

ha ve some somememory so that you'll have conve rt to DATA state statething to convert Here's aa quick program to ments. Here's put a series of prime prime numbers into memory locations 828 828 to 881: 881: memory 100 POKE POKE 828,2 82 8 , 2 110 POKE POKE 829,3 829 , 3 110 120 N=3 120 N=3 130 130 140 140 150 3.50 160 160 170 170 180 1.80 190 190 200

200

2 10 210

:rem 192 rem 192 195 :rem rem 195 rem 81 81 :: rem FOR A=830 A==830 TO TO 881 881 : rem rem 21.6 FOR 216 N=N+2 rem 203 : rem N=N+2 203 M=3 TO TO SQR(N) SQR(N) ++, 1l STEP2 FOR M=3 STEP2 :rem 106 rem 106 T=N/M : rem rem 242 T=N/M 242 IF T=INT{T) T=INT(T) GOTO GOTO 140 l40 IF em 22 22 ::r rein NEXT MM NEXT 37 : rem 37 :rem PRINT Hf N; PRINT : rem 176 176 :rem POKE A,N A, N POKE ;rem 124 124 :rem NEXT A A NEXT :rem 19 19 :rem

That's not not the the most mos t efficient efficient That's

effectively clears clears all all variables variables to to effectively

prime number number generator, generator, but but itit prime

zero.

does put put the the numbers numbers into into memory. memory. does The last last number number should should be be 251. 251. The Now, suppose suppose you you want want these these val val ~ Now,

been created—you've created-you've generated gene rated been

ues in in DATA DATA statements stateme nts so so that that aa ues

different program program will wi ll be be able able to to different POKE them them back back at at the the start start of of the the POKE run .

run.

Frenzied Activity Activity Frenzied

15 15 20 20 25 25 30 30 35 35 40 40 45 45

: rem 206 206 :rem

PRINT CHR$(147) CHR$(147) :rem 225 225 PRINT :rem PRINT : rem 239 239 PRINT :rem PRINT :rem 244 244 PRINT :rem PRINT Lr"DATA"; Li"OATA": : r em J.6 PRINT :rem 16 DS=STRS(PEEK(A)) ,rem 50 D$=STR$(PEEK(A)) :rem IF N>0 N)0 THEN THEN D$=","+MIDS(D$, D$ =","+MI D$(DS , IF 2} :rem 51 51 2} :rem

se

PRINT PRINT

: rem :rem

OS; D$;

1153 53

50 A=A+1:N=N+1:IF A::::IA+l:N=N+l : IF N(l47) :rem 225 CHR$(147) PRINT ::rem rem 239 PRINT :rem 244

3121 , X$:X=ASC ( X$) 30 GET#! GET#1,X?:X=ASC(X$)

:rem ]3 78

35 IFX)47 IFX>47 AND x,32

We're still in bank 15, 15, but this address isn' isn'tt a chip. The address $OA2C S0A2C (decimal 2604) 2604) is below $4000 $4000 (16384) (16384).. When When we're we're using bank bank 15, 15, all all such such low addresses addresses go go to to RAM, bank bank O. 0. This POKE sets the the position of of the the character character set set and and the screen screen within within the the video video slice slice we've we've selected. selected. The The calculation calculation goes goes like

This tells tells the computer compu ter to take This video from bank bank 1. 1. If If we we wanted video video from bank bank 0, 0, we'd POKE POKE aa video 4-or just leave this line line value of of 4—or value value that that will will since that's the value out, since any case. case. be there in any be 170 POKE 217,4 This POKE tells the computer to take its video from RAM, not

ROM. We don't need to give this one for the addresses add resses we have cho chosen, since there is no conflict. This very low address has a special banking rule: All addresses below hex $400 (1024) go to RAM bank 0, regardless of the bank which has been speCified. specified.

Relocating The Screen Now our video is set up and ready to go. We'd better put something on the screen so we can see it working. It seems sensible to copy our old screen to the new place; then we'll copy the character set. We'll make a sligh slightt change so you can see how to create a new set of characters. First, our screen must must move from from bank 0, address $400, to bank 1, 1, address $C800. We must move the whole thousa nd characters. thousand

200 210 220 230 230

FOR )J -= 0 TO 999 999 BANK O:X + J) 0:X ~ = PEEK(]024 PEEK(1024+J) BANK HOKE + I,X 1:POKE OEC("CBOO") DEC("C800")+J,X NEXT IJ

This This moves screen screen memory, memory, but since the character character set is is not not in in place, place, the the result would would look look rather rather muddy. muddy. We can can read read the the character character set by by selecting selecting bank bank 14; 14; it it is is found found

300 300 FOR FOR J1-= DEC("C0OO") OEC("COOO") TO TO DECCC7FF") OEC("C7FF") STEP STEP 8B 310 310 FOR FOR KK= - 0TO7 O TO 7 320 320 BANK BANK 14 14 330 4096 + 7-K) 330 XX= - PEEK(J PEEK(J ++4096+ 7 - KI 340 340 BANK BANK 11 350 350 POKE POKE J1+ + K.X K,X

360 360 NEXT NEXT KK 370 370 NEXT NEXT JI

This This puts puts the the character character set set in in place. place. When When you you run the the program program

Cleaning Up We're finished—almost. finished-almost. We must be neat and put everything back the way it was. This also gives you a chance to see the original values that were in the various registers and addresses.

500 BANK 15

510 520 530 540

POKE POKE POKE POKE

DEC("DD00"),151 OEC("0000"),151 OEC("OA2C"),20 DEC("0A2C"),20 OEC("0506"),4 DEC("D506"),4 217,0

These lines restore the original screen. A little study should enable you to guess at what each POKE does—or undoes. does-or Finally, ll y, we need two last lines Fina to complete the job. But there's an not enter these important note: Do 1Iof pro lines until you've tested the profound it good. If If your gram and found program has has a a problem, you you'll 'll want to be able to look at the variables commands such (by using com mand s suc h as find out what went went PRINT J) to find final lines make it wrong. These final for you to to do do so. impossible for 550 POKE 5B,OEC("FF") 58,DEC("FF") 550 560 CLR CLR 560

We've given given back back to to the the comcom We've puter its its variable variable storage storage memory. memory. puter And the the job is is complete. complete. ® And @ December 1985 1985 December

COMPUTEI COMPUTEI

119 11 Q

Apple Hi-Res Screen Dump ark Russ1novich Mork Russinovich

YOII -resoilltioll You call can easily dump high high-resolution graphics pictures pictllres O lltO aa dot matrix graphics onto

prillter with this efficiellt printer efficient machille machine lallgllage IItility. It's also all language utility. an ideal way to screell dllmp llr to add a a screen dump optioll option to YO your O WIl BASIC programs. It reqllires own requires all an Apple lie IIe or 77 II + comp"ter computer with at least 48K RAM alld Epsoll or EpsonEpsolI48KRAM and all an Epson compatible printer, prillter, as well as all Epsoll an Epson or Epsoll -compatible parallel illteror Epson-compatible inter ,wects to to slot 1. For For face card that co connects

+

both DOS 3.3 alld ProD OS. and ProDOS.

Have yo u ever wished yo u could you you print out an image that appears on

the hi-res screen? This can be useful ~------------------------------l for inserting graphs or charts directdirect changes the ampersand vector to of Epson MX-series printers should ly into text, or just saving interestinterest allow access from Applesoft. note that sizes 2, 3, 6, and 7 will llot not ing pictures and mathematical plots. Program 2 makes it easy to work with wit h their printers. These progra m below, ""DUMP," DUMP," catalog disks, load hhi-res With the program i-res pictures, sizes use codes available only on you can do all these things with view the pictures, and dump them Epson's newer FX aand nd RX models.) minimal eeffort. ffort. on the printer. Just select the flIl1cN ext you'll be as ked for a tab value. Next asked func tion you want Using DUMP wa nt from the menu. This lets you position the picture Using DUMP Wh en you choose to print the hi-res exactly where you want it. Specify When To get get started, started, type type in Program 1 1 To in Program screen, program asks you to the tab in pica pica characters, the tab value value in characters, screen, the the program asks you to using the "Apple MLX" machine using the " Apple MLX" machine spec 'f . th e printout. . tau t . makl'ng not exmaking sure sure the the value value does does not ex I y th e sIze aoff the prIn specify the size language entry entry program found elseelse language program found There sizes, ranging ranging from from aa ceed the page page minus minus ceed the the width width of of the There are are nine nine sizes, where in this this issue. issue. Be \,\'here in Be sure SU f e you you small II bl k tto a full f II page. (0 the width of the envise, the width the picture. picture, Oth (Owners p_ag_e_.__ understand instructions for s _m_a_block _o_c__ o_a_ u__ w _n_ e r_s_ _ _ _ _ of __ _ _ _ _Otherwise, _ _ _--1 understand the the instructions for Iu begin enterusing MLX before yo you enter ing the data from Program 1. The requ ired starting and ending adrequired ad dresses for DUMP are:

Table of DUMP Sizes Size

Starting address: 9000 Ending address: 910F 91DF

After you finish typing in the data, use MLX MLX to save it to disk with the na me DUMP. To install DUMP in name memory for later use, just jus t type BRUN 'DUMP. DUMP. It It loads into BRUN loads itself itself into memory, protects itself from AppleApple soft by resetting H1MEM, H IMEM, aand nd 120 120

COMPUTEI COMPUTEI

December 1985

11 22 33 44 55 6 7 8 9

Wid th Width Pica

Width Elite

Width

Height

Height

Inch

Char

Inch

24 35 35 47 47 58 58 70 70

28 42 42 56 56 69 69 84 84

2.3 1 2.31

14 14 32 14 32 32 48 48 32 48

2.3 2.311 2.31 2.31

3.50

3.50

4.62 4.62 4.62

5.75 5.75

7.00 7.00

5.31

2.31 5.3 1 5.31

5.31 5.31 8.00 5.31 5.31 8.00

the the picture picture might might be be cut cut off off at at the the edge edge of of the the page, page, or o r wrap wrap around around to to the the middle. middle. IfIf you you enter en ter aa tab tab value value of of zero, zero, DUMP DUM P automatically automatically cen centers ters the th e picture picture on on the the page. page. To To embed embed aa picture picture within within the the text text of of aa document, document, you yo u should should leave leave room room for for the the pictures pictures in in your yo ur document document by by changing chan gi ng the the mar margins. your convenience, con venience, the the ac acgins. For For your

companying companying table tab le shows shows the the widths widths and and heights heig hts of of all all nine ni ne print print sizes. s izes. After After printing printing out out your yo ur document, doc ument,

rewind rewind the the paper paper to to position position the the print p rint head head about about one o ne line line above abo ve the the space space you yo u left le ft for fo r the the picture. picture. Then Then run run Program Progra m 22 and and request requ est the the size size

and and tab tab value valu e you you planned planned for. for. This This procedure proced ure might migh t take take aa little little prac prac-

tice you can ca n place place aa picture picture tice before before you exactly where w here you you want want it. it. exactly Note that that DUMP DUMP sets sets the the print printNote er to to all all of of its its default default values values after after er running. IfIf you you were were using using aa special special running. mode or or typeface, typeface, you'll you 'll have have to to mode restore restore that that mode mode after after running running DUMP. DUMP.

DUMP With With Other Other DUMP Programs Programs DUMP isis especially especiall y handy handy when when DUMP used with with graphing graph ing and a nd drawing drawing used programs, and and for for this this reason reason you you programs, may want want to to add add itit to to programs programs of of may your own. own. To To do do this, this, add a line line at your the beginning beginning of of the the program program simi simithe to this: this: lar to lar 10 PRINT PRINT CHRS7 1217 E0 EI2I 02 02 F0 Fe 07 1217 20 2121 C9 C9 65 6S DE DE A9 A9 20 2121 D0 De 02 1212 A9 A9 4EJ 4121 85 8S F0 Fe E6 E6 20 2121 BE BE DE DE 20 2121 FS F8 E6 E6 E0 EI2I 26 26 0A 0A B0 Be 1A lA CA CA 8E 8E D5 OS 91 91 20 2121 B9 89 00 D0 97 F6 E£> E0 BE DE 20 BE DE 2121 F6 E6 E0 121121 De 97 06 1216 AC AC D5 OS 91 91 BE BE 6B 6 8 91 9 1 BE 8E C0 CI2I DB DB 91 9 1 4C 4C 58 58 90 9121 20 2121 C7 C9 DE DE 4A 4A F9 84 FA 84 EF 03 A0 00 84 AI2I 121121 B4 F9 8 4 FA 84 EF 1213 84 FF 5C 84 FB B4 FD 84 FE 8 4 F8 8 4 FO B4 FE 84 FF 5 C AC AC D5 05 91 91 A9 A9 IB 18 20 2121 62 62 91 91 Dl 01 A9 A9 33 33 20 2121 62 6 2 91 91 B9 89 74 74 91 91 4B 4B BD D6 34 20 2121 62 62 91 91 B9 89 7D 70 91 91 80 06 3 4 91 B9 6B 91 91 B9 89 86 86 91 91 8D 80 D7 07 91 89 68 BF BF 91 9 1 8D 8 0 D8 08 91 91 AA AA CA CA 8E 70 D9 09 91 9 1 B9 89 98 98 91 9 1 BD 80 DA OA 91 91 CD CD 06 D5 98 98 0A 0A AB A8 B9 8 9 AB Ae 91 9 1 85 85 1216 OS 00 Bl FF B9 89 A9 A9 91 91 85 8 5 07 1217 A0 AI2I 121121 B 1 06 1216 99 99 DC DC 91 91 C8 C8 C0 CI2I 03 1213 D0 De 08 1218 Fh F6 A9 A9 0A I2IA 20 2121 62 62 91 91 AC AC DB DB 89 89 91 91 F0 Fe 08 1218 A9 A9 20 2121 20 2121 62 62 91 91 52 52 88 88 D0 De F8 F8 A0 AI2I 00 121121 A9 IB 18 20 2121 80 8121 62 62 91 91 B9 8 9 DC DC 91 20 2121 62 91 91 E7 C8 C0 CI2I 03 1213 D0 De F5 FS A5 AS FB FB 85 85 B7 C8 FC FC A5 AS FC FC C9 C9 C0 CI2I B0 Be 28 2B A6 A6 DD DO F9 A4 A4 FA FA 20 2121 11 11 F4 A4 A4 EF EF IF F9 Bl 81 26 26 A4 A4 FF FF 39 Al Al 91 F0 Fe 65 0B 1217 07 16 16 AD AD DA OA 91 91 A4 A4 FD FO F0 Fe 1218 1A AE D6 06 91 4A 4A CA D0 0121 FC FC 8B B8 lA AE 5C AC 4C F6 F6 90 9121 05 1215 FE B5 85 FE E6 SC FC E6 E6 FD FO A5 AS FD FO CD DB 91 E7 FC De C7 C7 A5 AS FE FE AC D7 07 91 20 2121 3A D0 62 91 91 BB 88 D0 De FA A9 A9 00 121121 85 F2 62 B5 F2 B2 FE 85 85 FD FO E6 FF A5 AS FF C9 82 FE 1217 D0 A9 1210 07 06 E6 00 85 00 DD De 1216 E6 EF A9 E6 F9 FF E6 F9 D0 De 02 FF A5 A0 1212 E6 FA AS AI2I F9 C9 C9 IB IB D0 De 98 A5 AS FA F0 10 F9 ID 94 A9 A9 00 121121 85 85 F9 85 7F 94 B5 EF B5 FA A5 A5 FB FB 6D 60 D9 09 91 85 FB C4 FA C9 C0 CI2I B0 Be 1213 4C Bl Bl 9121 2121 39 90 20 C9 03 4C 58 91 91 60 A9 IB 18 20 2121 62 91 E3 5B A9 40 4121 AE C1 3121 FB F8 80 A9 Cl C ClI 30 8D AE 9121 C0 CI2I 60 6121 ID 10 16 16 1611111E 90 16 11 11 IE eA 0A 0A 05 1215 05 1215 15 IS 15121542 0A 15 12 15 42 12 12 12 12 12 12 12 01 01 1212 12 02 25 1211 02 1212 02 1212 1213 1212 1213 01 03 02 03 01 1213 03 36 1213 01 121 1 1211 03 01 1215 05 1215 05 1213 03 1213 03 1217 07 IF 1217 03 1213 1217 07 07 1213 03 1213 03 1212 02 1213 03 1212 02 31 4121 40 40 60 6121 40 4121 6121 70 60 6121 C1 40 60 60 70 Cl 7121 01 0 1 1212 20 40 BD BO 02 1214 04 1218 08 Ie 10 20 70 BA 91 9 1 80 BA BD 91 C0 91 C3 91 C3 C6 91 91 C9 C9 9911 CC 91 CF 91 CB C6 02 9! 91 4C 4C is IB ~ 48 03 B° FO D2 pit SA 5A 48 SA 48 48 1213 48 18 18 121 5A 03 4B 011 48 4B 18 A8 AB 121 1 5A SA 78 78 1215 01 05 SA 5A 78 78 1215 05 4C 4C 60 6D 48 03 1213 4C 4C 48 48 1213 48 03 A2 A2 06 D6 C9 C9 1211 01 A5 8A 8A A0 A0 C5 C8 FF AI2I 3 1 9A A5 C5 C8 FF A0 31 9A

A9

9008: 9~~B:

F6 F6 03 121 3 A9 A9 90 9121 BD BO F7 F7

91211121: 91211B: 9020: 91212121: 9028: 912128 : 9030: 91213121: 903S: 912138 : 9040: 91214121 : 9048: 912148: 9050: 905121: 905B: 91215B : 9060: 91216121 : 901S:

906B: 9~6B :

91217121 : 912178: 90B0: 9I21BI2I: 9088: 912188 :

9070: 9078:

9090: 91219~ :

912198 : 9I21AI2I : 9008: 9121A8: 90B0: 91218121: 90BB: 912188: 90C0: 9I21CI2I: 90C8: 9121C8: 91210121: 90D0: 90DS: 912108 : 9I21EI2I : 90E0: 90ES: 9121E8 : 90F0: 9121Fe : geF8 : 90FB: 9100: 91121121 : 910B: 911218 : 91 10: 1121 : 91 9118 : 9118: 9 12121: 9120: 9128 : 912B: 913121: 9130: 91 38 : 913B: 914121 : 9140: 9 14 8 : 9148: 915121 : 9150: 9158: 915B: 916121 : 9160: 9 168: 9168: 917121: 9170: 9178: 917S: 918121: 9180: 9188: 9188: 919121: 9190: 9198 : 9198: 991A0: 1AI2I: 91A8 : 91A8: 918121 : 9IB0: 9188 : 91B8: 91CI2I: 91C0: 9 1C8 : 91CS: 910121 : 91D0: 991DB: 108 :

909B:

90A0:

12: 12:

HTAB HTAB

PRINT PR INT

"2) LOAD LOAD "2)

12: 12:

PRINT PR I NT ""3) 3) PRINT :: HTA HTA PRINT •4) PRINT 5CRE B B 12: 12 : PRINT PRINT "4) PRINT SCRE HTAB 12: 12: PRI PRIN EN": PRINT:: HTA8 N EN": PRINT T QUIT" T "5) " 5) QUIT" HTAB 1 12: At: 1)1 B0 8121 VTAB VTA8 22: 22: HTAB 2 : GET GET A1o: THEN 14121 140 IF I F AS AS "'=" " 1" 1 " THEN 2" THEN THEN 16121 160 ZA 2A 90 9121 IF IF A! AS ="" "2" THEN 170 170 Fi "31 fb 100 100 IF IF At AS = ""3" 3 " THEN THEN 200 7* "41 14 110 lIe IF At AS = "4" THEN 2121121 THEN END END > 9 9 TH "is IF SS < EN 200 EN 2121121 210 VTA8 VTAB 24 24:: PRINT" PRINT "(0=AUTD C DO 21121 (0=AU TO C ENTER)";: ;: VTAB 23: HTAB 11 ENTER)" : INPUT "ENTER "ENTER TAB TAB SE SETTIN TTIN ";T: < 121 0 OR T T > > 5 5 G: "; T: IF T < 0 THEN 21121 210 121 220 POKE -- 163£12 16302,0: 16 1A 22£1 ,121 : POKE -- 16 297,0: 16304,0: & 297 , 121 : POKE -- 163 1214,121: & TEXT HOME i GOTD GOTO 11,5,T: ,5,T : TE XT:: HOME: 40 @ 40 @ VIEW SCREEN": VI EW SCR EEN" :

9000: 90~12I : 9010:

HTAB HTAB

SCREEN" SCRE EN"

Program 2: DUMP Example 81 10 1121 ONERR DNERR GOTO 4121 40 52 2121 DI OS = "" CHRS 4) 52 20 CHRI ((4) D5 30 3 13 PR I NT D»"BRUN OS " BRUN DUMP " D3 PRINT DUMP" 55 55 40 40 TEXT TEXT :: HOME HOME 13 50 HTAB 9 9:: PRINT "*********** n 5121 •••••••••• ": HTAB **********": HTAB 9 9:: PRINT FRINT

".

""""UU'

"t

* ":: "'

HTAB 9: PRINT ". "* APPLE HIHI RES DUMP ''': RES DUMP *'■: HTA8 HTAB 9 9:: PRINT PRINT "~ a "*

"*": ':

HTA8 •••••••• • •• HTAB 9: 9: PRINT PRINT " "********»**

'U"'"'''' PRINT: *t»*tt*««* "

If 6121 IF 60 PRINT: PRINT :

INT :: HT PRINT : PR PRINT HT AS I NT "ENTER AB 12: 12: PR PRINT "ENTER CHOICE CHOICE .:": " . HTAB HTAB 12: 12: PRINT PRINT ,," - --- -- ----- ": INT :: HTAB ": PR PRINT HTAB 12: 12: PRI NT "1) PRINT "1> CATALOG": CATALOG": PRINT PRINT

COMPUTE!

The Resource. ATTENTION T.l. T.I. 99/4A OWNERS OWNERS CHRISTMAS SPECIALS SPECIALS Diskettes - 59¢ 59C each! each! Your Your choice choice SS SS or or •• Diskettes

DO DD •• 512K Now / 4A! Now Available lor for the the 99 99/4A!

•• 99/ 8 Level 99/8 Level 4 Computer Computer Upgrade Upgrade Now Now Available •• Over Over 1500 1500 Hardware Hardware and and Software Software Accessories Accessories at at Similar Similar Savings Savings

THE WORLD 'S LARGEST WORLD'S LARGEST COMPUTER COMPUTER ASSISTANCE ASSISTANCE GROUP GROUP Now g over Ide Wow servin serving over 35.000 35.000 members members worldW worldwide with with the the best best in in technical technical assistance. assistance, service. service, and t 99/ 4A and products products for tor the the Texas Texas Instrumen Instrument 99/4A Computer. Computer. To ffers. To become become a member member and and receIve receive newsle newsletters, calalo g. te chmcal assIstance catalog, technical assistance and and membership membership package. send S 10.00 for a ONE Year Me mber· package, send $10.00 tor a ONE Year Member ship ship to: to:

99 / 4A National 99/4A National Allistance Assistance Group Group National National Headquarters Headquarters P.O. Box 290812 P.O. Box 290812 Ft. Ft. Lauderdale, Lauderdale. Florida Florida 33329 33329 Anention Attention Membership Membership Division Division For Further Information Cal l For Further Information Call 24 24 Hours Hours (305) 0467 (305) 583· 583-0467 December December 1985 1985 COMPUTEI COMPUTEl

121 121

Disassembler For Atari William Cosner Casner

This versatile utility disassembles allY nguage program in ill any machine la language memory or all on disk. disk. It call can also display aa memory dump and alld check disks for bad sectors. The program works all on allY 800, XL, or XE with at least any 400/ 400/800, 16K RAM for tape or 24K for disk.

The size of the disk file you can disassemble depends on the memomemo ry capacity of your computer: With 48K or 64K, you can disassemble files as large as 21K (more than 21,000 bytes). When disassembling memory, you must provide hexahexa decimal starting and ending adad dresses of the area you \·wish vis h to

Here is a BASIC utility for disasdisas sembling machine language (ML) programs and examining the concon tents of yo ur Atari 's memory. Type your Atari's in ""Disassembler" Disassembler" and save it to disk or tape before running it for the first time. Since this program is largely self-prompting, you should be able to use it with little or no instruction. To choose one of its three main options, press the OPOP TION, SELECT, or START keys as prompted. In each case, you may choose to send output to a printer rather than to the screen.

Using The Disassembler The first option, disassembly, transtrans lates ML object code into its 6502 mnemonics. After you choose this option, the computer asks whether you wish to disassemble a particu particular memory area, a particular sector

on the disk, or a binary file stored on disk. This allows you the freefree dom to disassemble virtuall y any virtually program, even autoboot pro proML program, grams that normally take control of the computer as soon as you load them into memory. memory. 122

COMPUTEI

December 1985 1985

disassemble. The second option is a listing, or memory dump. Again, you can look at a particular memory area, a particular disk sector, or a binary fil e. In this case, however, the disfile. dis assembler displays each byte in ASCII form rather than as a 6502 mnemonic. This function is useful ining parts of a program for exam examining that contain data rather than ML

1310. Don't omit any commas or spaces, but don't add any extra ones, either. Mistakes could lead to incorrectly decoded mnemonics. If the program stops with an ERROR 3, 6, or 8 message in line 1220, it ve a typing probably means you ha have mewhere in th e DATA error so somewhere the lines. lines.

Afari Disassembler For Atari For instructions instructions on entering fhis this listing listing,, please refer to "COMPUTE!'s "COMPUTEI's Guide to Typing In Programs" published bimonthly in COMPUTEI. compute1. DII 'J. 10 \0

DIM R$(1032),SC$(128), R*(10 32),SC*C12B>, ML$ (36). ML2$ (34), G$ (31 MLS(36>,ML21(34),G$(31 )> ,,A* A$ (2€l) T$ ( 15) ,,F* F$ (4) (20 > ,,T«(15) ~.

E~2€l £5 20

DIM P(4):P(I)=4€l96:P(2 PC4);P(1)=4096:PEQ00 (Tfjfy

00" III [A 25121 250 JH 26121 260

l'HO IO 2713 270

7 " {C LEAR }"u17 : ? : 7 " ? CCLEAR} ? 1 3 SPACES}"; TS {{ 13 SPACES}";T* POSITION 2,8 : ? "Pres s 2,8:7 "Press riI';l"ili'7iJ~ e m0 r y " : ? " l'_1;A_* IfIL M Memory":? {6 {6 SPACES SPACES}}~3Br1 tl^i^JiJii Sect Sect or": or " : ? ? "" (6 MAX S THEN ? US 41 410 ES-SS>MAXS "Only room for "";MAXS ;MAX S -for ; " sectors " : ? ""{6 { 6 UP} sectors": UPJ "":GOTO : GOTO 37121 370 CO : 7 ::? 7 "Pr e SECTOfi=SS-l:? "Pre CG 420 SECTOR=SS-I 33E3Z tto begin";:: ss ~..: o begin";

?

DE700 700

DC 71e 710

F ~7 20 FH 720

6N7 40 GN 740

Gt(27.28)=",X":GOTO G$ (27 , 2 8 )= ", X":GOTO

1060 #2,8:55 *t2, B: SS =

GE T #2,A:GET # 2 , A:GET GET B* 2 56+A B*256+A GET tt2,A:GET tt 2,A : GET #2,B:5E= *l 2 ,8 : 5E= B* 2 56+A B*256+A NOBVTE S=SE-SS+ l : IF NO NOBYTES=SE-SS+1:IF BYTES > SPACE THEN ? BYTES>SPACE ? :s 7 "Not E nough RAM "":GO : GO Enough TO t113 06v., 60 A=USR CADR ( ML 2 $),NO B YT A=USR(ADR(ML2t),NOBYT ES,ADR(St)):IF ES,AD RC S S » : l F PEEK(2 03)=255 THEN ? i? : 7 "ER ROR tt";PEEK(203);GOTO #";PEE K (2121 3 ) : GOTO 1060 C LOSE #2 : S=ADR ( S$) : SA CLOSE «2:5=ADR(St):SA =S : SE=S+NOBYTES =S:SE=S+NOBYTES IF DIS= THEN 860 I F DIS = 0 0 1 F 5 } SE THEN 1 061i) IF S>SE 1060 ? : I F PTR= N .., 7 G$ Gt:IF PTR=11 THE THEN 7 # 3 ; G$ #3; G* IIF F PEEK PEE~: (5 327 9) =»6 =6 THEN (53279) 1060 G$=" (3 1 SPACES } " Gt="f31 SPACES}" A= S-SA+SS : 60SU8 160 : G A=S-SA+SS:GOSUB 160:G $(1,4)=FS t ( 1 , 4)=Ft Z=PEEK(S):A=Z:60SUB Z = PEE K(S ) :A =Z :GO SUB I 60 FS (3 ,4 ) 60:: GS(6 Gt(6,, 7l= 7)=Ft (3,4) IF RS(Z*4+1,Z*4+1 =" IF Rt(Z*4+l, Z *4+1 ))=" " THEN G$(1 7 , 1 9)="7 7? B*(17,19)="??? 630 "":S=S+1:GOTO : S=S+ I : GOTO 63121 G$( 1 7 . 19 )= R$(Z*4+1 . Z* Gt(I7.19)=Rt(Z*4+l,Z* 44+3):Ut=Rt(Z*4+4):IF + 3 ) : U1i = R$ ( Z 4 + 4) : iF U" =" " OR U$ = "A " THEN Ut=" U*="A" G$( 2 4, 2 4) = US : S=S+1 : G G*(24,24)=Ut:S=S+l:G OTO 630 G$(24,24)="$":A=0 : FOR Gt(24.24)="t":A=0:FOR J=l T O I I : I F US=TY$ TO 11:IF Ut=TY$(( J,J T HEN A=J:J=l1 A=J : J=1 1 J,J)) THEN NEXT JJ:ON : ON A GOTO 730 730,. 74 0 ,7 5121,760,770,780 , 7 740,750,760,770,780,7 90,800,81I21,8 2 0.8 3 121:ST 90,800,810,820.B30:ST

*

8S 2 3,23) =" (" :6$ (27,2 Gt ((23, 23)=" (":Ot(27,2 9)::::", :G OTO 780 9)=" , X) "":GOTO (P760 ) ="( ": GS(27,2 Gt(23.23)="(":Gt(27,2 760 GS(23,23 CP 9)=") JY " ~GOTO 780 9)="),Y":GOTO PE77121 (23,23 )= " #" Gt " : A:S-SA+SS+Z+~ 22)=">":A=S-SA+SS+Z+2 PD n 84121 B40 NE85121 NE 850

"5 0 HB 86 860 til 7121 EN 8 870 BI880 880 BI FI 890 r:1

H 900 KBij 91210

:GOTO 850 G"(22,22)=" ( ":A=S -S A+ Gt 4 THEN ? "" F LEN LEN(A*) < >4 } " : GOTO 290 {{3 3 UP UP}":GOTO G OS U B 120:Y =S GOSUB 120:Y=S ?' : 7 "E nd ing address( "Ending address! 4 d igit h ex)" · digit hex)"; INPUT At;GOSUB A$:GOSU& 1090:1 1 09121 : 1 S) (< > 4 THEN? F LEN CA (At) >4 THEN ? '. " (3 ": GOTO 3 2121 . {3 UP} UP}":GOTO 320 GOSUB 120 : SE=S : S=Y : I F 120:SE=S:S=Y:IF D I S""0 T H E N 860 DIS=0 THEN GOTO 630 ADD=0 : MAXS = INT (SPACEI ADD=0:MAXS=INT(SPACE/ 128) : S=ADR(SS) :GO SUB 128):S=ADR(St):GOSUB 1120 1 120 7 ::i7 "Starting "Starting sector sector (1-719) " j : INPUT INPUT At: A$ : II (1-719)")i F LEN(AS)=0 THEN F LEN(A«)=0 THEN SS=1 SS=l ::GOTD GO T O 39121 390 GOSUS 1121 ge : SS=VAL( AS ) GOSUB 1090:SS=VAL(At> :IF > 719 T H : IF 55< SS< 1 1 OR 55 SS>719 TH EN {3 UP}":GOTO EN 7 ? ""{3 UP}":GOTO 37 37

INPUT SS St 5ECTOR=SECTOR+l : A=USR SECTOR=SECTOR+1:A-USR ((ADR(ML*),SECTOR,ADR( ADR CMLS ) ,SECTO R ,ADR( SC$ ) l : I F PEEK (21213) = 1 SCS)):IF PEEK(203)=1 T HEN 460 THEN ? "Se cto r ";SECTOR;" "Sector " ;SECTOR; " bad: ";PEEK(203) : IF 5 ";PEEK(203):IF S ECTOR=ES THEN 1 12160 £CTOR=ES 1060 GOTO 4 30 430 S$C L E N( S$)+ I )=SCS:IF St(LEN(St)+l)=SCt:IF SECTOR=ES T HEN SE = S+L THEN SE=S+L EN(SS):GOTO EN(St):GOTO 48121 480 GOTO 430 IF DIS=0 D I 5=121 THEN 86121 860 GOTO 630 ADD = I : S '$( l )=" "":St(SP : S$(SP ADD=1:St(1)=" ACE)=" : S$(2 ) =S $ ACE) = " I1 "":St (2)=St SS=I2I : SE=0 : 7 ::? ? "Ent er SS=0:SE=0:? "Enter 0#: filename . ext" ; : I N D#: -f ilename.ext";:IN PU T At:IF A'$: I F LENCAS)=0 T PUT LEN(At)=0 HEN ? "{3 }" : GOTO 5 7 -'{3 UP UP}":GOTD 10 GOSUB 11219121: IF At(2,2) AS (2 , 2) 1090:IF < > " : " AND A N D At A$ (3,3) > ":: ":■■ (3, 3) < " II THEN ? "B1I.; !•• iilJil! .3 ~i. " 7 " »~.r:T.'2Kj^"g»~^7'7' ~,::W i! . ! · r:fa_lI!§" i: 7 7 "{4 iMH^ariiiieritii" "(4 UP} UP] "":GOTD : GO T O 5 10 I S10 CLOSE # 2>:TRAP : TRAP 550:0PE close »: 550:OPE N #2,4,( #2,4,0,AS : GET #2,A: # 2,A: J.At:GET IF A=25J A=255I THEN GET # 2, «2. A : IIF F A =2 55 THEN 570 A: = : Z55 CLOSE # : T RAP 4 12100121: ? tt 2liTRAP 40000:7 :I ? 7 "Not aa l^'i"l:Ti'BL"jTi' [ TCID :~ l~flle":GOTO [5 -f i 1 e" : GOTO I1060 060 CLOSE # 2 : TRAP 40000:I 4121013121: I tt2:TRAP F PEEK(195)=170 T H EN THEN

II

llli13!f£i~LW£m .... ~.\ i-T-i-Bft-ii^f \m

1060

IF 5 3279 )= 6 THE IF PEEK( PEEK(33279)=6 THE N ~ 12'0 200 GO T O 1010 1 121 1 0 GOTO ? i7 : ? "Press any key ontinue" : ? ""."; ) "; to c continue":? I F PEEK(76 4) =255 THE THE IF PEEK(764)=255 N 1 12170 1070 POKE 764,255:G0T0 764,255 : GOTO 2121 20

o0

December 1985

COMPUTEI COMPUTE!

123

l\ 112190 109 0 £N

IF

LEN ( AS)=0 LEN(AS) = 121

TTHEN HEN

11 11

10 10

!K 1. 1100 1100 ..*D0 1110 ~ij~ 1120 1 120 ~SH1130 ~ 1130

OJ 1 1 40 DJ1140 ~KC1150 C 115121

.■» 1160 1 160 Jr. PS 1170

IF A~'(1,1)= " Q" TTHEN HEN A$£1.1>="G" POP POP ::GOTD 60TO 2200 00 RETURN RETURN PTR = 0 : ? "? .."Da you wish PTR=0: Do yo u wI sh to print (IY/.:i"; V I . : ) "j PE£KC764)=43 IF PEEK ( 764) = 4 3 TTHEN HEN PTR=1:GOTO 1150 PTR= 1 : GO TO 115121 PEEK =255 THE IF P E EK ((764) 764)=255 1 130 N 113l!.1 764,255:IF PTR = POKE 764,255 : IF PTR= CLOSE ~ #3:TRAP 11 THEN CLOSE 3 : TRAP 1170:OPEN 11 7 0 : QPEN -M#3,8,0,"P 3 ,8,t21," P 40000 : " : TRAP 400121121 ? RETURN :: ?7 :: RETURN CLOSE 40000: C L OSE #3:TRAP 4121000:

: ? "!!K!Iil'U !'f«:;a 4· ..... fi tJIIiijii ::tiIIItlJ &:L:LJM" : GOT a 1 0 60 ?

AI 1180 AI1180

?

"(CLEAR } ~I!

?£1'3;ITl-WEWITTEXa:::rIrr.:wra· :7

~": ?

FF -F 1190

06121210 06 1200

lUI UK 1210

PI PI 122121 1220 OG 123121 1230 06

KH ~K 1240

AP 1250

I ~ 1260 1 260 Id

■15E 1270 H 1270

SJ 280 ~ J 11280

??

n{7 B £7 SPACES}PLEASE SPACES} PLEASE WAIT...." WA IT . . • . " R* ( l)=" 1 ) =" ( I032> = " RS "":R* : R$(10 3 2)=" 1":RS(2 ) =R'$ I ":R* C2)=R4 SC*(1)" *(1)= SC* CALL CHAR(73, CHARt73, "F9F9F9F1F " F9F9F9FIF CALL 1F1F3F3") IFIF3F3") 370,2,311, CALL BOUND 1850 CALL HCHAR(3,25,157) HCHAR(~,25,1~7) SOUND(2*T,392,0,2 1860 CALL SQUND(2IT,392,0,2 94,6,196,8) 94,6 ,196,B) 1870 CALL CHARC138,"0303030 CHAR(138,"0303030 10101") CHAR(139,"80B060B 18S0 1BS0 CALL CHAR(139,"808e80S S8080C0C" 0B080C0C")) 18ge 1890 CALL CHAR(140,"0606030 C0CIC1C3C") C0C1C1C3C") 1900 CAL~ CALL HCHAR(22,14,130) 1910 CALL HCHAR(22,16,131) 1920 CALL CHARC141,"0103070 CHARU41,"0103070 F0F0E0E0C" F0F0E0E0C")) 1930 CALL CHAR(142,"C0C08") CHARU42, -C0C0B") 1940 CALL SQUNO(T,294,1,247 30UND(T,294,1,247 ,6,196,9) ,6,196,8) 1950 , "303S3C3 CHAR(143,"303B3C3 1930 CALL CHARC143 CI2IE" C0E" ,1 1960 CALL CHAR(144,"0603"30 CHAR(144,"0603030 F0Fe70707" F0F070707")) 1970 CALL SDUNDC2IT,392,l,2 saUND(2*T,392,1,2 47,7 ,165,9) 47,7, 16~,9' 19S0 CHAR(145,"0000000 1980 CALL CHAR(14~,"e000000 "0f!fS0C0E ") 000B0C0E-) 1990 CALL CHAR(146,"000080C I2IE0E") 0E0E 1) 2000 CALL CHAR(147,"E0F0703 CHAR£147,"E0F0703 CflLL 2000 8" 6"))

2010 CALL HCHAR(22,17,132) 2020 CALL HCHAR(22 , 18,133) HCHAR(22,IS,133) 2030 CALL CHAR(148, " C0CI2fC0C CHARC148,"C0C0C0C 0F0783CIC"} 0F0783C1C") 2040 CALL CHAR(149 CHARU49,, "3CIC0ES "3C1C0E0 707" ) 20~0 CALL SOUND(T,330,1,262 3OUND(T.330.1.262 2050 ,6,131,8) ,6,131.B) 2060 CALL CHAR(150,"ICIClS0 CHAR(130,"1C1C180

216f!f 2160 2170 2180 2190 2200 2210 2220 2230 2240 22~0 2250

2260 2270 2280 2260 229" 2290

CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL

HCHAR(23,16,140) HCHAR(23,16,14.) HCHAR(23,17,141) HCHAR(23,18,142) HCHAR(23,IB,142) HCHAR(24,6,143} HCHAR(24,6,143) HCHAR(24,7,144) HCHAR124,7,144)

HCHAR(24,S,14~) HCHAR"~ diskettes. diskettes. Beige or Grey on ly. only.

~b

S1.65 ea. + .20 Shpng. S1.65ea. .20Shpng.

DISKETTE 70 70 STORAGE STORAGE ~ DISKETTE 1

Dust-free ADust-Iree storage for (or 70 5 5V«" diskettes. diskettes. Si Sixx dividers included. included. An excellent value value..

....

S9.95 ea. +S3.00 - S3.00 Shpng. Shpny.

HOURS: Human: 8AM-6PM Central Time Time,, Monday through Friday Answering Machine: 6PM-8AM 6PM-8AM,, All Times MCI MAil: MAIL: 24 hour hourss a a day.

ORDERS ONLY: 1"800-621"6827 1-800-621-6827 (In illinois: Illinois: 1-312-256-7140) tNQUIRIES: INQUIRIES: 1·312-256-7140 1-312-256-7140 FOR FASTEST SERVICE. SERVICE, USE NO·COST NO-COST MC MCII MAIL: OUf EE MCI MAil Our address IS is OISKORDER. DISKORDER It's a a FR FREE MAIL leueL letter No No charge to you . (Sltuallon (Situation permitting. permitting, we'll ship these orders 10 in 24 hours or less.) SHIPP ING: 5\4· SHIPPING: Stt" & & J'h" 3'i" OISKETTES-Add DISKETTES—Add $3 S3 00 per each HXl or lewer dlskel1es IO0 diskettes OTHER lTEMS: ITEMS: Add shipping charges as shown m in additIOn addition to lo other shipping Charges charges PAYMENT: PAYMENT: VISA, VISA, MASTERCARD and Prepaid Olders orders accepted COD OROR DERS: Add additional 55.00 APO, S5.00 special handhng handling charge. charge. APO, FPO, AK. H[ FPO. AK. HI & & PR ORDERS: ORDERS: Include shipping charges as shown shown and ad,litlona! additional 5% 5'~-. of total order order amount to cover PAL and Insurance. insurance We ship only to United Slates addresses. addresses, except lor those listed above. above TAXES: TAXES: IllinOIS Illinois reSidents. residents, add 7% 7% sales tax MINIMUM O RDER: $35 ORDER: S35 00

'• , INC DISK WORLD WORLD!, INC.•

Well. Well, that's the the story. story Super Super Star diskettes diskettes don't roll oflthe off the boat from PagoPago or or emerge from a a basement plant lust |ust east of Nowhere. Super Star diskettes have been around lor tor years years,. and you've used them for years ye~r~ as copypr~tec te d sottware softw~re copy-protected originals. unprotected onglnals. Sometimes. originals, originals. Sometimes, depending on which computer you own, own. the system master may have been on on a a Super Star diskene. diskette. And maybe more than once. once, you've bought a a box or tViO two or more more of ol Super Star Star diskettes just had some "big" company's without knowing it. They jus! name on them them. Super Star Diskettes are good So good that a a lot 01 of major maior software publishers, computer manufacturers and other diskette diskette marketers buy them in the tens or hundreds 01 of thousands. thousands. We We buy them in the millions. millions. And than we sell them to to you you.. Cheap.

When every little bit counts counts,, it's Super Star Diskettes. You've used them a You've a hundred tlmes times,... under different names, names. Now. Now, you you can can buy the the real McCoy. McCoy, the same diskelle diskette that major software publishers. publishers, computer manufacturers and dlskelle ... and call their own diskette marketers buy buy...and own We We Simply simply charge charge less.

Super Special! O rder 50 Super Star Diskettes Order and we'lI we'll be happy to sell you an lor only Amaray Media-Mate 50 for only S8.75. ... a lot S8.75. shipping Included included...a less than the suggested retail pnce price of ol S15.95. Regular DISK WORLD! WORLD! price price:: S9.69 59.69 ea ea.. + - S2.DD S2.00 Shpng. Shpng. ^J

The Super Star LIFETIME WARRANTY! Super Star Diskettes are unconditionally warranted against delects ship defects in in original material and workman workmanship so long as owned owned by the original purchaser. Returns are simpte: simple: just send the defective diskettes with proof of purchase, paid by you with aa short exptapurchase, postage· postage-paid expla nation of the problem. problem, and we'll send send you the replace· replace ments. ments. (Incidentally. (Incidentally, coffee coffee stained diskettes diskettes and diskettes W ith staples driven throug with throughh them don't Qualify ".) qualify as -defective "defective")

WE Will WILL MEET OR BEAT ANY NATIONAllY NATIONALLY ADVERTISED PRICE ON THE SAME PRODUCTS AND QUANTITIE S QUANTITIES SU8JECT SUBJECT TO THE SAME TERMS AND CONDITIONS CONDITIONS..

629 Green Bay Bay Road Road 629'Green Wilmette, Illinois 60091

1

ATARI DISK DRIVE OWNERS .... .. HAPPY BLASTS RETAIL PRICE-ORDER PRICE—ORDER TOLL FREE! ..'

:

'.

..

95 .:

THE FAMOUS HAPPY ENHANCEMENT NOW ONLY $149.95

for 1050 order number HClC, HC1C, for 810 order number HC8C Makes your disk drive read and w rite faster, and allows you to execute the HAPPY WARP SPEED SOFTWARE write SOFTWARE.. Ava 1050 and 810 disk drives. Avaiilable lable only for ATARI ATAR11050 drives. 1050 version allows true double density plus the original single uired . and and enhanced enhanced density. density. PRICE PRICE INCLUDES INCLUDES WARP WARP SPEED SPEED SOFTWARE SOFTWARE BELOW, BELOW, installation installation req required.

HAPPY WARP SPEED SOFTWARE REV 7 (not sold separately) Includes the famo us HAPPY BACKUP and COMPACTO R wh ich are the most powerful disk backup utilities famous COMPACTOR which ava ilable for you ATARI computer, plus MULTI DRIVE which w hich allows high speed simultaneous reading and writing available yourr ATARI w ith up to 4 HAPPY ENHANCED drives, plus SECTOR COPIER w hich is rts the with which is the fastest disk copier that suppo supports ED DOS which improves ATARI ATARI DOS 2.0s to allow fastest speed, plus 130XE RAMDISK, plus plus the WARP SPE SPEED plus PPY'S DIAGNOSTIC which allows comprehensive disk drive testing. HA HAPPY'S

HAPPY 1050 CONTROLLER $64.95 order number HC2C Fo ENHANCED 1050 disk disk drives drives only. A llows easy access to to HAPPY HAPPY 1050 slow and and fast speeds Forr use with HAPPY ENHANCED only. Allows ting to disk back side and protecting va luable data data and ultimate contro controll of disk drive write protect, including wri writing valuable has switches and write w rite protect indicator LED, installation required. required. disks. Printed Printed circuit board has

GET YOUR FAVORITE HIGH SPEED DOUBLE DENSITY DOS operating Both of of these disk operati ng systems support support the fastest speed with with both HAPPY 810* 810' and and 1050, and with with HAPPY XL is is HAPPY's own version of OSS DOS XL, and includes 1050 you get true double density. WARP SPEED DOS XL ca rtridge, under ROM and AXLON RAM disk version, and is order number HC4C at $29.95. TOP DOS under cartridge, from ECLIPSE ECLIPSE SOFTWARE has more menu menu driven driven features, operates operates in in all three densities, densities, supports the version 1.5 from version SOFTWARE has "Note: 810 810 requires upgrade below. below. 130XE RAMDISK, is order number HC6C at $39.95. *Note: 130XE RAMDISK, and is requires upgrade

810 VERSION 7 UPGRADE $49.95 order number HU3C-XXXX Allows older o lder 810 810 HAPPIES to use newer software. Includes Incl udes custom plug plug in IC and rev 77 WARP SPEED SOFTWARE. Allows When ordering orderin g replace repl ace XXXX in part number with the the serial seria l Same price for all HAPPY 8105 810s registered or not. When H APPY COMPUTERS COMPUTERS manufactured 810 board, board, or with wi th aa 2732 or 2532 which w hich corresponds corresponds to the number of your HAPPY EPROM part number number in your HAPPY HAPPY 810 socket socket A102 A 102 of your side side board modified HAPPY (not (not made made by HAPPY insta llation required. required. Upgrade Upgrade not needed for new 810 HAPPYS and serial seri al number over 8000. 8000 . COMPUTERS), installation

SUPER PACKAGE SPECIALS and WARP SPEED SPEED DOS XL XL for just just $199.95 order Get aa HAPPY 1050 ENHANCEMENT and CONTROLLER and number HS5C, or get the same with TOP TOP DOS DOS 1.5 1.5 instead of DOS DOS XL XL for just just $214.95 $2 14.95 order number number HS7C. If you you number can get the HAPPY HAPPY 1050 1050 CONTROLLER CONTROLLER and WARP SPEED SPEED DOS DOS XL XL al ready have the 1050 1050 ENHANCEMENT you you can already 1050 CONTROLLER and TOP DOS DOS 1.5 1.5 for just $84.95 order $74.95 order order number number HXL9C, H XL9C, or get the HAPPY 1050 for $74.95 HTD9C. For For other specials specials and dealer dealer pricing call ca ll (408) 779-3830. 779-3830. number HTD9C. All prices prices include include UPS UPS shipping shipping in in USA, USA, add $10.00 510.00 for shipment shipmentoutside USA. USA. California residents residents add add sales sales tax. tax. Noexlra No extra charge char&'e for credit cards cards or COD, COO, VISA VISA or or All

accepted. Our Our toll toll free free number number isis an an order order taking taking service, service. not not our our line. line. To To ORDER ORDER ONLY ON LYcall call (800) (600) 538-B157 538-8157 outside outside California, California. or 01'(600) 672-3470 MASTERCARD accepted. (800) 672-3470 inside California, California. ask ask for for extension extension 817 817 and and have have your your credit credit card, card. part part number number and and quantities quantities ready. ready. Toll Toll free free hours hours 66 am am to to 12 12 pm pm Mon.-Fri., Mon.- Fri. , 86 am am to to 88 pm pm Sat. Sal. && inside Sun., Sun .. Pacific Pacific Time. lime. For For answers answers to to questions questions call call HAPPY HAPPY COMPUTERS COMPUTERS at at our our number number below. below. Office Office hours hours 9-5 9--5 Mon.-Fri. Mon.-Fri. Pacific Pacific Time. lime.

HAPPY COMPUTERS, COMPUTERS, INC. INC. HAPPY

*•

P.O. Box Box 1268 1268 P.O.

*•

Morgan Hill, Hi ll , CA CA 95037 95037 Morgan

*•

(408) 779-3830 779-3830 (408)

presenting .... presenting

.

CAPTU RET. CAPTURE

A NEW NEW WAY WAY TO TO UNLOCK UNLOCK THE THE POWER POWER OF OF YOUR YOUR C64 C64 OR OR C128* C128* A CAPTURE IS IS A A CARTRIDGE CARTR IDGE THAT THAT PLUGS PLUGS INTO INTO YOUR YOUR COMPUTER'S COMPUTER'S EXPANSION EXPANSION PORT. PORT. •• CAPTURE UNTIL THEN, THEN , A A CAPTURE DOES DOES NOTHING NOTHING — - UNTIL UNTIL YOU YOU PRESS PRESS ITS ITS CAPTURE CAPTURE BUTTON. BUTTON. UNTIL •• CAPTURE RUNNING PROGRAM PROGRAM CANNOT CANNOT DETECT DETECT ITS ITS PRESENCE. PRESENCE. RUNNING •• CAPTURE CAPTURE THEN THEN TAKES TAKES CONTROL CONTROL — - NO NO IFS, IFS, ANDS ANDS OR OR BUTS BUTS — - AND AND PRESENTS PRESENTS A A MENU. MENU.

•• CAPTURE CAPTURE WILL WILL NEATLY NEATLY SAVE SAVE EVERYTHING EVERYTHING IN IN YOUR YOUR COMPUTER COMPUTER TO TO YOUR YOUR 1541 1541 OR OR COMPATIBLE DISK DISK DRIVE DRIVE — - ALL ALL 64K 64K OF OF RAM, RAM, CPU, CPU, VIC VIC AND AND SID SID CHIP CHIP COMPATIBLE REGISTERS — - EVERYTHING. EVERYTHING. IN IN EASY EASY TO TO VIEW VIEW CHUNKS. CHUNKS . REGISTERS

CAPTURE WILL, WILL, IF IF YOU YOU WANT, WANT, PRE-CONFIGURE PRE- CONFIGURE YOUR YOUR COMPUTER'S COMPUTER'S RAM RAM SO SO THAT THAT •• CAPTURE ONLY MEMORY MEMORY ALTERED ALTERED BY BY YOUR YOUR PROGRAM PROGRAM NEED NEED BE BE SAVED. SAVED. ONLY CAPTURE WILL WILL WRITE A BOOT BOOT ON ON YOUR DISK DISK SO SO YOU YOU CAN CAN RELOAD RELOAD AND AND BEGIN BEGIN •• CAPTURE EXECUTION RIGHT RIGHT WHERE WHERE YOU YOU LEFT LEFT OFF. OFF. EXECUTION CAPTURE DOES DOES ALL THIS THIS AT A A COST COST OF OF JUST JUST • CAPTURE

$39.95

BUT HERE'S THE BEST PART •• CAPTURE CAPTURE WILL WILL MAKE MAKE AN AN AUTO-START AUTO-START CARTRIDGE CARTRIDGE OF OF YOUR YOUR PROGRAM. PROGRAM. ITS IT'S EASY! EASY! JUST FOLLOW FOLLOW THE DIRECTIONS DIRECTIONS ON ON THE SCREEN. NOW PLUG IN IN YOUR JUST COMPUTER . IN CARTRIDGE AND TURN ON YOUR COMPUTER. IN LESS THAN TWO SECONDS YOUR PROGRAM BEGINS AGAIN AT PRECISELY PRECISELY THE POINT POINT WHERE YOU CAPTURE'D IT. IT. MAGIC! MAGIC!

BESIDES CAPTURE, CAPTURE, YOU YOU NEED A promenade C1 C1 AND AND A A SUPPLY OF CPR3 CPR3 BESIDES NEED A SUPPLY OF CARTRIDGE KITS.

ORDERING INFORMATION • CAPTURE CARTRIDGE -— COMPLETE WITH INSTRUCTIONS ...... . .......... ... $ 39.95

• promenade

C1 DISK software SOFTWARE ........... .. 99.50 ci -— EPROM eprom PROGRAMMER programmer WITH with disk 99.50

•• CPR3 CARTRIDGE KIT -— PC BOARD, CASE AND 3 EPROMS ................ .. .. . .. 29.95 •• DR-EPROM DR—EPROM ERASER, TWO AT A TIME, TIME, 3 TO 10 MINUTES .. ..... .. . ... .. .. .. .. .. .. 34.95 •• STARTER CAPTURE, promenade C1 AND 1 STARTER SET SET -—CAPTURE, C1 AND 1 CPR3 CPR3 .... ... . . . . ....... .. . . 149.95 149.95 •• DELUXE CAPTURE, promenade C1, 2 CPR's .. .............. . . 199.95 deluxe SET set -—capture,promenade ci, DR dr AND and2Cpr's 199.95 SHIPPING AND HANDLING -— USA: UPS SURFACE $3.00 BLUE LABEL $5.00 NEXT DAY AIR $13.00 OTHER FOREIGN AIR $12.00 CANADA: AIR MAIL $7.00 CALIFORN IA RESIDENTS ADD APPLICABLE SALES TAX CALIFORNIA COD ORDERS, USA ONLY, ADD $3.00 C64 AND C128 TM COMMODORE ELECTRONICS, LTD. TO -7731 TO ORDER: ORDER: TOLL TOLL FREE FREE 800-421 800-421-7731 FROM 800-421 -7748 FROM CALIFORNIA CALIFORNIA 800-421-7748

''WHEN WHEN OPERATING IN 64 MODE

TECHNICAL SUPPORT AND 408-287-0259 FROM OUTSIDE OUTSIDE THE THE US: US: 408-287-0264 408-287-0264 FROM

JASON-RANHEIM

580 PARROT PARROT STREET SAN JOSE, CA USA USA 95112

~ I -r- I ~

I

@rn~~~ (~IK;; .J
oes.tIe Comes the u'''OCI~ ciorjilue to' id * 3ge! .. will lit on on _ one d duk M[ NU ~ ROGAAM AUIomo1lellv " I1'~I"'9 MENU PROGRAM Auiomaticilh/ ,,"11 rum _and dllplavs displays 'a ...... menu prompting u_ utei I"" lor a ONE ONE ~keystroke """'lIoh ~tron on the ..... ,,,„..„ sdedion 01 ot .ny any UntoCfOoo canrHlgBon Ihe cldisk. •■ CARTRIOGE inn l nlUob "T ,ir: ~ ," Ihe l ng Itlel "Tricds" tne c_tet compurer ;".0 into .tIon thinking th«t 1M the Of'll"'" O'igirial "COllV 'Cdpy 11'0lec'ed·· uiutotlnl" Untod\ll! cartnitge n.s has been been

BARE BOARDS BOARDS BARE With part parts Wilh s lilists sts 950 IlTEllfACf WTEBFACE 8OAIIO BOARD . ISO

Build your your own own interlace" interface"! SUIIa 810 AnaIoQ Analog Boara Board 810 8'0 Rear Rear Boara Board 810

-.

S16.50 . . $15.50

rnsened.

™mZoTsotl

lor 800/ 400 I)( 800XL

n, □, ,.,,,

£ "! ? * BaSIC Ba_ InSKIe 'nSlOe Atiln Ala" BaSlc

Oe Re A.al!

SOFTWARE SOFTWARE Basic Canlll:lOe Cartridge Sa!.!c

Editoi'Assembler Eallor/Assembler Cartridge oQ'Bert OSen Carlr. Popeye Carlr. Cartridge Popeye Can JlKinOefcomD i rnOercomo Can Buck Rogers can Can B uc k Rogel'S



..

119.95

. 519 9S ... 6.

Sll 5° 56 *6 SO 5D

51 2 SO

To receive additional information from advertisers in this issue, use the handy reader service cards in the back of the magazine.

$15 DO 00 SIS SI 5 00 00 SIS SiZ 50 $1250 $12 SO 50 512

S1000 51 000 $5 00 5500 S5 00 5500

415-352-3787 415·352·3787

Mail Ordar and and Repair Repair . .... .•.. 15338l 15338 Inverness St., San leandro. Leandro, CA CA 94579 94579 Mi ll Order nwemelS 51 .• San Retail Slor Store 1988 Wash Washington Avenue. San San Leandro Leandro.. C CA 94577 e. 1988 ington Avenue. A 94571 Relail Terms W We accept money money orders. orders, personill personal Checks checks or or COO C O D s5 -- V VISA. MasterCard okay on on Terms e accept ISA. M aslertara okay orders ov" over S20 $20 00 00 Ho No personal personal cnecks Checks on on COO C 0.D ordels Snipping S4 00 shipping and handling on orders under $t 50 00 Add $2 00 'o< C 0 D orders ShIPPIng S' 00 ShIPPll'lg iIId halldkng on Of Clef S I.nCIer 5150 00 Mil 52 00 lor COD OIoerS California reSlden1 residents include 6 6"i*i sates 1h m> oyerseas Overseas Sl'll1IQIt'Ig snipping una extra Cii/llornlil S rnclucle '/ ,0. s.ales Prices sullied subieci 10 to ch~ change wnholtl without nollce nonce W We reserve 1M ine rront right 10 to limit quantities Sales IrmlleIium.g fluplicalmg .tId and "'I'II'W'I!I running .. all 01 of lhe the ","oleeled crotected urtrOCl cartridges that _we ~kno» nowol RO NTRUNNERcanno, .... ~ eles $99.95 S99.95

gllT\f$ games 10 lo tie oe rvlWtrd evaluated

wl\'lrIuss w/Wm-Loss Powet Power ~t)fIQ' Rat.ngs 5149.95 S149.95

NBA. Basketball II.. Basketball™

tlSA lc:olleQe 51 29.95 NBA 599.95 199.95 .... wrtoii^s S129.95 .... 1_"eI f~ wipomr rawgs 5149.95 SI49.95

LOT. Lottery Analysis™ Analysis 1..

SmlStoul wtllie Statistical co:nlla'oson comparison IllOO'¥II program Ce5I."rd assigned 10 lo IIttect deteel subtle

num!ie#s*s^

1 Full error trapping and automatic error helps Full up/down scrolling through program listings Structured programming Relative files

Print using

-■-'■ /

Formatted inputs

i Print at...and much, mUCh more.

cardco, inc.

The Wizards from the Land of Oz Have done it Again!

,CARDCO, lnc/300 S. Topeka/Wichita. KS 67202

dfl fiy

HOW TO EVOLVE TO A HIGHER INTELLIGENCE. ~.



THE COMMODORE 128. The first step is buying the 128™ Personal ComCom Commodore 128'· puter. The smartest computer It's like getget available for the price. Irs ting three computers for less than one usually costs. You can run CP/M® business software; software, the CP/M" written the 128, new programs w ritten for 'the 3,00CT£omrnodore 64 64*® and over 3,000"(:ommodore programs. You start out with more software than most machines marker. give you after years on the market.

THE COMMODORE 128 128 LEARNS TO COMMUNICATE. COMMUNICATE. There's no no rea! real intelligence intelligence without the ability ability to communicate. So So you'll want our our 1670 1670 Modem/1200. Modem/ 1200. It puts puts you in in touch with a new new world of shopping, shopping, banking, banking, communications communications and and information information over line. And And itit over your your telephone telephone line. operates operates at at a lightning-fast lightning-fast 1200 1200 baud baud to to save save on on your your phone bill.

THE COMMODORE 128 WORKS FASTER. To run all that software and run it faster. faster you'll want the 1571 Disk Drive. Drive You can't find a faster drive at the price. It transfers nearly 1,000 words (5200 cpsl, cps), so you can a second 15200 load most programs instantly. lood

THE COMMODORE 128 GETS SMARTER. Nowtry improving your memory. Plug in our 1750 RAM Expansion Module and your 128 moves up to a powerful 512K. Thars That's enough to handle just about anything you you can dish oul, out, from complicated business forecasting to giant databases. data bases.

128 THE COMMODORE 128 WRITE. LEARNS TO WRITE. Looking good in in print could be be MPS 1000 1000 your next move with the MPS Printer. Ifs Irs a new new dot matrix matrix Printer. printer printer designed designed to make the most

128's speed and high-reso high-resoof the 128's lution graphics. graphics. The MPS MPS turns out lution

THE COMMODORE 128 IMPROVES YOUR VISION.

Brains aren't enough without good looks, so improve your /ision lision with looks, new 1902 1902 RGB Color Commodore's new Mor.:tor. The The high-resolution high-resolution screen screen Monitor. gives you a sharper sharper image image and alld gives than your standard TV, TV: better color than

about 1200 words a minute minute really appreciate appreciate the the about 1200 so you can really (l00 cps) of of draff-quality draft-quality printing, or 128's (100 128's great great graphics. graphics. gives you you near-letter-quality near-Ietter-quality at at gives about 240 words wards aa minute minute (20 120 cps). cps). about 240

s All these these evolutionary evolutionary steps steps ahead ahead won't set you back back when itit comes comeS to paying for them. Additions to your Commodore 128;.pre ;, to paying them. Additions your Commodore I2&are available at at aa store store near near you you and and are are as as affordable affordable 'as as the the T28 28 itself' itself, available We think think that's thars aa smart smart way way to to help help you you build build aa computer computer system. system. We

.

18CP/MIsIs aa registered reQJslered trademark Trademark of of Digital Digflol Research. ReY!Orch, Inc. Inc. 61985. C 1985. Commodore Commodore Elecl^nics Heclj>nlcs limited limited ®CP/M

. COMMODORE 128128:: PERSONAL COMPUTER A Higher Higher Intelligence Intelligence_. A •

"

..:"

~' .'