address into BASIC.SYSTEM, andrelocating your program.Inside Quick CatalogHere's an outline of what QuickCatalog does. The program firstchecks to see whether ProDOS isactive. If ProDOS is absent, the program prints an error message andreturns to BASIC. Once installed asan external command, Quick Catalog waits to receive any commandthat starts with the characters CC,converting lowercase to uppercaseif necessary. When this commandcolumn or <strong>80</strong>-column mode and issues the appropriate CATALOGcommand along with any additional parameters. If a catalog activitydoes not follow, an error message isdisplayed.If you're familiar with assembly language, you may find it instructive to examine Quick Catalog.BLOAD the file from BASIC, thenenter the monitor with the command CALL -151. Type 2000L andpress RETURN to disassemble thebeginning of the file. The programis located in the area $2000-$21FF.The code at $2000-$20FF preparesthe code at $2100-$21FF and relocates it in the area specified by aProDOS call. After relocation, thecode at $2000 is abandoned.QUICK.CATALOG FilemakerFor instructions on entering this program,please refer to "COMPUTEI's Guide to TypingIn Programs" in this issue of COMPUTE!cp7.3F 70 TEXT : HOME : PRINT "LQADING Mt "M <strong>80</strong> FOR I = 8192 TD 8192 + 511: READ A: POKE I,A:X - X +A: NEXTPI 90 IF X < > 71906 THEN PRINT"ERROR IN DATA STATEMENTS."I STOPK 95 PRINT CHR* (4)"BSAVE QUICK.CATALOG,A»2000,L*200"IE 100 DATA 173,0,191,201,76,240,13,32,221,251, 173A3 110 DATA 247,32,141,120,32,32,116,32,76,113,323C 120 DATA 169,1,32,245,190,176,9,141,172,32,141ID 130 DATA 98,32,76,44,32,32,116,32,76,208,315 140 DATA 173,7,190,141,186,33,173,8,190,141,18723 150 DATA 33,169,0,141,7,190,173,172,32,141,B9F 160 DATA 190,173,172,32,141,6,33,141,12,33,141B3 170 DATA 83,33,141,200,33,141,72,33,141,203,337A 1<strong>80</strong> DATA 141,166,33,162,0,199,0,33,157,0,23563 190 DATA 232,224,255,208,245,173,207,32,141,120,329C 200 DATA 32,116,32,76,208,3,32,251,218,173,155K 210 DATA 32,141,169,32,173,120,32,141,140,32, 173Dt 220 DATA 121,32,141,141,32,162,1,189,155,32,32C4 230 DATA 237,253,232,236,169,32,144,244,32,251,218BE 240 DATA 96,13,211,217,211,212,197,205,160,197,2104E 250 DATA 210,207,210,160,174,195,207,196,81,32,20949 260 DATA 213,201,195,203,174,193,193,212,193,204,20779 270 DATA 199,160,201,211,160,206,207,215,160,201,206it 2<strong>80</strong> DATA 211,212,193,204,204,197,196,174,160,174,32F7 290 DATA 37,209,213,201,195,203,174,195,193,212,193fiC 300 DATA 204,207,199,160,210,213.206.211.160,207,206?fl 310 DATA 204,217,160,215,201,212.200.160,208,210,207AF 320 DATA 196,207,211,174,160,209,32,234,0,0,0F7 330 DATA 0,183,255,216,173,10B.190,141,16,33,1737A 340 DATA 109,190,141,17,33,162,1,189,170,170,20191 350 DATA 67,208,105,232,224,3,208,244,162,0,189A2 360 DATA 0,2,232,221,0,2,208,247,42,42,42FB 370 DATA 24,106,106,106,201,195,208,236,232,160,085 3<strong>80</strong> DATA 189,0,2,153,224,2,232,200,224,15,2404F 390 DATA 4,201,141,208,240,169,3,141,89,33,173K 400 DATA 24,192,10,176,117,162,0,1B9,108,33,157Dl 410 DATA 0,2,232,224,3,208,245,160,0,183,224I! 420 DATA 2,42,42,144,21,42,24,106,106,106,157A8 430 DATA 0,2,232,200,192,15,240,15,201,141,208D5 440 DATA 231,24,144,8,106,106,24,144,235,24,14459 450 DATA 54,169,255,141,38,2,169,0,141,15,190Ffi 460 DATA 32,3,190,169,0,141,15,190,141,84,1905D 470 DATA 141, 85, 190, 24, 173, 3B,2,201,233,20B,19F9 4<strong>80</strong> DATA 162,0,189,204,33,32,237,233,232,224,3B7A 490 DATA 208,245,32,221,251,32,251,218,76,208,3K 500 DATA 56,76,208,3,195,193,212,193,204,207,19939 510 DATA 160,169,7,141,89,33.76,79,33,208,210#F 520 DATA 207,196,207,211,160,214,207,204,213,205,197Bfl 530 DATA 160,206,207,212,160,201,206,160,212,200,193CC 540 DATA 212,160,196,210,201,214,197,175,208,193,2125B 550 DATA 200,174,160,211,232,239,236,236,175,195,207E9 360 DATA 205,208,213,212,197,1930Ulfappears, the program checks for 40-Well-Larsson-WestlundThis short utility adds flexibility tobatch processes on the IBM PC/PCjrand compatible computers.Many users of the IBM PC/PCjrand compatibles are familiar withbatch files. Simply put, a batch fileis a text file (with the extension.BAT) which contains a series ofMS-DOS commands. When you invoke the batch file by typing itsname at the DOS prompt, the computer executes each command inorder. The program accompanyingthis article helps make batch filesmore interactive. When this program is invoked from DOS, it displays a yes/no prompt and waitsfor you to press an indicated key,returning an error code which thebatch file can use to branch to different parts of the command process.Type in the program and savea copy. When you run it, the program checks its DATA statementsfor typing errors. If no errors arefound, it creates an assembly language file named YORN.COM. The.COM extension signals that this isan executable machine language file.To see what YORN.COM does,type YORN at the DOS prompt andpress Enter. The drive whirs for amoment; then the computer displays the prompt Answer (Y)es or(N)o... and waits for you to indicateyour choice. Note that YORN.COMrecognizes only the characters Y, y,N, or n.Sample Batch FileLet's create an example to showhow YORN.COM works in a batchfile. Type the following lines at theDOS prompt, pressing Enter at theend of each line:44 COMPUTE! February 1987
Behaved Batch FilesCOPY CON: YESNO.BATECHO OFFCLS:STARTECHO THIS IS A TEST BATCH FILEFOR YORN.COMYORN PLEASE PRESS N TOCONTINUE...IF ERRORLEVEL 255 GOTO WRONGECHOECHO YOU PRESSED THE N KEYGOTO END:WRONGECHOECHO YOU DIDN'T PRESS THE N KEYGOTO START:ENDECHOECHO ...ENDINGAfter you have typed everyline, press the F6 function key towrite the batch file to disk. Whenthe drive stops, you should havethe file YESNO.BAT on the currentdisk. Make sure you also have acopy of YORN.COM on the samedisk.Invoke YESNO.BAT by typingYESNO at the DOS prompt. Notethat YORN.COM displays a different prompt this time. Instead ofAnswer (Y)es or (N)o, it prints themessage PLEASE PRESS N TOCONTINUE. If you answer "Yes"by pressing Y or y, one series ofbatch commands is executed. If youanswer "No" by pressing N or n,the batch file branches to a differentseries of commands.It's not difficult to see how thiscapability might be useful. For instance, say that you often boot upwith an AUTOEXEC.BAT file thatinstalls an accessory program suchas SideKick. When you use memoryintensivesoftware such as Framework on a machine with only a limited amount of RAM, you may findyourself running out of memory ifSideKick or a similar accessory isresident. With Y0RN.COM, yourAUTOEXEC.BAT file can ask youwhether or not to install the accessory and respond accordingly.Error CodesYORN.COM tells you which key ispressed by returning an error code.In the example file YESNO.BAT, itreturns an error code of 255 whenyou press Y or y and an error codeof 254 for N or n. You can check theerror code with IF-ERRORLEVELand branch to the desired destination with GOTO as shown in thesixth line of YESNO.BAT. Whenyou're checking error codes, it isessential to begin with the highestcode (255 in this case) and workdownward to lower codes systematically.Customizing YORN.COMWe have already noted how tochange the prompt printed byYORN.COM: Simply supply thetext of the new prompt after theword YORN in the batch file. If nosuch text is found, YORN.COMprints the default prompt.For special purposes, you canalso check for characters other thanY or N. For instance, a batch processthat can send output to either thescreen or a disk file might promptyou to press S for screen output orD for disk output.The hex numbers $59 and $79in lines 390 and 400 of the BASICfilemaker stand for the characters Yand y, respectively. The hex numbers $4E and $6E in lines 400 and410 stand for N and n, respectively.To substitute other characters, replace these values with the valuesof the characters you wish to testfor. Remember that these numbersmust be in hexadecimal. (TheBASIC function HEX$ convertsdecimal values to hexadecimal: Forinstance, PRINT HEX$(13) displaysOD, the hex equivalent of decimal13.) If you change any of these values, you must also change thechecksum value (10731) in line 170accordingly. Once this is done, rerun the BASIC filemaker to create anew version of YORN.COM.YORN.COM FilemakerFor instructions on entering this program,please refer to "COMPUTEI's Guide to TypingIn Programs" in this issue of compute!.KJ 120 PRINT "Checking your typing — please wait ...";SI 130 FOR 1=0 TO 109EC 140 READ A*:A=VALCMfcH"+A*)EE 150 CKSUM=CKSUM+AHD 160 NEXT IHH 170 IF CKSUM= 10731 THEN 210AB 1<strong>80</strong> PRINTrPRINTIB 190 PRINT "Error - please check your typing!"DC 200 STOPHC 210 RESTORE 340IB 220 OPEN "YORN-COH11 AS #1 LEN= 1PF 230 FIELD 81,1 AS BYTE*EL 240 FOR 1=0 TO 109KD 250 READ ASm 260 LSET BYTE*=CHRt(VAL("«.H"+A*>)PJ 270 PUT #1Oi 2<strong>80</strong> NEXT IAG 290 CLOSE «1PD 300 PRINT:PRINTLJ 310 PRINT -YDRN-COM created."IS 320 PRINTLC 330 ENDOS 340 DATA EB, 05, 0D, 20, 20, 1A, 08,BE,<strong>80</strong>,00BE 350 DATA B5,00,SA,0C,83,F9,00,75,0A,BArx 360 DATA 54,0I,B4,09,CD,21,EB,19,90,46KJ 370 DATA BA, 5C, 01, <strong>80</strong>, FB, 0D, 74,08,BA,D3JE 3B0 DATA B4, 02, CD, 21, E2, EF, BA,6D,01,B4JK 390 DATA 09, CD, 15, B4, 00, CD, 16,3C,59,74EC 400 DATA 11,3C,79,74,0D,3C,4E, 74, 04, 3CIN 410 DATA 6E,75,EC,B0,FE,EB,03,90,B0,FFLH 420 DATA B4,4C,CD,21,41,6E,73,77,65,72JE 430 DATA 20,59,29,65,73,29,20,6F,72,20BH 440 DATA 4E, 28, 6F, 29, 20, 2E, 2E,2E,24,24OFebruary 1987 COMPUTE! 45
- 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: QuickProDOSCatalog For AppleLarrySh
- 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 and 92: key (Atari logo key on 400/800 mode
- Page 93 and 94: MLXMachine Language Entry ProgramFo
- 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