100 IF VAL(LEFT*(L*,2)) =0 ANDMID*(L»,3,1)=" " THEN L»=MID*(L*,4)200 IF ASC(L*)>57 THEN 260 'noline number, there-fore command205 BL=INSTR(L*," "):IF BL=0 THEN BL*=L*:G0T0 206 ELSE BL*«LEFT*(L*,BL-1)206 LNUM=VAL(BL*):TEXT*=MID*(L»,LEN(STR*(LNUM))+ 1)210 IF TEXT*=M" THEN GDSUB 540:IF LNUM=LNUM(P) THEN GDSUB 560:GOTO 150 ELSE 150220 CKSUM=0:FOR 1=1 TO LENtL*):CKSUM=(CKSUM+ASC(MID*(L*,I))*I> AND 255:NEXT:LOCATEY,I SPRINTCHR*(65+CKSUM/16)+CHR*(65+(CKSUM AND 15))+" "+L*230 GOSUB 540:IF LNUM(P)=LNUMTHEN L*(P>=TEXT*:GOTO 150'replace1ine240 GOSUB 5<strong>80</strong>:GOTO 150 'inserttheline260 TEXT*="":FOR 1=1 TO LEN(L*):A=ASC(MID*(L*,I)>:TEXT*=TEXT*+CHR*CA+32*96 ANDA,2)+" "350 IF CKFLA6=0 THEN A*="":GOT0 370360 CKSUM=0:A*=N*+L*(X):FOR 1=1 TO LEN(A*>:CKSUM=(CKSUM+ASC(MID*(A*,I>)*I) AND 255:NEXT:A*=CHR*(65+CKSUM/16)■K»R*(65+(CKSUM AND 15))+"370 PRINT #l,At+N*+L*(X)3<strong>80</strong> IF INKEY*"" THEN X=P390 NEXT :CLOSE #1:CKFLAG=0400 GOTO 130410 IF COMMAND*="LLIST" THEN 0PEN "lptl:" FOR OUTPUT AS#1:GDTO 300420 IF COMMAND*="CHECK" THEN CKFLAB=1:GOTO 290430 IF C0MMAND*O"SAVE" THEN 450440 GOSUB 600:OPEN ARG* FOR OUTPUT AS tH:ARG*="":GOTO 300450 IF C0MMAND*O"L0AD" THEN 490460 SOSUB 600:OPEN ARG* FOR INPUT AS #1:MAX=0:P=0470 WHILE NOT EOF(1):LINE INPUT #lfL*:BL=INSTR(L«," "):BL*=LEFT*(L*,BL-1):LNUM(P)=VAL(BL*>:L*(P)=MID*(L*fLEN(STR*(VAL(BL»))> +1):P=P+i:WEND4<strong>80</strong> MAX=P:CLOSE Ml:GOTO 130490 IF COMMAND*="NEWM THEN INPLJT "Erase program - Are ynu sure";L*:IF LEFT*(L*,1)="y" OR LEFT*(L*FI)="Y" THEN MAX-0:LNUM(0)=65536!:GOT0 130:ELSE 130500 IF COMMAND*="BASICI THEN COLOR 7,0,0:ON ERROR GOTO 0iCLSsEND510 IF C0MMAND*O"FILES" THEN520515 IF ARG*="" THEN flRGS="Ai"ELSE SEL=1:GOSUB 600517 FILES ARG*:GOTO 130520 PRINT>(Syntax errar":G0T0 130540 P=0sWHILE LNUM>LNUM(P> ANDP< MAX:P=P+1:UEND:RETURN560 MAX=MAX-1:FOR X=P TO MAX:LNUM(X)=LNUM(X+1):L*(X)=L*(X+l):NEXT:RETURN5<strong>80</strong> MAX=MAX+1:FOR X=MAX TO P+lSTEP -1:LNUM(X)=LNUM(X-I):L*(X)=L*(X-1):NEXT:L*(P)=TEXT*:LNUM(P)=LNUM:RETURN600 IF LEFT*(ARG*,1)OCHR*(34)THEN 520 ELSE ARG*=MID*(ARG*,2)610 IF RIGHT*(ARG«,1)=CHR*(34)THEN ARG*=LEFT*(ARG*,LEN(ARB*)-1)620 IF 5EL=0 AND INSTR(ARG*,".")=0 THEN ARG*=ARG*+".BAS"630 SEL=0:RETURN640 CLOSE ttl:CKFLAG=0:PRINT"Stopped.":RETURN 150650 PRINT "Error #";ERR:RESUME150Program 3: CommodoreProofreaderBy Philip Nelson, Assistant Editor10 VEC=PEEK{772)+256*PEEK(773):LO=43:HI=4420 PRINT "AUTOMATIC PROOFREADER FOR ";:IF VEC=42364 THEN[SPACE}PRINT "C-64"30 IF VEC=50556 THEN PRINT "VIC-20"40 IF VEC=35158 THEN GRAPHIC CLR:PRINT "PLUS/4 E, 16"50 IF VEC=17165 THEN LO=45:HI=46:GRAPHIC CLR:PRINT"128"60 SA=(PEEK(LO)+256*PEEK(HI))+6:ADR=SA70 FOR J=0 TO 166:READ BYT:POKEADR,BYT:ADR=ADR+1:CHK=CHK+BYT:NEXT<strong>80</strong> IF CHK20570 THEN PRINT "*ERROR* CHECK TYPING IN DATASTATEMENTS":END90 FOR J=l TO 5:READ RF,LF,HF:RS=SA+RF:HB=INT(RS/256):LB=RS-(256*HB)100 CHK=CHK+RF+LF+HF:POKE SA+LF,LB:POKE SA+HF,HBsNEXT110 IF CHK22054 THEN PRINT "♦ERROR* RELOAD PROGRAM AND{SPACEJCHECK FINAL LINE":END120 POKE SA+149,PEEK(772):POKESA+150,PEEK(773)130 IF VEC=17165 THEN POKE SA+14,22:POKESA+18,23:POKESA+29,224:POKESA+139,224140 PRINT CHR$(147);CHR$(17);"PROOFREADER ACTIVE":SYS SA150 POKE HI,PEEK{HI)+1:POKE (PEEK(LO)+256*PEEK(HI))-1,0:NEW160 DATA 120,169,73,141,4,3,169,3,141,5,3170 DATA 88,96,165,20,133,167,165,21,133,168,1691<strong>80</strong> DATA 0,141,0,255,162,31,181,199,157,227,3190 DATA 202,16,248,169,19,32,210,255,169,18,32200 DATA 210,255,160,0,132,1<strong>80</strong>,132,176,136,230,1<strong>80</strong>210 DATA 200,185,0,2,240,46,201,34,208,8,72220 DATA 165,176,73,255,133,176,104,72,201,32,208230 DATA 7,165,176,208,3,104,208,226,104,166,1<strong>80</strong>240 DATA 24,165,167,121,0,2,133,167,165,168,105250 DATA 0,133,168,202,208,239,240,202,165,167,69260 DATA 168,72,41,15,168,185,211,3,32,210,255270 DATA 104,74,74,74,74,168,185,211,3,32,2102<strong>80</strong> DATA 255,162,31,189,227,3,149,199,202,16,248290 DATA 169,146,32,210,255,76,86,137,65,66,67300 DATA 68,69,70,71,72,74,75,77,60,81,82,83,88310 DATA 13,2,7,167,31,32,151,116,117,151,128,129,167,136,137Program 4: AppleProofreaderBy Tim Victor, Editorial Programmer10 C = 0: FOR I = 768 TO 768 +68: READ A:C = C + A: POKE I,A:NEXT20 IF C < > 725B THEN PRINT "ERROR IN PROOFREADER DATA STATEMENTS":END30 IF PEEK (190 * 256) < > 76 THEN POKE 56,0: POKE 57,3: CALL 1002: GOTD 5040 PRINT CHR* (4);"IN#A*300"50 POKE 34,0: HOME : POKE 34,1:60 NEWVTAB 2: PRINT "PROOFREADERINSTALLED"100 DATA 216,32,27,253,201,141110 DATA 208,60,133,72,169,0120 DATA 72,1B9,255,1,201,160130 DATA 240,8,104,10,125,255140 DATA 1,105,0,72,202,208150 DATA 238,104,170,41,15,9160 DATA 4B,201,58,144,2,233170 DATA 57,141,1,4,13B,741B0 DATA 74,74,74,41,15,9190 DATA 48,201,58,144,2,233200 DATA 57,141,0,4,104,170210 DATA 169,141,96 ©8fl COMPUTEI February 1987
MLXMachine Language Entry ProgramFor Commodore 64Ottis Cowper, Technical Editor"MIX" is a labor-saving utility that allowsalmost fail-safe entry of Commodore 64machine language programs.Type in and save some copies of MLX—you'll want to use it to enter future machine langauge (ML) programs fromCOMPUTE!. When you're ready to enteran ML program, load and run MLX. Itasks you for a starting address and anending address. These addresses appearin the article accompanying the MLXformatprogram listing you're typing.If you're unfamiliar with machinelanguage, the addresses (and all othervalues you enter in MLX) may appearstrange. Instead of the usual decimalnumbers you're accustomed to, thesenumbers are in hexadecimal—a base 16numbering system commonly used byML programmers. Hexadecimal—hexfor short—includes the numerals 0-9and the letters A-F. But don't worry—even if you know nothing about ML orhex, you should have no trouble usingMLX.After you enter the starting and ending addresses, you'll be offered the option of clearing the workspace. Choosethis option if you're starting to enter anew listing. If you're continuing a listingthat's partially typed from a previoussession, don't choose this option.A functions menu will appear. Thefirst option in the menu is ENTERDATA. If you're just starting to type in aprogram, pick this. Press the E key, andtype the first number in the first line ofthe program listing. If you've alreadytyped in part of a program, type the linenumber where you left off typing at theend of the previous session (be sure toload the partially completed programbefore you resume entry). In any case,make sure the address you enter corresponds to the address of a line in thelisting you are entering. Otherwise, you'llbe unable to enter the data correctly. Ifyou pressed E by mistake, you can returnto the command menu by pressing RETURN alone when asked for the address.(You can get back to the menu from mostoptions by pressing RETURN with noother input)Entering A ListingOnce you're in Enter mode, MLX printsthe address for each program line foryou. You then type in all nine numberson that line, beginning with the first twodigitnumber after the colon (:). Each linerepresents eight data bytes and a checksum. Although an MLX-format listingappears similar to the "hex dump" listings from a machine language monitorprogram, the extra checksum number onthe end allows MLX to check yourtyping.When you enter a line, MLX recalculates the checksum from the eight bytesand the address and compares this valueto the number from the ninth column. Ifthe values match, you'll hear a bell tone,the data will be added to the workspacearea, and the prompt for the next line ofdata will appear. But if MLX detects atyping error, you'll hear a low buzz andsee an error message. The line will thenbe redisplayed for editing.Invalid Characters BannedOnly a few keys are active while you'reentering data, so you may have to unlearn some habits. You do not type spacesbetween the columns; MLX automatically inserts these for you. You do not pressRETURN after typing the last number ina line; MLX automatically enters andchecks the line after you type the lastdigit.Only the numerals 0-9 and the letters A-F can be typed in. If you press anyother key (with some exceptions notedbelow), you'll hear a warning buzz. Tosimplify typing, a numeric keypad is nowincorporated in the listing. The keypad isactive only while entering data. Addresses must be entered with the normal letterand number keys. The figure belowshows the keypad configuration:7 84U1JAM5I2K9B6O\ Space3L0cFP•MLX checks for transposed characters. If you're supposed to type in A0 andinstead enter 0A, MLX will catch yourmistake. There is one error that can slippast MLX: Because of the checksum formula used, MLX won't notice if you accidentally type FF in place of 00, and viceED/versa. And there's a very slim chance thatyou could garble a line and still end upwith a combination of characters thatadds up to the proper checksum. However, these mistakes should not occur ifyou take reasonable care while enteringdata.Editing FeaturesTo correct typing mistakes before finishing a line, use the INST/DEL key todelete the character to the left of thecursor. (The cursor-left key also deletes.)If you mess up a line really badly, pressCLR/HOME to start the line over. TheRETURN key is also active, but onlybefore any data is typed on a line. Pressing RETURN at this point returns you tothe command menu. After you type acharacter of data, MLX disables RETURNuntil the cursor returns to the start of aline. Remember, you can press CLR/HOME to quickly get to a line numberprompt.More editing features are availablewhen correcting lines in which MLX hasdetected an error. To make corrections ina line that MLX has redisplayed for editing, compare the line on the screen withthe one printed in the listing, then movethe cursor to the mistake and type thecorrect key. The cursor left and right keysprovide the normal cursor controls. (TheINST/DEL key now works as an alternative cursor-left key.) You cannot moveleft beyond the first character in the line.If you try to move beyond the rightmostcharacter, you'll reenter the line. Duringediting, RETURN is active; pressing ittells MLX to recheck the line. You canpress the CLR/HOME key to clear theentire line if you want to start fromscratch, or if you want to get to a linenumber prompt to use RETURN to getback to the menu.Display DataThe second menu choice, DISPLAYDATA, examines memory and shows thecontents in the same format as the program listing (including the checksum).When you press D, MLX asks you for astarting address. Be sure that the startingaddress you give corresponds to a linenumber in the listing. Otherwise, thechecksum display will be meaningless.MLX displays program lines until itreaches the end of the program, at whichpoint the menu is redisplayed. You canpause the display by pressing the spacebar. (MLX finishes printing the currentline before halting.) Press space again toFebruary 1987 COMPUTE! 89
- Page 2 and 3:
We just did something only the best
- Page 4 and 5:
icate Maker!Because accomplishments
- Page 6 and 7:
Editor'sNotesThis is the 81st issue
- Page 8 and 9:
PublisherFounder/Editor in ChlelSen
- Page 10 and 11:
Selby BatemanFeatures Editor....
- Page 12 and 13:
, ■■-■■'■ ;-.-..■■■
- Page 14 and 15:
The new Compaq Deskpro 386 is among
- Page 16 and 17:
Selby Bateman, Features Editoricrop
- Page 18 and 19:
68030 chip, which should be readyfo
- Page 20 and 21:
computer are often called proprieta
- Page 22 and 23:
Tom R. Halfhill, Staff Editorore By
- Page 24 and 25:
Selby Bateman, Features Editorasers
- Page 26 and 27:
MicroscopeSheldonLeemonThe new Appl
- Page 29 and 30:
Fly to Florida!Scenery Disk # 7 cov
- Page 31 and 32:
contains twice as many vertical pix
- Page 33 and 34:
And you don't even have toleave you
- Page 35 and 36:
Increase your knowledge about all a
- Page 37 and 38:
BEST SERVICE IN THE USA • ONEDAY
- Page 39 and 40:
BATTERIES Sg? INCLUDEDTHE FOUR LETT
- Page 41 and 42: LYCOCOMPUTERMARKETING & CONSULTANTS
- Page 43 and 44: ATARIJKLYCOCOMPUTERMARKETING & CONS
- Page 45 and 46: QuickProDOSCatalog For AppleLarrySh
- Page 47 and 48: Behaved Batch FilesCOPY CON: YESNO.
- Page 49 and 50: ASC II ExpressBalance of PowerBally
- Page 51 and 52: END**Beap:*SOUND 800,1,100,0:SOUND
- Page 53 and 54: COMMODOREAPPLEC64 COMPUTER C-128COM
- Page 55 and 56: FileCompressorChrisRogersThis Commo
- Page 57 and 58: character n. Whenever File Compress
- Page 59 and 60: \Make Your ChoiceC-64 or C-128BASIC
- Page 61 and 62: RP0A71i4C0A79:1B0A81:0A0A89:1F0A91i
- Page 63 and 64: ACCOLADEHardball 24.95Mean 18 31.95
- Page 65 and 66: Ibefore a move is made. Each compar
- Page 67 and 68: PH 1390 IF P$="C" AND T0>=7 THEN .1
- Page 69 and 70: 5D 2310 DATA 30,34,34,30,2,2,2,0FE
- Page 71 and 72: I10 630 P$="C"BC 640 REM tt PICK BE
- Page 73 and 74: ,——■———U-J>G>Player■p
- Page 75 and 76: INSIGHT:AtariBillWilkinsonNumber-Ba
- Page 77 and 78: EMPX,TEMPY,MASKBH 9140 TEMPX-X1TEMP
- Page 79 and 80: AmigaViewSheldonLeemonThe Latest Am
- Page 81 and 82: Computers and SocietyDavid D. Thorn
- Page 83 and 84: RUSH POSTAGE-PAID CARDFOR YOUR FREE
- Page 85 and 86: Train with NRI for a high payingcar
- Page 87 and 88: PersonalComputingDonald B. irivette
- Page 89 and 90: 3M DiskettesICEI has an outstanding
- Page 91: key (Atari logo key on 400/800 mode
- Page 95 and 96: THEN PRINT IN?iPRINTM{UP][5 RIGHT}"
- Page 97 and 98: When you want to talk price.AmdekMO
- Page 99 and 100: THE LOWESTTHE BESTPRICESSERVICEELEC
- Page 101 and 102: fNOWAVAILABLE AT24$O>!00The Mew Car
- Page 103 and 104: COMPUTERSFREE Reader Information Se
- Page 105 and 106: STARGLIDERJJtarglider — is an all