Skip to main content

computist book of softkeys vol1

  • PublicationApple Periodicals
  • Pages162
  • Sourcecomputist-book-of-softkeys-vol1.pdf
← Magazines computist book of softkeys vol1
/ 162
Source: Internet Archive — Aggregated Apple-era periodicals, 1981–2012.
Page 1
Loading…
Text content (OCR)
Hardcore COMPUTIST’s Book Of Softkeys Volume I SoftKey Publishing Welcome to the Book Of Softkeys, a publication devoted to the serious user of Apple ][ and Apple ][ compatible computers. The articles published in this volume detail the removal of copy protection schemes from commercial disks or contain information on copy protection and backup methods in general. Our editorial policy is that we do NOT condone software piracy, but we do believe that honest users are entitled to backup commercial disks they have purchased. In addition to the security of a backup disk, the removal of copy protection gives the user the option of modifying application programs to meet his or her needs. Entire contents copyright © 1985 by SoftKey Publishing. All rights reserved. Copying done for other than personal or internal reference (without express written permission from the publisher) is prohibited. Any opinions expressed by the authors are not necessarily those of Hardcore COMPUTIST or SoftKey Publishing. ‘Apple usually refers to the Apple II series computer, and is a trademark of Apple Computers, Inc. General Information: Applesoft Disks (Softkey To).................0.. 0c eee 9 Some general pointers on how to find Applesoft programs loaded by non-standard DOS disks. Boot Code Tractigscnccsmeccons exagearmmasmgrame wai: 22 There’s no protecting against this method of disk cracking. Boot Code Tracing Revisited.................0.-0 eee eee 27 Take another look at how to trace a program as it loads into memory. DenWGTNS srencrcnanen sonengeummneeaiemnY 41 Make this handy disk cracking tool from a program supplied by Apple. DISKO it siessissreces casenyecse sommenemaiine eommvautererewcmneencoans anne 43 Read, Write and Edit sectors on any DOS 3.3 disk. It’s easy with this program. Diskview.. . A mini-nibbler that reads raw nibbilized data from any disk, regardless of format. Getting On The Right Track............0.0.0 esse eee eee 99 Here’s how to tell what track your read/write head is positioned over. A real help on those difficult copies. Hidden Locations Revealed..............0.00e eee eee 106 Take a peek at these favorite locations used by protected software. (A Fix For) RANA Drive Owners. . .. 130 A way to boot code trace on a Tricks & Bombs............0s cece eee e eee e eee eens 139 Contents Softkeys Akalabeth. . Ampermagic. Apple Galaxian (see Boot Code Tracing) Bag Of Tricks Bill Budge’s Trilogy. . Buzzard Bait Cannonball Blitz... Data Reporter. Deadline (see Zork I) Disk Organizer II (see Hidden Locations Revealed) Egbert II Communications Disk. ares $89: Hard Hat Mack. . «+ 101 Home Accountant -.. 110 Homeword. - 112 Lancaster. . . 13 Magic Window II........-....-.++++4-5 se WIS Multi-Disk Catalog (see Boot Code Tracing Revisited) Multiplan. . ee 119 Pest Patrol ++. 120 Prisoner II wee 129, Sammy Lightfoot... --. 131 Screenwriter II. . .. 133 .. 135 Spy’s Demise. . .. 136 Starcross.. . 137 Suspended (see Zork I) Ultima ][. 141 Ultima J[ (2).. . 147 Visifile......... . 149 Visiplot/Visitrend. . 151 Witness (see Zork I) 152 . 155 Zork I, Zork I, Zork I. . 156 >Akalabeth California Pacific Computers Requirements: Apple ][ 48K One blank disk MUFFIN (from DOS 3.3 master disk) By Bobby Akalabeth is a hi-res adventure/maze/treasure hunt game distributed by California Pacific Computers. It has a few bugs that need correcting. Here is a method of ‘‘down-loading’’ Akalabeth from its protected diskette so that you can make the FiXes described in Softfix and additions. 1) Boot from the DOS 3.3 master disk PR#6 2) Remove the master disk, insert the blank disk and enter the hello program 10 PRINT CHR$(4) “RUN*[#¢4¢4 44848 EHH EHR ake]? :REM THERE ARE 26 ASTERISKS 3) Initialize the blank disk with the new hello program INIT HELLO 4) Remove the initialized disk, insert the master disk and load MUFFIN BLOAD MUFFIN 5) Make the following changes to allow MUFFIN to read the protected disk POKE 4257,6 POKE 6664,222 POKE 6685, 181 POKE 6742,217 POKE 6774,222 POKE 6795,173 POKE 6834,217 6) Now start MUFFIN and follow the prompts to copy Akalabeth. Use the initialized disk for the destination disk. CALL 2051 6) To play the game, simply run the hello program. 1 Book of Softkeys Vol. I Softfix & Additions One of the reasons for removing programs and files from copy-protected disks is that you can now fix them, alter them, and even make additions to them. In other words, you can now customize them to fit your particular needs. Since you have already ‘‘freed’’ Akalabeth from its “‘protected’’ disk, you can now fix its annoying scrolling problem and add a new magical command. PROBLEM: The ‘“‘hit points’’ of the foes you are fighting often flash (scroll) by so fast that you can’t see what they were and therefore cannot make a valid combat decision. FIX: Put in a pause after it prints the hit points. There are other minor fixes that modify screen format, greetings and farewells (Quit has been changed to eXit). SPECIAL MAGICAL ADDITION: TELEPORTATION To help the brave Magi descend into, and ascend out of, the forbidden depths of this World of Doom, we have added a special teleportation option. (Use only if you have 1 or more magic amulets because this option ‘‘burns up’’ amulets just as if you had used the Magic Ladder-Up or Ladder-Down commands.) When you choose the Sth option: TELEPORT, you'll get: 1-UP 2-DOWN. Take your choice. If you choose UP you will continue upward until either you surface or you run out of amulets and get an: OUT OF MAGIC message. Choose DOWN and you’ll be asked: HOW MANY LEVELS? It is a GET statement, so choose a number from 1 to 9 and don’t bother to hit ‘‘return’’. If you run out of magic now, you’re really in a World of Doom! Here’s how to add the teleport command to your deprotected akalabeth disk. 1) Load the file “MAIN PROGRAM” LOAD MAIN PROGRAM 2) Enter the BASIC program on the next page. 3) Save the changed program back to the disk SAVE MAIN PROGRAM That’s all there is to it. If you know of another fix or addition to Akalabeth or for any prepackaged programs on the market, (whether they are on protected disks or normal format disks), drop a note to SoftKey Publishing and we’ll let other apple-users know about it. Book of Softkeys Vol. I 2 I 1A skaxyos Jo Yoo, € worn (§)0 INIUd ¢ €T QVLH | OT VLA LE209 NUML3Y < SHOH © ANAL: LX3N OOOT OL T= ZYOd = 4 ¥ONT,CO0D. INIYd © INIUd NBHL au = $0 4} $0139 5 | wAMGAMOHL/LTVHSSNALI HOIHMs ANIUd 01209 aL IXG%u INI © BT QVLH | TT QVLA 18009 aan 100, * 4 °"""NOOSIMa * w”*“WNIHVIS., ~ALIMBLNGO, ‘ .°""HISNGMUS, | 4° "SINIOds LI ¥1¥O 02009 0601 OLOD : LYN 9¢8T «QIDYH.d0LLNO, INIYd : 00 = SO NBHLT > ( S)Ad 41 P¥8T T= ($)Hd = ($)Md NSHL 8" < (1) ONUADS T+NT NI: OOOLT= SO YOd : OO INIUd © ($0) TWA= 00! $0 139: 5 aeiSTBATTSANVMGMOH INIUd OF8T O28 0109 9281 T= (S)Hd = (6)MMd NAHL SZ" < (1) ONY I 9287 60T O10 : .DID¥H,40,LNO. INIYd NAHL T > ( S)Kd 41 228T TSSTNGHLT=NI 31: (2) SUH INIYd © T-NI= NI O28T OvBt' 028T 0109 00 NO OTST OO8T N3HL 2 <0040 T> 0041 : OO INIUd ($0) WA= 00: $0139: | wsNMOG-Zredfl-T. INIUd : 896 TIVO : 12 Q¥LA 008T 008T' 2691 1691‘ 069T' 989T 0109 0 NO S89T 2897 NSHLS <OYOT> OI : 0 INIUd ($0) WA=0: $0139 : LYOEITAL-Sopd diPoy THY-EveNO-Zredfl-Ts INI Ud 289T XIN: 005 01 T=S0 Od: (T' NMDEZH =SINIOd IHS. « ( NH)SH INIYd 6997 uondo j10d2]9) ppe 0} ure1Z01d DISVE >Amper-Magic Anthro-Digital Requirements: 48K Apple or an Apple //e Amper-Magic One blank disk Apple’s COPYA program Text file editor (AppleWriter II, Apple’s EDASM, etc.) A Disk Edit utility (THE INSPECTOR or WATSON.) FIXCAT from ‘‘Bag of Tricks’’ and FID are also useful. By Bob Bragner Amper-Magic is a disk library of machine-language routines that can be easily attached to Applesoft programs thus providing extensions to BASIC such as PRINT USING, SWAP, DELETE ARRAY, INPUT ANYTHING and many, many more. The routines are connected to Applesoft through the ampersand ‘‘&’” and it is easy to pass parameters. There is also a second disk of routines available dealing largely with screen formatting. If you do any serious programming in Applesoft and find the language too slow for some applications but the thought of writing your own machine language routines to speed things up makes your head hurt, then Amper-Magic is for you. This program is super-friendly and comes with a well thought- out loose-leaf manual. The price is a little steep, however. I paid $67 for my master and another $15 to be a ‘‘Registered Commercial Owner.”’ Such registration entitles you to automatic notification in case the manufacturers add any corrections or improvements and also authorizes you to use the Amper-Magic routines in any commercial applications you may write. Having paid this one-time fee, your only other obligation is to mention Anthro-Digital’s name in the documentation of any program using their routines. Fair enough. More than fair: generous. However, I did balk at the $7 price tag on the backup disk. That’s about $4 more than I’m willing to pay for such a necessity. But I like lots of backups, so I set about making them. To my dismay I discovered that not only is Amper-Magic protected, it is protected in a very ingenious, and potentially dangerous, way. Actually, it is mentioned nowhere that the disk is protected and you are nowhere warned not to write anything onto the master disk. This is not friendly. Amper-Magic has several levels of protection. You can copy the disk with Apple’s COPYA without a hitch, but the result won’t work. When you attempt to EXEC the.main control textfile as directed, the disk drive turns on and stays on. Book of Softkeys Vol. I 4 Hitting reset will lock up your machine. The only ways out are control/open Apple/reset or turn-the-machine-off-then-on. An examination of the controlling text file called Amper-Magic showed, among other things, the following: FF$ = “A”: FOR I = 1 TO 29: FF$ = FF$ + CHR$(8) : NEXT I PRINT CHRS$(4); “BRUN’’FF$ DEL 1,0 RUN For you newcomers, CHR$(8) is the backspace on your keyboard (@H). It’s been so long since anyone used control characters to conceal filenames in catalogs that it never even occurred to me to look for them. This particular trick causes the filename to be written over by the next one in the catalog, thus rendering it invisible. Cute. Changing the file’s name to something more respectable (on the copy, of course), I proceeded to examine the binary file now simply called ‘‘A’’. This is a 288-byte file that lives at $25B. The code is not difficult to disassemble, but it was doing some strange things. It appeared to look for 14 bytes in track 0, sector 0, and to compare them with a table in memory. If they matched, and if a number of other conditions were met, then another program called “‘AMPER.MAGIC PROGRAM”’ was loaded. Otherwise, program ‘‘A’’ hung up. Since program ‘‘A’’ did a jump to the standard DOS LOAD command, AMPER.MAGIC PROGRAM had to be somewhere in the catalog track (track $11) and it had to be in the VTOC. But it wasn’t. Call up WATSON or THE INSPECTOR and do a sector-use map of your Amper-Magic disk. Now look at sector $F of track $11 and backstep through the catalog. In sector $C you will see the ‘‘A”’ file whose name contains 29 inverse ‘‘H’’s (it’s at track $21, sector $08. In sectors $B and $A you will see some deleted Applesoft files with odd names like NILO and NIL1 which seem to have been used to overwrite other deleted binary files with names like “‘REPEET”’ and “‘RWTS.O.”’ They contain (meaningless?) data statements. When you get to sector $9, you will see that the link to the next catalog sector (8) is missing! Hmm... To DOS this means that this is the end of the catalog. Backstep once more and all at once the words ““AMPER.MAGIC PROGRAM” are staring at you from sector $8. This program appears to start at track $0F, sector $F. Check it out; it does. Backstep some more. Notice that the link in sector $2 is missing. Now look at sector 1 and you will find yourself looking at what must be a VTOC! ‘‘But VTOC’s are supposed to be in 5 Book of Softkeys Vol. I sector 0,’’ I hear someone say. I don’t? Well, anyhow, there is a byte in DOS called READ/WRITE VTOC BUFFER. It is located at $BOOD (45069) and it normally contains a 0. Just for fun, try poking the value 1 there and type “CATALOG”’ with an ordinary disk in the drive. (For a lot of fun, poke in a number greater than 15!) Unless the disk has had a great many file names on it at one time, this track will usually be empty and your catalog will have disappeared. If any file names have been stored in this sector, CATALOG will display some quaint garbage since DOS will attempt to interpret what it finds there as a VTOC. Place your AMPER.MAGIC master in the drive, do a POKE 45069,1, then CATALOG and you will see the hidden file. Returning to a more careful examination of the disassembled code of ‘‘A”’, it turns out that this program does indeed store a 1 at $BOOD before it attempts to load the AMPER.MAGIC PROGRAM. The latter program, for its part, pokes a 0 back into that location so it can get at the routines stored on the disk. The reason this method of copy-protection is dangerous, aside from the fact that you don’t know it is there, is that the normal VTOC at sector 0 may not know anything of AMPER.MAGIC PROGRAM. If it thinks the sectors it occupies are unused, and if you try to save something on the disk, DOS will cheerfully write all over the hidden program. Moral: Never write anything to a master disk, even if the manufacturer doesn’t tell you not to. Additional examination of ‘‘A’’ reveals that the whole routine can be bypassed. The program checks to see whether or not it is running on an original disk and whether or not an EXEC file is in operation. Finally, it doctors the VTOC and loads the hidden program. A quick examination of AMPER.MAGIC PROGRAM shows that it makes no attempt to protect itself once it is running. Here is a step-by-step procedure to crack AMPER-MAGIC (the commands to type in are given in bold): 1) Copy the master disk using normal COPYA procedures RUN COPYA 2) Point DOS to the VTOC on sector 1 POKE 45069,1 3) Catalog the disk CATALOG 4) Load the AMPER.MAGIC PROGRAM file LOAD AMPER.MAGIC PROGRAM Book of Softkeys Vol. I 6 5) Unlock the AMPER.MAGIC PROGRAM file UNLOCK AMPER.MAGIC PROGRAM 6) Delete the AMPER.MAGIC PROGRAM file DELETE AMPER.MAGIC PROGRAM 7) Point DOS to the VTOC on sector 0 POKE 45069,0 8) Catalog the disk again CATALOG 9) Save the AMPER.MAGIC PROGRAM file SAVE AMPER.MAGIC PROGRAM 10) Unlock the EXEC text file AMPER.MAGIC UNLOCK AMPER-MAGIC 11) Bring up a text file editor such as AppleWriter Ile, Apple EDASM, etc. 12) Load AMPER-MAGIC into the editor. 13) Insert the word ‘‘REM”’ at the beginning of the line that reads PRINTCHR$(4);‘‘BRUN’’FF$. 14) Insert the following: CHR$(4)““LOAD AMPER.MAGIC PROG! i before the last line in the file (the one that says ‘‘RUN’’). 15) Save this as a text file under the name AMPER-MAGIC SAVE AMPER-MAGIC 16) Exit the editor. You now have a de-protected copy of Amper-Magic from which you can make all the working backups you want using normal copy procedures. You’re not quite done yet, though, because the disk’s catalog is still a bit messed up. To manually restore the missing links you can use WATSON/THE INSPECTOR (and zero out the extra VTOC at track $11, sector 1) or you can run the FIXCAT utility in ‘Bag of Tricks’ and let it do the work for you. You really should repair the catalog if you intend to use FID to move files off of, or onto, the deprotected disk. If you use FIXCAT you should ignore the temptation to restore the deleted files since most of them have been written over. There is, however, a strange little Applesoft program not located at track $10, sector $E (its track/sector list is in sector $F). Restore this program and call it “WEIRD HELLO”’, then tun it for an odd message. es Book of Softkeys Vol. I By the way, Volume 2 of Amper-Magic is unprotected and can be copied without any fooling around. I like to FID all its binary files over to the deprotected master since both disks are mostly empty space anyhow. Do you want to add more routines to the library? Move everything to a hard disk or a Ram Pseuodisk? Eliminate the annoying beeps in the main program? With your unprotected version of Amper-Magic you are now free to make any modifications you wish. Book of Softkeys Vol. I 8 »Softkey To Applesoft Disks By Bobby If the program you have is working to your satisfaction, there is really no reason to go through the trouble of ‘‘unlocking’’ the copy-protection. I recommend that everyone obtain a bit-copy program and use it to backup their software. The methods described here are for programs that you feel need FIXing. In order to FIX them, you have to be able to list them. Another reason for putting programs on normal DOS is to conserve disk space by placing more than one program on a disk. If you just make a bit-for-bit backup of ten disks, you now have 20 disks. However, by ‘“‘downloading”’ the protected program to normal DOS, you can probably put all ten on two or three one-sided disks. The Open-Heart Surgery Method Requirements: Apple ][+ 48K Applesoft in ROM Integer card Tape recorder One blank initialized disk (3.2 or 3.3 as appropriate) This method is not for beginners. It requires some knowledge of programming and involves a number of monitor commands. An understanding of Zero Page locations is helpful. No matter what has been altered, this method will work because the computer must know the program location in order to RUN it. The following locations apply to Applesoft in ROM and 48K DOS. They are used by the computer to tell it where the program is located and what to do with it. Multibyte addresses are given in standard format (e.g. hex lo-byte, hi-byte). $D6 is the RUN flag. Any time this byte has the high bit set, the program in memory will auto-run. $3F2, $3F3 is the reset vector. (See page 37 of your Apple ][+ Reference Manual (A][ RM.) $3F4 is the power up byte (EOR of $A5 and the value at $3F3. See page 37, A][ RM.) $67, $68 is the start-of-program pointer. See page 140 of the Applesoft BASIC Programming Manual(AB-PRM). $AF, $B0 is the end-of-program pointer. See page 141, AB-PRM. 9 Book of Softkeys Vol. I $9DBF (CALL-25153) reconnects DOS. See page 144 of your DOS 3.3 Manual (DOSM). $A851 (CALL-22446) reconnects the input hooks. (Bypasses $9DBF and any time-bombs that may have been planted there.) $AA60, $AA61 is the length of the last loaded program. See page 144, DOSM. $AA72, $AA73 is the start of the last BLOADED program. See page 144, DOSM. The following steps were written for an Apple ][+ 48K with Applesoft in ROM and an Integer card. If you have Integer in ROM and an Applesoft card, be sure to reverse the appropriate steps (i.e. when it says to flip the switch UP on your Integer card, flip the switch DOWN on your Applesoft card). Hitting RETURN after commands is implied and will only be referenced in certain lines for clarity. 1) Boot the backup copy of your program disk (never use the original). 2) Flip the Integer card switch UP and press RESET to enter the monitor. 3) Check the start of program pointer. If the number is not $801, then write it down for later reference. 67.68 4) Reset the run flag. D6:0 5) Change the reset vector to jump into the current language. 3F2:03 E0 45 6) Flip the Integer card switch DOWN, press RESET and type LIST If the program does not list, you may be trying to list a binary file. Check $4A72,AA73 to see if this is true. 7) Save your program to tape. 8) Take a good look at your listing. Write down the names of any files that are LOADed or RUN and the start address of any binary file, if given. List all POKEs and CALLs. 9) On some protected disks the command parser in DOS is changed. This tends to wipe out some of the common commands (e.g. LOAD, SAVE, CATALOG). Another popular trick is to change DOS so it does not allow any direct commands. In order to load and save the files that make up your program, select the first line entry that LOADs or BLOADs a file. DELETE all line entries above and below the selected line (e.g. you want line 5, Book of Softkeys Vol. I 10 so DELETE lines 0 through 4, and 6 through 63999). 10) Now CALL -25153 If it bombs, restart. Repeat all steps up to 10 and now CALL -22446 This reconnects the DOS. Then type RUN This will load your selected file. 11) Save the file to tape and repeat these steps until all files are SAVEd. 12) Boot normal DOS. LOAD the files one at a time from tape and SAVE to your disk. 13) Examine all the Applesoft listings to make certain that all the files have been transferred. Now that all the files are on normal DOS, examine them for hidden bombs. Bombs are program lines that serve no purpose other than to garbage the program. See ‘‘Tricks and Bombs’’. For Integer Programs The zero page pointers for Integer programs are: HEX DEC Start of program $CA, $CB 202, 203 End of program $4C, $4D 16, 77 These pointers tell your computer where the program is in memory. The hex address is in normal lo-byte, hi-byte format. Hope these tips will help you find your program. Good luck! i Book of Softkeys Vol. I > Aztec Datamost Requirements: Apple }{ 48K One blank disk CopyA from DOS master disk Disk edit program By Marco Hunter Here is a quick softkey. 1) Use the modified COPYA from Zork softkey. 2) Edit track 00, sector 03, change byte 42 from 38 to 18. That’s it. Book of Softkeys Vol. I 12 >Bag Of Tricks Quality Software Requirements: Apple J[, ][+, //e or compatible Blank disk initialized with 48K slave DOS Bag of Tricks disk By Neil Taylor, Earl Taylor and Ray Darrah Have you ever booted the Bag of Tricks disk and received an irritating message to use the original, when it’s already in the drive? Have you ever wanted to avoid the menu and skip right to the needed program? Perhaps you are afraid of crashing the original and can’t get a good copy. Here is an easy (albeit somewhat long) way to get an unprotected version. Basic Procedure To unprotect the programs on the original disk, each one will have to be loaded by its DOS and then saved by a normal DOS. The programs loaded by the Bag of Tricks DOS are located at $800 in memory which normally is overwritten during the boot process. Before they can be saved, they must be moved to a safe area of memory. The programs can then be run by normal DOS. Loading and Saving The following procedure for loading and saving TRAX is used in a slightly different form for each of the remaining Bag of Tricks programs: INIT, ZAP, and FIXCAT. TRAX 1) Boot the 3.3 master, insert the blank disk and type FP INIT HELLO 2) Boot the Bag of Tricks disk (the menu will be displayed). 3) After the light goes off open the drive door. 4) Press reset once, wait a couple of seconds and press it again. 5) To enter the monitor CALL -151 6) Then type 9489:4C 59 FF 13 Book of Softkeys Vol. I 7) Close the drive door. 8) Type 9400G 9) To load TRAX, type T 10) Then type 3800<800.2AFFM 11) For Trax only, type 6700<8700.93FFM 12) Place the blank disk into the drive and boot it with C600G. 13) Now BSAVE TRAX,A$3800,L$2300 14) And for TRAX and INIT only BSAVE TRAX.SUP,A$6700,L$D00 The same format can be used for INIT, ZAP, and FIXCAT with changes in Steps 9, 10, 13, and 14. Step 11 is not necessary, Complete Steps 2 through 8 for each of the remaining programs, then follow the special steps listed under the program title. Complete INIT first: INIT 9) To load INIT type I 10) Then type 3800<800.325EM 11) And BSAVE INIT,A$3800,L$2B00 12) Place the blank disk into the drive and boot it with C600G 14) Then BSAVE SUPPLEMENT,A$7600,L$A00 Book of Softkeys Vol. I 14 ZAP The supplement is the same for INIT, ZAP and FIXCAT, so Step 14 can be eliminated. 9) To load ZAP type Z 10) Then type 5000<800.4CFFM 12) Place the blank disk in the drive and boot it with C600G 13) Then BSAVE ZAP,A$5000,L$4500 FIXCAT 9) To load FIXCAT type F 10) Then type 4800<800.1FFFM 12) Place the blank disk in the drive and boot it with C600G 13) And BSAVE FIXCAT,A$4800,L$1C00 To get the picture, complete Steps 2 through 4. Then boot the backup. When the Applesoft cursor is displayed (] ), type BSAVE PICTURE,A$2000,L$2000 FIXPRG3 The last step is a fix for the SUPPLEMENT program. 15) Once again boot the original Bag of Tricks disk. 16) When the menu appears, open the drive door, press reset, wait a second and press reset again. 17) Enter the monitor and move the patch to a safer location. CALL - 151 5400<9400.96F FM 15 Book of Softkeys Vol. I 18) Change the program so that it will work at this new location 5485:55 5517:55 5530:55 5542:56 554A:56 19) Insert the blank disk and boot it C600G 20) Save this patch program BSAVE FIXPRG3,A$5400,L$300 21) Change the HELLO program to the following and you’re done! Hello Program 10 TEXT : HOME : HIMEM: 25600 20 IF PEEK (104 ) = 96 THEN 50 30 POKE 103 ,1 : POKE 104,96 : POKE 24576 ,0 40 PRINT CHRS (4) "RUN‘HELLO" 50 A= PEEK ( - 16384) - 128 : IF A= 70 ORA=73 ORA= 84 0RA=90 0RA=69 THEN 100 60 POKE - 16368 ,0 70 HTAB 10 : VTAB 10 : PRINT "LOADING'MENU. .." 80 PRINT CHR$ (4 ) "BLOAD*PICTURE, A$4000" : POKE - 16299 ,0 ; POKE - 16297 10; POKE - 16302 ,0 ; POKE - 16304 ,0 90 IF PEEK ( ~ 16384 ) < 128 THEN 90 100 A=0 :A$ = CHRS ( PEEK ( - 16384) - 128 ) : POKE - 16368 ,0 110 IF AS = "T" THEN AS = "TRAX" :A=1 : GOTO 170 120 IF AS = "Z" THEN AS = "ZAP" : GOTO 170 130 IF AS = "|" THEN AS = "INIT" : GOTO 170 140 IF AS = "F" THEN A$ = "FIXCAT” : GOTO 170 150 IF AS = "E" OR AS = CHRS (27 ) THEN TEXT : HOME : END 160 GOTO 90 170 TEXT : HOME : VTAB 11 : HTAB (13 + LEN (AS) ) / 2: PRINT "LOADING*" AS 180 DS = CHRS (4 ) 190 IF A= 1 THEN PRINT D$ “BLOAD“TRAX. SUP, A$8700" : GOTO 210 200 PRINT D§ “BLOAD*SUPPLEMENT , A$7600" 210 PRINT D§ “BLOAD*" AS " ,A$800" 220 PRINT D$ "BLOAD‘FIXPRG3,A$5400" 230 POKE 47016 , PEEK (43) : POKE 38079 ,A: CALL 21635 Getting Into The Program An alternate method would be to boot code trace the DOS. Book of Softkeys Vol. I 16 The boot process of Bag of Tricks is relatively simple but tedious, especially since it would have to be done five times (once for each program and once for the picture). That problem can be bypassed by taking advantage of an oversight by the authors. When reset is pressed the Apple tries to boot because the power-up byte is not set correctly. This is the byte that tells the Apple when it has been turned on. (See page 37 of the Apple ][+ Reference Manual). When the power- up byte is set improperly the Apple will try to boot regardless of the address pointed to by the reset vector. When reset is hit from the menu the Apple acts like it has just been turned on and tries to boot. When reset is pressed the second time the Apple is put into Applesoft. Loading The Programs In the sixth step of the save/load procedure the three bytes 4C 59 FF represent the machine language opcodes which tell the computer to jump to the routine that causes it to stop and enter the monitor (acting like a stop from Applesoft). Now after the DOS has loaded any of the programs, control will be given to the user, not to the program. Saving To Normal Disk The program is now in memory and the Apple is under control with the modified Bag of Tricks DOS in the machine. Unfortunately, it is far from normal and has no convenient SAVE or BSAVE. What now? Save it to tape? Perish the thought; a normal DOS can be rebooted. Since the booting process uses page 8 ($800-$8FF) in memory, which is exactly where the program starts, a special routine in the Apple’s monitor is used for moving memory out of the way. It simply transfers the part of memory which the program resides in byte by byte from one place in memory to another. By moving the programs higher in memory they are put in a safe area not used by the boot. That is what Steps 9 and 10 are for. Once the program is moved, the backup disk can be safely booted. Backup Files There should be nine files on the backup now: TRAX, TRAX.SUP, INIT; SUPPLEMENT, ZAP, FIXCAT, PICTURE, FIXPRG3 and HELLO. The HELLO program is simply a menu that allows the backup to imitate the original disk. The picture is the same as the one on the original disk. 17 Book of Softkeys Vol. I The other seven files make up the four major Bag of Tricks Programs (the other files are routines). Each program is in two parts, a main section and a supplement, but the supplements for INIT, ZAP and FIXCAT are the same. To run any of these programs, the accompanying supplement must also be loaded. To use TRAX, TRAX.SUP must be loaded first. For the other three programs, SUPPLEMENT must be loaded first. How To Run The Programs Because the programs were moved before they were saved, they will be loaded into the wrong spot if just BRUN or BLOADed. To make sure everything is in the right place, DOS has to be told where to place the program. FOR EXAMPLE: To run TRAX, first load in the supplement with BLOAD TRAX.SUP,A$8700. This loads the supplement into the correct place in memory. Then the TRAX program can be run with BRUN TRAX,A$800. Similarly, the supplement for INIT, ZAP and FIXCAT would be BLOAD SUPPLEMENT, A$7600. To run the program: BRUN INIT,A$800 (ZAP or FIXCAT can be substituted for the title INIT). Final Analysis All four Bag of Tricks programs are extremely useful. ZAP is an excellent disk editor with convenient help pages. It also has definable commands (a nice touch). INIT is the program that you needed to convert all your disks to DOS 3.3. It allows reinitialization without loss of data. FIXCAT is great for doing all of those tedious chores related to recovering crashed disks. There is only doubt about TRAX. Its sole use seems to be looking at the protection schemes on disks (it gives a great output for users of IOB). However, TRAX will not analyze the Bag of Tricks disk. If the authors couldn’t figure out how to analyze their own protection schemes, TRAX can’t be all that good. On the other hand, maybe it was deliberate. Maybe the authors are trying to say, ‘‘Break and copy other disks, but not ours!”” Book of Softkeys Vol. I 18 »>Bill Budge’s Trilogy Of Games California Pacific Requirements: 48K Apple ][ Plus BOOT13 (from DOS master disk) Trilogy of Games A blank diskette By Michael Decker One of Bill Budge’s earliest offerings was his Trilogy of Games: Driver, a rudimentary driving-skills game; Pinball, a rudimentary you-guessed-it, and Space Wars, a (I won’t say it) two-player space battle. This old, DOS 3.2 disk still sells, and Space Wars remains one of the most entertaining arcade-style games in which two players can directly battle each other. Most people often prefer it to newer, much more sophisticated games in which one battles the computer. I was motivated to de-protect the game by a slight bug (one player’s ship is more affected by gravity than the other ship) and by my annoyance with the game’s DOS 3.2 format. Inside Budge I first tried cracking the disk. Protection was simple: changes in the prologues/epilogues. However, it looked like direct disk addressing was used. Ugh. So, I booted with an Inspector/BASICS disk, then booted Trilogy. At the menu I reset out, then looked memory over: picture at $4000; program at $6000. Hmm. I then booted DOS and saved picture and program. Next, I restarted the program (6000G) and, in turn, loaded each game. I found the entry points and saved the games. Next, I examined the main program and identified the transition between the menu and the disk access routines. Finally, I wrote an Applesoft program to handle the game switching. Presto! The Transparent Budge! Doing It 1) Boot the DOS 3.3 System Master. PR#6 2) Prepare to boot 13-sector DOS BRUN BOOT13 19 Book of Softkeys Vol. I 3) Insert the Trilogy disk and press RETURN. 4) Hit ESC to get to menu. 5) Remove the disk and press RESET. 6) Press RESET again. 7) Boot the 48K slave disk. PR#6 8) Save the picture first BSAVE PICTURE, A$4000,L$2000 9) Enter the monitor CALL -151 10) Make this modification 67B7:4C D2 D7 11) Save the first 8 pages of this modified program BSAVE ATTRACT, A$6000,L$800 12) Restore the original program 67B7:20 00 6D 13) Insert Trilogy disk and re-start the game. 6000G 14) Hit ESC to get to menu. 15) Type 1 to select Driver, the first game in Trilogy. 16) When the title and/or instructions come up, hit RESET. 17) Swap disks and save the just loaded program BSAVE DRIVER,A$800,L$1801 18) Enter the monitor again CALL -151 19) Repeat Steps 13-18 for PINBALL and SPACE WARS using the same BSAVE parameters. 20) Coldstart BASIC and DOS FP 21) Type in the following BASIC menu ‘‘HELLO”’ program. 10 ON PEEK (104 ) = 112 GOTO 20 : POKE 103 ,1 : POKE 104 ,112 : POKE 28672 ,0 + PRINT CHRS (4) "RUNBUDGE. HELLO” 20 PRINT CHR§ (4) "BLOAD‘ATTRACT" 30 PRINT CHR$ (4 ) “BLOAD*P| CTURE” 40 POKE 10 ,76 : POKE 11 ,0 : POKE 12 ,96 : PRINT USR (0) : CALL - 10621 50 D§ = CHR§ (13) +CHRS (4) : VTAB 1 : ON PEEK (67 ) - 3 GOTO 60 ,70 ,80 60 PRINT D$ "BLOAD‘DRIVER" : CALL 3523 : RUN 40 Book of Softkeys Vol. I 20 70 PRINT D§ “BLOAD‘PINBALL" : CALL 2048 : RUN 40 80 PRINT D$ "BLOAD‘SPACE‘HAR™ : CALL 6015 : RUN 40 22) Save it SAVE BUDGE.HELLO I would sometimes get an ?0UT OF MEMORY ERROR. If you should encounter this, just type RUN 20 and you'll be fine. Now, would someone tell me how to make both spaceships feel the same gravity? 21 Book of Softkeys Vol. I >Boot Code Tracing By Bobby Requirements: Apple II One disk drive with Apple controller Apple Galaxian Empty 48K slave disk Knowledge of machine code/assembly language Boot code tracing is the most difficult of all the softkeys presented. It is also the most effective method of transferring single load binary programs, those which load into the Apple at Boot and do not access the disk again. Therefore, be warned that this softkey is definitely not for beginners. You must have some knowledge of machine code or assembly language. The initial Boot or Boot 0 is determined by a program on the disk controller card. This program is stored in ROM (Read Only Memory) and cannot be changed by the program on a disk. A non-standard format may be used on a disk to prevent copying, but that disk will not Boot on your Apple unless track 0, sector 0 is readable by the disk controller card. This means that you can also read it and, by controlling the boot process, you can determine where the program is and save it to disk. In order to demonstrate this process, the Boot of the binary program Apple Galaxian will be traced. This is a familiar game and almost everyone owns a copy. The Boot 0 code is at $C600. If your controller card is not in slot 6, then change the number after the $0C to correspond to the appropriate slot (i.e. Slot 5 would be $C500). First the code will be moved down into RAM (Random Access Memory) where a portion of it can be modified. Turn on your Apple, press RESET to halt the boot, then enter the monitor CALL -151 And type 9600<C600.C6FFM This will move the Boot code to page $96 ($9600), where the changes will be made. ~ NOTE: Commands will be on a separate line and printed exactly as you should enter them. Press return after each line entry. If a command has already been listed, it will be referred to but not listed again. Be sure you move the code to a page boundary that corresponds to the slot that your controller card is in (i.e. for slot 6 - $9600, $8600 etc. or for slot 5 - $9500, $8500 etc.). Book of Softkeys Vol. I 22 The reason for this is that the Boot 0 code contains a routine that finds which slot the controller card is in. It does this by calling a return code in the F8 ROM and extracting the return address to locate the page boundary. The code itself is relocatable (will run anywhere in memory). The purpose of Boot 0 is to transfer the code stored on disk at track 0, sector 0 into memory and to execute it. Then the disk code (Boot 1) will take over the Boot process. Here is where the first change will be made. Examine the code at the end of page $96. At $96F8 you will find a JMP to $801. This is the next Boot stage (Boot 1). Boot 0 needs to load and not run the Boot 1 code at page $08, so the code at $96F8 will be changed to JMP to the monitor after turning off the drive motor. In order to save having to reenter the same code, put the routine at $9500. 96FA:95 N 9501:AD E8 CO 4C 59 FF The base address $C088 is used to turn the drive motor off. You must add the slot number of your controller card to this address in the form $s0 where ‘‘s’’ is the slot (i.e. slot 5 would be $C088 + $50 = $COD8). If you’re not used to hexadecimal numbers, there is a table on page 82 of the Apple ][+ reference manual with the base addresses and conversions for each slot. After making the changes and checking that they are correct, you are ready to begin. Run the code at $9600 (Boot 0). $9600G When the drive stops, Boot 1 will be in memory at page $08. Tf you examine the code at $800 you will see that it is written to run at page $02. The first part of the code is a move routine that transfers the code from page $08 to page $02, then JMPs to page $02. Boot 1 should be moved to page $98 so you can make changes. The code must be moved or else the next time you run Boot 0, it will be overwritten. 9800<800.8FFM Now the modified Boot 0 can be linked at $9600 to the Boot 1 code at $9800. The move routine should then be changed so it will work at its new address, and the JMP to the next Boot stage should be changed to the routine at $9500. 96FA:98 N 9805:98 N 9843:95 The ‘‘N”’ is used as a null command to separate changes. It is the monitor command to set normal mode and does nothing, since you are already in normal mode. After you have made the changes and checked that they are correct, run the code at $9600 again. When the drive stops, Boot 23 Book of Softkeys Vol. I 2 will be in memory at page $03. Move the code at $300 to $9300. 9300<300.3FFM The exit from Boot 2 is via an indirect JMP at $9343. This JMP normally points into itself. Rather than write any additional code to check when this JMP is changed, allow the code at $300 to be called as a subroutine and change the indirect JMP at $9343 to point to $9501. This works because the JMP at $9343 is not seen until Boot 3 is completely loaded. Link Boot | to Boot 2 and run Boot 0 again. 9343:4C 01 95 N 9843:93 N 9600G Boot 3 is now in memory. Location $93CC holds the page minus 1 of the start of Boot 3. You should find a $B6 there. That means that Boot 3 starts at page $B7 or $B700 in memory. This is the final Boot. This stage will load the main program. Boot 3 is large and would be cumbersome to modify if moved. It can remain right where it is and the Boot 2 code can be changed so that next time it will load in a different location. The page number that Boot 2 uses when it loads Boot 3 from page $B6 to page $D6 will be changed. 9313:A9 D6 EA This will cause Boot 2 to try to load the Boot 3 code into the space occupied by the monitor. Since the monitor is in ROM (Read Only Memory), nothing will change and the Boot 3 code at $B700 is protected. At $B749 is a routine that garbages the Boot 3 code after it loads in the program. At $B759 is a JMP to $600. This is the actual start of the program. Since $600 is in the text page, the boot with the code can’t just be stopped at $9501. If this were done, the code on the text page would scroll or be over-written. The code needs to be moved up to some safe place in memory. Also, the end of the program is at $4000 (my guess), which is the same place that DOS resides on a normal disk. The Galaxian Logo is on HIRES page 1 ($2000-3FFF). It is reasonable to assume that this is a safe place and that no code exists there. The logo will be lost, but the memory is needed. The following code is a routine that compresses memory by moving page $00 thru page $08 up to page $20, and moving page $40 thru page $9F down to page $29. B000:A2 00 BD 00 40 9D 00 29 B008:E8 DO F7 EE 04 BO EE 07 BO010:B0 AD 04 BO C9 A0 90 EA B018:A2 00 BD 00 00 9D 00 20 B020:E8 D0 F7 EE 1C BO EE 1F Book of Softkeys Vol. I 24 B028:B0 AD 1C BO C9 09 90 EA B030:4C 59 FF B000.B032 After entering the code, link Boot 3 to it and link Boot 2 to Boot 3 B749:4C 00 BO N 9343:4C 00 B7 Check to see that all the changes are correct, then run Boot 0. When the drive stops you should see a lot of inverse and flashing characters on the screen. This is the portion of the program that is loaded into the text screen area. An image of this code is safely stored at $2000. Remove the backup copy of Apple Galaxian and insert the 48K slave disk in the drive. Boot the disk and enter the monitor. There are a few more changes to make before the file can be BSAVEd. The binary program that you are going to save is 132 sectors long. DOS will not normally allow you to save a file this long, so change the range limitation in DOS from 32K to 64K. A964:FF When the slave DOS was Booted, it over-wrote the code on page $08. An image of the page $08 code was saved at $2800. Move this code down to page $08. 800<2800.28FFM Now all that is left is to enter the routine that will move the program back to where it will run. This routine also disconnects DOS and selects the hi-res screen before it JMPs to $600. 2800:A2 00 BD 00 88 9D 00 9F 2808:E8 DO F7 CE 04 28 CE 07 2810:28 AD 04 28 C9 29 BO EA 2818:BD 00 20 95 00 BD 00 21 2820:9D 00 01 BD 00 9D Add a JMP at $7FD to the move routine, and you are ready to BSAVE the file. TED:AC 00 28 BSAVE GALAXIAN, A$7FD, L$8103 25 Book of Softkeys Vol. I Now that it is safely stored on the disk, you can run it and discover how much of the memory that was saved is really used. More often than not, all of memory is not used. A large part of what was saved is not required by the program. BLOADing the file and erasing pages before you run the program is the simplest way to determine what sectors are necessary. You could determine if there is sufficient memory that is not used and retrace the Boot code in order to save the HIRES picture. This is a fine point that is not required and is left up to the reader. Book of Softkeys Vol. I 26 >Boot Code Tracing: Revisited By Mycroft Requirements: Knowledge of machine language 48K Apple ]{ with Integer Card Multi-Disk Catalog by Sensible Software One blank initialized disk If you have a little knowledge of machine language programming, and a good measure of perseverance, this article will help you to defeat the locking scheme used in a large group of programs (those that boot up and run without subsequent disk access) and let you capture them on standard DOS. Most games and many utility and business programs fall into this category. The Theory The basis for this approach is: No matter what protection scheme is used, the program must boot on a standard Apple in order to run. If we could somehow step through the boot process, get everything loaded, and then stop just prior to going to the start of the program, we would be able to save the whole thing and run it under standard DOS. The APPLE Boot process starts with Boot 0 in the Disk Controller ROM. This short machine language program BLOADS track 0, sector 0 (containing Boot 1 of the disk being booted) at locations $800 thru $8FF, and then jumps to $801 to execute Boot 1. Boot 1 reads Boot 2, and the process continues through successive Boot stages until finally the main program is loaded and run. Assuming your disk controller card is in slot 6, the code for Boot 0 starts at $C600 and extends through $C6FA. If you power up your APPLE, enter the monitor and. do a ‘‘C600L’’, the beginning of the disassembly listing of Boot 0 can be seen. If you type a few more L’s you will be able to see the jump to Boot 1 at $C6F8. What we would like to do is execute Boot 0, but stop before jumping to Boot 1. But, how is this done? Reset The RESET routine is at $FF59 in the monitor ROM. It performs a function similar to pushing the RESET button. If called, a RESET cycle is performed and any executing program will be stopped. If we could get Boot 0 to jump to $FF59 instead of $801, we will have accomplished our first objective. 27 Book of Softkeys Vol. I Modifying Boot 0 Since Boot 0 is in ROM, it cannot be directly modified. The solution is to move it to RAM using the monitor’s memory move routine so we can change it to suit our needs. The new location should be somewhere in RAM where it will not be overwritten in successive Boot stages. Memory that is just below DOS is usually safe to use, since many locked programs use only slightly modified versions of normal DOS. Because of the routine in Boot 0 that finds the slot the Disk Controller is in, the second digit of the address we move Boot 0 to must be the same as the slot number. So let’s use $9600-$96FF. The First Step From the monitor, type 9600<C600.C6FFM to move Boot 0 and, instead of jumping to $801 at the end, have it jump to RESET by entering 96F8:4C 59 FF Now put a program disk in drive 1 and execute the modified Boot 0 by typing 9600G The drive will start, and in a second or two you should hear a beep and see the monitor prompt on the screen. Turn off the drive by typing COE8 Now you can have a look at Boot | by listing from $801 to see what it does 801L This process can be repeated for each successive stage in the Boot process. Whenever there is a jump out to a new code section, put in good old 4C 59 FF (JMP to RESET). You can examine this code at your leisure. Don’t worry about the code at this point. Look mainly for JMP’s out. A Practical Example To illustrate the procedure, I will use the program ‘‘Multi-Disk Catalog III’’, by Sensible Software. This program is an excellent and very useful utility (which I would recommend you purchase and add to your library.) Because I have examined dozens of Book of Softkeys Vol. I 28 other programs which use a virtually identical Boot sequence, I am sure they can be unlocked using this same technique with only a few changes (try one of your own once-load programs if you don’t have Multi-Disk Catalog). You'll need an initialized slave diskette and make sure there is a write-protect tab on the disk you are trying to unlock. Unlocking Multi-Disk Catalog II BOOT 0 Turn on your APPLE with the disk drive empty and push RESET to stop the drive. This will keep the APPLE’s memory clear. Insert the locked disk and type CALL -151 Type 9600<C600.C6FFM to move Boot 0. Then fix the jump out by typing 96FA:98 This changes the jump out to $9801 where, in the next step, we will be moving Boot 1. At $9801 type 9801:4C 59 FF so we can stop the Boot. Now type 9600G After the beep, type COE8 to turn off the drive. BOOT 1 Look at Boot 1 by typing 801L This code relocates itself to memory page two, loads Boot 2, and jumps out to $301 at $841. Move this code so it can be modified, by typing 9800<800.8FFM Fix the jump out to go to $9301 by typing 9843:93 29 Book of Softkeys Vol. I and stop it at that point with 9301:4C 59 FF One other byte in Boot 1 must be changed so that our modified code is executed properly. Type 9805:98 Now doa 9600G once again, and type COES to stop the drive. BOOT 2 The next stage of the Boot normally starts at $301. Move this code by typing 9300<300.3FFM Take a look at the disassembled listing of the code beginning at $9301. The JMP out of this stage can be seen at $9343, but it is disguised by being an in direct JMP through page 0 location $3E. If you examine the code in this Boot stage beginning at $931F, you will find that this indirect jump is used repeatedly to go to $25D, but ultimately, the indirect jump address is changed to go to the next Boot stage. This change occurs at $933A-$9341. The final jump is determined by the byte stored in memory location $3CC, which the program increments by 1 before executing the final indirect jump. If you look at byte $3CC $3CC you will find that it contains value $36 (other programs commonly use $B6 here). This is the high byte of the jump-to address (the low byte has value $00).The program increments this value by 1, so the final JMP address is to $3700. What we want to do is let the Boot do all the jumps when it is going to $25D, but stop it before it makes the final jump out to $3700. Handling The Indirect Jump Because zero page location $3E contains the value $5D for all the indirect jumps except the final one, we can put in a subroutine which checks to see if this value changes and, if so, stops the boot. Book of Softkeys Vol. I 30 Enter 9000:A9 5D C5 3E D0 03 4C SD 9008:02 4C 59 4C 59 FF The source code for this routine would look like 9000-A9 5D LDA #$5D Load value. 9002-C5 3E CHP $3E Same? 9004-D0 03 BNE $9009 No, go RESET 9006-4C 5D 02 IMP $025D Yes, goon. 9009-4C 59 FF SMP $FF59 Jump RESET. Change the Boot code to jump to this subroutine by typing 9343:4C 00 90 and do another 9600G BOOT 3 At the beep, you can stop the drive (COE8) and examine the code beginning at $3700 looking for the next jump out. It is at $3747, and is a jump to $1B03. So, as before, change this jump by typing 374 7:4C 59 FF Writing To The ROM The code we moved to memory page $93 ($9300) was responsible for reading in this portion of the Boot. But since we just made a change at $3747, we don’t want it to be over-written when we start the Boot over again. What we do is change byte $93CC so that a dummy write is done by letting it ‘write’ to the ROM! 93CC:D0 and also changing bytes $9315 and $933E to reference this location instead of $3CC. Type 9315:93 933E:93 The ‘‘write’’ of the next Boot stage; therefore, begins at $D000, and is ineffectual except to keep the drive running and in the proper read mode. Change the subroutine we put in at $9000 to go to the modified next stage by typing 9009:4C 00 37 31 Book of Softkeys Vol. I Now type 9600G one last time. This time when you hear the beep, the drive will stop by itself. Start listing the program at $1B03, looking for the next major jump out. You should find it at $1C25, and it is a jump to $1E54. Type 1C25:4C 59 FF 1B03G Now list beginning at $1E54. There is an immediate jump to $9D84. List from $9D84. Language Card? At $9DE4 and $9DE7 are two indirect jumps, through $9D5E and $9DSC, respectively. Examine the code carefully, beginning at $9D84, and you will find that the first indirect jump is taken by systems equipped with language cards (RAM cards), and the second for those without. No matter; the second indirect address will ultimately be jumped to whichever system you have. To find out what it is, type SDE7:4C 59 FF 9D84G- When you hear the beep, type SD5C.9D5D and the screen will display (low byte first) the address indirectly jumped to as $33D5. Begin listing from $33D5 and you should find the next JMP way down at $34BC; it goes to $00FD. Once again, type 34BC:4C 59 FF 33D5G. The disk drive will start and the last segment of the program will be loaded in. If everything worked correctly you should hear a beep, the drive will stop, and the screen will display garbage. Where The Program Starts Normally, the program would next jump via the page zero location we just changed at $34BC to the start of the multi-disk catalog main program. Type O0OFDL to see where the start is. Book of Softkeys Vol. I 32 The software protectors have put one last obstacle in our path. $00FD takes an indirect jump through page zero locations $4E and $4F to the start of the program. We can’t examine these locations to find out where the jump goes because they get changed when a RESET cycle is executed. Not to worry, though, because if you type 348FL you can see that locations $4E and §4F are set from $33C0 and $33C1, respectively. Typing 33C0.33C1 will thus divulge (low byte first) the starting address of the main program as $1294. The program occupies memory from $800-$18FF, $5000-$5CFF, and $9D00-$BFFF. You find this out by scrolling through memory to try and identify program statements and data, often a trial and error process. If you get too much, no real harm is done, but too little and the program will not run. All that remains to be done is to capture the program under normal DOS. Moving The Memory Warm Booting a slave diskette will over-write memory locations $800-$8FF and $9600-$BFFF, but everything from $900-$95FF will be unaffected. To move the ‘‘lower”’ part of the program ($800-$1800) up and out of the way of the Boot, and adjacent to the ‘‘middle’’ part, type 3F00<800.18FFM Similarly, move the ‘‘top’’ part of the program down by typing 5D00<800.BFFFM Type the following relocation routine, when the program is BRUN, everything will return to its proper place: 3ED0:00 00 A9 5D 85 3D A9 7F 3ED8:85 3F A9 9D 85 43 20 F3 3EE0:3E A9 3F 85 3D A9 4F 85 3EE8:3F A9 08 85 43 20 F3 3E 3EF0:4C 94 12 AO FF 84 3E C8 3EF8:84 3C 84 42 20 2C FE 60 33 Book of Softkeys Vol. I The source code for this routine looks like: 3ED2- A9 5D LDA #$5D SET UP SED4~ 85 3D STA $3D ADDRESS DATA 3ED6- AQ 7F LDA #$7F FOR MEMORY 3ED8- 85 3F STA $3F WOVE ROUTINE 3EDA- AQ 9D LDA #$9D FOR TOP OF SEDC- 85 43 STA $43 PROGRAM. SEDE- 20 F3 3E JSR $3EF3 “WOVE" SUBR 3EE1- AQ 3F LDA #$3F 00 IT AGAIN 3EE3- 85 3D STA $3D FOR ‘BOTTOM' SEES- AQ 4F LDA #$4F PART OF PROG 3EE7- 85 3F STA $3F 3EE9- A9 08 LDA #808 SEEB- 85 43 STA $43 SEED- 20 F3 3E ISR $3EF3 SEFO- 4C 94:12 SMP $1294 PROG START 3EF3- AO FF LOY #SFF SEF5- 84 3E STY $3E 3EFT- C8 INY SEFB- 84 3C STY $3 SEFA- 84 42 STY $42 SEFC- 20 2 FE JSR $FE2C MONITOR MEM 3EFF- 60 RTS WOVE The Final Test Now remove the protected disk from the drive, replace it with a normal DOS (slave) disk and type 6=P (Hold the © key down and press ‘‘P’’, then release the @ key and press RETURN). When the Boot is complete, type BSAVE MDC,A$3ED2,L$412E Your unlocked program will now BRUN normally and can be customized as you see fit. Try this procedure with your other ‘‘one-shot’’ load programs. You will probably be surprised at how often it works. Page zero locations changed by RESET: $20-$2B $31 $33-$3F $40-$49 $4E-S4F Book of Softkeys Vol. I 34 >Buzzard Bait Sirius Software Inc. Requirements: 48K Apple, with old F8 monitor ROM One disk drive with DOS 3.3 Initialized 48K Slave DOS 3.3 disk Buzzard Bait By Clay Harrell Sirius Software always provides us with games that are challenging both in play and protection. Buzzard Bait is no exception. If you try copying the disk with your favorite nibble copier, you will find that the people at Sirius have done their homework in discovering ways to defeat you (but we have come to expect that from this fun-loving bunch). Not being one who enjoys watching the bytes go by for hours with a copier, I tend to think there is a better way. Although the Sirius people have gone to great lengths to protect their disk from the bit bunch, they failed to protect the memory to any great extent. (A Note for Replay-Wildcard owners: Sirius hasn’t forgotten you either! Just enough disk access has been put in to discourage any easy copies). Once the game is done with its load and the little red light goes out, RESET should be the next key pressed and the monitor prompt should appear. Snooping through memory and checking all the ‘‘standard’”’ starting locations reveals that an 8000G will start the game up just as if nothing happened! Further examination of memory reveals that Buzzard Bait lives from $800 to $9800. Now all we must do is move the portions of memory that get destroyed in a Slave disk, boot to a safe location and save the game as a BLOADABLE file. Hi-res page one is a perfect candidate for this since it gets re-drawn upon starting the game and, therefore, does not need to be saved. We must also defeat the disk access that occurs between all levels. This access does not load any data, but just checks to see if the disk is present. In cookbook fashion, here is what we must do: 1) Boot Buzzard Bait. 2) Reset into monitor after the drive stops. 3) Move the code from $800 through $1000 up to $2000 2000<800.1000M 35 Book of Softkeys Vol. I 4) Move the code from $9600 through $9800 down to $3000 3000<9600.9800M 5) Boot a 48K normal DOS 3.3 Slave disk 66P 6) Reduce the number of DOS buffers to one MAXFILES1 7) Enter the monitor CALL -151 8) Move the code at $2000 through $2800 back down to $800 800<2000.2800M 9) Move the code at $3000 through $3200 back up to $9600 9600<3000.3200M 10) Save the first chunk of code BSAVE BAIT2,A$4000,L$5800 11) Make two patches that bypass the disk access between levels TFD:4C 00 20 2000:A9 18 8D B5 B7 A9 60 8D 2008:B6 B7 4C 00 80 12) Save the second chunk of code BSAVE BAIT1,A$7FD,L$1811 13) Enter the following Applesoft program: 1 HIMEM:16284 2 D$ = CHR$(4) 3 PRINT D$ ““MAXFILES1” 4 PRINT D$ “BLOAD BAIT2” 5 PRINT D$ “BRUN BAIT1” 14) Save the Applesoft program SAVE BUZZARD BAIT This softkeyed version of Buzzard Bait you have created is not an exact copy of the original because the backup does not have any sound effects. To me this is an acceptable tradeoff for the security of not having to wear out my original game disk. Perhaps with the information I have provided, someone out there can produce a softkey procedure that retains those annoying sound effects we have all come to love. Book of Softkeys Vol. I 36 »>Cannonball Blitz Sierra On-Line, Inc. Requirements: Apple ][+ or equivalent COPYA A sector editor Cannonball Blitz One blank disk By Staff Here is a short APT for Cannonball Blitz which will reduce the hazards encountered on the second level of play. After finishing Level 1, just press the space bar and the repeat key simultaneously (or press the space bar continuously if you have automatic repeat) until the screen changes to the next level. When play begins at the second level, the number of cannons will have been reduced to only two. And a Quick Softkey. . . To copy the entire disk, use COPYA. Then, using a sector edit program such as DiskEdit, read Track 17, Sector OE, and change address CD from 49 to 60. Finally, write the sector back to the disk. This backup copy can be copied using any of the numerous copy programs on the market. To run the program, simply boot the disk. 37 Book of Softkeys Vol. I >Casino By Leonard Nadel, DDS To unlock the disk Casino so it can be accessed and backed-up with COPYA, use the same method as for Zork. (See table of contents.) No changes in the sector mode are necessary! Book of Softkeys Vol. I 38 >Data Reporter Synergistic Software Requirements: 48K Apple }[+ COPYA Data Tr One blank disk By Don Halley The Data Reporter, from Synergistic Software is advertised as Version 2 of the popular modifiable database system. It is basically a data storage and retrieval system with graph plotting capabilities, a text editor, and many data management features. Documentation for Data Reporter is fairly complete, although it suffers from the same unimaginative approach to organization as does the documentation for its competitors. There is no index and the table of contents offers no help beyond one or two-word references to program features. A tutorial section would be appreciated by the uninitiated user, and a reference table containing pointers to key sections would help. Normal Copy The documentation suggests that a copy of the original disk be made for general use in order to prolong the original’s life. The COPYA program on the DOS System Master may be used, but it will encounter a read error on the last track. This track has been written with a modified DOS and its contents are read into memory via a short machine language program appended to the last line of the HELLO program. This means that you must always boot from the original, then swap to your application disk for processing. Unprotected Copy A little PEEKing around will reveal that the protected sectors are from $00 to $06 on track $22, and that the information contained there is loaded into memory from $9400 to $9AFF. Examination of the HELLO program shows that it does not touch this area upon exit. This means that both a way of reading the protected portion of the disk into the proper memory locations (HELLO) and a clean exit have been provided. Here’s the step-by-step procedure: 1) Make a copy using COPYA. (Ignore the read error.) 39 Book of Softkeys Vol. I 2) RUN the HELLO program on the original disk. 3) Choose the QUIT option from the primary menu. 4) Replace the original disk with your copy. 5) Type these commands: BSAVE HELLO.OBJ, A$9400, L$06FF LOCK HELLO.OBJ UNLOCK HELLO 63999 PRINT D$ ““BLOAD HELLO.OBJ” : RETURN SAVE HELLO LOCK HELLO PR#6 You now have a fully operational backup for only the cost of . the disk itself. Of course, you may make as many additional backups as you like from this disk. Book of Softkeys Vol. I 40 >Demuffin By Bobby Requirements Apple J[, I{+, //e with 48K One disk drive Blank initialized disk DOS 3.3 Master disk with MUFFIN Programmers Aid ROM Muffin is a program on the 3.3 DOS Master disk. It is used io transfer 13-sector files to 16-sector disks. To accomplish this, it contains an image of 13-sector RWTS (Read or Write a Track and Sector). It uses this internal RWTS to read the file and then writes to your diskette using the external or resident DOS. Demuffin is created by changing the jumps in the program so that it uses the resident DOS to read and the internal RWTS image to write. Also, the internal RWTS is changed from a 13 sector image to a 16 sector image. 1) Boot the DOS 3.3 Master disk PR#6 2) Switch to Integer and load MUFFIN INT BLOAD MUFFIN 3) Enter the monitor and initialize the Programers Aid Code- Relocation feature CALL -151 D4D5G 4) Tell the relocate routine what we’re moving and where it goes 1900<B800.BFFFEY+ 5) Move the first Code segment down to $1900 1900<B800.BA108Y 6) Move the data segment -BC57™M 7) Move the last code segment -BFFFEY 8) Make the following patches 1155:00 1E 41 Book of Softkeys Vol. I 115B:D9 03 1197:A0 20 15A0:A0 D2 C5 D3 C9 C4 C5 CE 15A8:D4 A0 C4 AE CF AE D3 AE 15F7:C4 CS 20A0:A9 1E 8D B9 B7 20 FD AA 20A8:48 A9 BD 8D B9 B7 68 60 9) Save the new DEMUFFIN program. BSAVE DEMUFFIN, A$803,L$1900 Directions & Explanations Demuffin directions are identical to Muffin’s. You want to convert the files, so you have to select the disk slot and drive and the file name you want to convert. It is helpful to type = for the file name so that all the available file names will be displayed when you answer yes to the question: ‘‘Do you want prompting?’’. Now you can choose which files to convert (transfer). If a file doesn’t transfer and you get an I/0 ERROR, you’ll be returned to the menu. Just repeat all the steps but don’t bother converting the files you have already converted, and bypass the problem file (it probably isn’t needed by the program anyway). Continue to convert as many files as you can. Book of Softkeys Vol. I 42 >DiskEdit By Charles Haight Certain tools are required to understand DOS and to manipulate disk files. The first is a nibbler or bit editor. The second and most important of these is a sector editor. DiskEdit is one such utility. DiskEdit is a user oriented direct disk access program. Simply stated, DiskEdit allows the user to read or write any sector on a disk. This means that the user can: Directly edit files on disk. Change text in binary files. Insert illegal characters in REMs. Directly alter data base files. Move sectors (even between disks). Repair crashed disks. Format catalog names. Remove illegal codes in file names. Write flashing and inverse titles. Repair the VTOC. UnDELETE deleted files. Hide file names. DiskEdit will display an entire sector as hexadecimal and ASCII. The keyword in DiskEdit is simplicity. The commands are single key entry (you don’t have to keep hitting return). With DiskEdit you can directly enter control, inverse, flashing and lower case characters. Input and display information can be in hex or decimal. The shimmering cursor is easy to identify even with a screen full of inverse and flashing characters. You can jump the cursor to any absolute position within a sector. The NEXT and LAST commands allow you to single-step through track/sectors. And DiskEdit has a simple escape. If you change your mind, pressing the escape key will set the defaults and return you to the command mode. Disk Overview Before we begin entering DiskEdit, let’s take a closer look at DOS and a normal disk. The flexible (or floppy) diskette can be thought of as a disc- shaped piece of recording tape, and essentially that’s all it is. A flat disk shape is used, instead of a flat strip (as in a tape), in order to maximize the rate of data transfer. For instance, to transfer data to and from a tape, the computer would have to READ all of the tape preceding the area where the data was stored before it could transfer the required data. This method of 43 Book of Softkeys Vol. I information retrieval is known as ‘‘sequential access”’ and is about the same as scanning a cassette tape for a favorite song. The disk, on the other hand, is set up in such a way that the computer can go directly to a piece of data or program by scanning the disk laterally. This method of information retrieval is known as “‘random access’’ and is similiar to selecting a particular song on a record. Before a disk can be used, it must be formatted. The INIT command is used for this purpose. When a disk is initialized, the Disk Operating System (DOS) writes 35 concentric tracks. Each track is divided into 16 blocks called “‘sectors”’. (DOS version 3.2 writes only 13 “‘sectors’’.) Each sector contains an address mark and a data mark. These marks start and end with a unique pattern of bytes. The address mark tells the DOS what track/sector it is currently reading. It contains the volume, track, sector and checksum information. The data mark contains the actual data. It tells the DOS where the data begins and ends and includes a checksum that is used to verify the accuracy of the data. If you have ever tried to load a program and the disk drive started making a slight chatter, chances are that the DOS could not read one of these markers. It then recalibrates the read/write head by moving it back to track zero and stepping (counting each track that it passes over) back out to where it was supposed to be. The tracks are numbered from $00 (0) to $22 (34) and the sectors from $00 (0) to $0F (15). Tracks $00 through track $02 {a total of three tracks; zero, one and two) contain the DOS program. The DOS gives the Apple the ability to manipulate data on a diskette. In this program are all of the commands related to controlling the disk drive (i.e. CATALOG, INIT, LOAD...) and a set of ERROR messages which, unless you either are a magician or don’t use the Disk II, you have probably seen before. The disk controller card that connects the Disk II to the Apple also has a small program on it. When you boot a disk, this program tells the Disk II to read track $00 (0), sector $00 (0) (remember, we start counting at zero instead of one) into memory. The program on track $00, sector $00 contains the information required to read in sectors $00 through $09 on track $00. The Program on sectors $00-$09 reads in the remaining information on track $00-$02. When this process is completed, the entire operating system (DOS) will be in memory. At this point, DOS takes over and runs the ‘““HELLO”’ Program. The program that was used to initialize a disk is usually refered to as the hello or greeting program. Book of Softkeys Vol. I 44 In order to find your ‘‘HELLO”’ program, DOS goes to the Volume Table of Contents (VTOC) and Directory located on track $11 (17). The VTOC and Directory are used by DOS whenever you read or write to the disk. The VTOC or ‘“‘bit map”’ shows which sectors are in use and which are free. The second and third byte of the VTOC point to where the directory starts. The Directory begins on sector $0F (15) and continues down to sector $01 (1). The second and third byte of each directory sector point to the next available sector. If these two bytes are zero, then there are no more sectors. The Directory contains a list of all the files on the disk. Each entry contains a pointer to the track/sector list, a file status (locked/unlocked) code, a file type code (1 letter), the file name (30 characters) and the file size. The track/sector list is a list of track/sector pairs that are used to store that program. This is why saving a blank file always takes two sectors. One for the blank file and one for the track/sector list. DOS will read the VTOC which will point to the directory. DOS then finds the program name in the directory and finds where the track/sector list is. DOS then loads all of the track/sector pairs into the proper memory locations. Finally, DOS transfers control to the resident BASIC (Applesoft?) which will run the program. Entering the Program Enter the machine code portion of DiskEdit first. Save it to disk as ED.OBJ., BSAVE ED.OBJ, A$800, L$A21 Enter the BASIC listing and save it to disk as ED.BAS. SAVE ED.BAS Bload the binary file. BLOAD ED.OBJ Type ‘‘RUN” and press return. After the “‘7UNDEF’D STATEMENT ERROR” message, run ED.BAS. RUN ED.BAS This will combine the two programs to form DiskEdit. Type ‘X’ to exit to BASIC. Now, insert a blank disk in the drive and type ‘INIT DISK EDIT’. Use this back up copy for the following examples and ALL other uses. Getting Familiar This exercise will aid you in understanding how to use the commands by taking you on a tour of a normal DOS diskette. 45 Book of Softkeys Vol. I Please read each paragraph before pressing any keys and follow the directions carefully. Insert the DiskEdit back-up disk in Drive 1. Turn on your computer. DiskEdit will prompt you when it is ready. Press any key to start. What is your status? On the bottom of the screen are the status indicators and prompts. They tell you the slot (SL), drive (DR), track (T), sector (S), volume (V), byte position (B), filter (F) and data entry mode currently selected. Reading Press the ‘R’ key. This tells DiskEdit that you want to READ a sector from the disk. A flashing prompt will appear next to the track (T) indicator. DiskEdit is asking you what track to read. Type ‘01’. This tells DiskEdit that you wish to read track $01 (1). The flashing prompt will move over to the sector (S) indicator. Respond to this prompt by typing ‘8’. The disk drive should whirr for about two seconds, and then stop. The screen should be full of numbers and letters. You are now looking at the contents of track $01 (1), sector $08 (8) in what is known as hex or hexadecimal format on the left side of your screen and ASCII on the right side. Hex a what? Hexadecimal is a base sixteen numbering system. It gets its name from the fact that it contains all of the numbers found in normal base 10 (decimal 0-9) plus six alphabetic characters (A thru F). Say ‘AS-KEY’ ASCII stands for ‘‘American Standard Code for Information Interchange.’’ This is the alphanumeric equivalent of all of those hex symbols on the right. Error messages The sector you are now viewing ($08) contains the DOS error messages (they are continued on sector $09). Press the ‘N’ key. This will increment the sector count and cause Diskedit to read the next sector. If the sector count had been at $OF (15), the track count would have been incremented by one and the sector count reset to $00 (0). The ‘Boot’? Program You are now viewing the sector where the ‘‘Boot’’ program name is stored. In the center of the screen is the file name “DISK EDIT’. This is the name of the program that the DOS Book of Softkeys Vol. I 46 will automatically ‘RUN’ when this disk is booted. (If you decide later to change the boot program name on this disk, this is where you should come.) Let’s follow how DOS located the file “‘DISK EDIT’’ when you booted this disk. Press ‘R’ to read. Type ‘11’ for the track and ‘0’ for the sector. You are looking at the VTOC or bit map. The second and third byte point to the first directory (catalog) sector. These bytes should be ‘11 OF’. Press ‘R’ and type ‘11’ for the track and ‘F’ for the sector. The sector you are viewing is the first part of the directory, which extends downward to sector $01 (1). Press the zero key. This is a special function key designed to make viewing catalog sectors more meaningful. The screen will return to normal when you press any other key. Moving the cursor The I, J, K and M keys are the cursor movement keys. The cursor has a wrap around feature. If you go off the screen on one side, you will come back on the opposite side. Press the ‘O’ key. The flashing prompt will appear next to the byte position (B) indicator. This command allows us to move the cursor to a specific location on the screen. Move the cursor to the beginning of the file name by typing ‘OE’. The cursor should now be in front of the ‘D’ of “‘DISK EDIT’. Move the cursor back one character by pressing ‘J’. Look at the hex portion of your screen. The ‘02’ is used by DOS to tell what type of program DiskEdit is and whether it is locked or unlocked. The ‘0’ means that the file is unlocked. The ‘2’ means the file is Applesoft. Editing Press the ‘E’ key. This tells DiskEdit that you wish to edit the sector. Type ‘82’. Press ‘ESC’ to exit the EDIT mode. Press the Oo key. Type ‘2C’. The byte you are looking at and the ‘00’ following it are the hex equivalent of the sector use count for the file. Press the ‘E’ key. Type ‘00’. Press ‘ESC’ to exit the EDIT mode. Press the zero key. The program HELLO is shown with an asterisk. Changing the ‘02’ into a ‘82’ locked the file. Entering the ‘00’ will change the sector count for the file to zero. 47 Book of Softkeys Vol. I Writing WARNING: Read the following paragraph completely before you press any keys. Up to this point, you have only been editing the disk information that is in the computer’s memory. In order to make the changes permanent you need to WRITE this information back to the disk. The command to do this is ‘W’ for WRITE. Press the ‘W’ key. Press ‘RETURN’ for the track (T) and sector (S). When the RETURN key is pressed in response to a prompt the program will act as if the default values were entered. The default values for the track and sector are the last track/sector that was read or written. The program will beep and a warning will be printed. This is your last chance to change your mind. You must press RETURN to have DiskEdit write to your disk. Any other key will abort this operation. Press RETURN. The buffer contents are now written to the disk. Press the ‘C’ key to see the catalog. The first file will be locked (indicated by the asterisk ‘+’ next to the file type) and the sector count will be ‘000’. Press any key to continue. This completes the exercise. Experiment with DiskEdit using this same scratch diskette. Summary of Commands ESC This is the “I changed my mind’? key. Press this key to reset defaults and exit back to the command mode. RTN_ The RETURN key, when used to answer an input Prompt, will accept the current default and continue. (Example: When prompted for the track and sector during a read command, pressing RETURN twice will cause the current track and sector to be read.) > Track skip command. Increments the track number and performs a READ. Does not increment the sector. <_ Track skip command. Decrements the track number and performs a READ. Does not decrement the sector number. A Sets character entry mode to ASCII B Disassemble buffer command. Calls the monitor to disassemble buffer contents starting at the cursor location. Use the space bar to continue disassembly one line at a time or press RETURN to disassemble 20 additional lines. Press ‘P’ to print the screen display. (Press ESC to exit.) C Displays the disk catalog using the current slot and drive. Prints the number of free sectors on the disk. D_ Flips the active drive from 1 to 2 or from 2 to 1 on each keypress. Book of Softkeys Vol. I 48 E_ A continuous-edit mode, this mode allows you to type changes just like on a typewriter. Pure cursor movement is supported using control keys. If you are in hexadecimal format, only valid hex digits are accepted as input. In ASCII format all keys are valid except the control keys listed below. (Press ESC to exit.) Ctrl Key Function set FLASH mode set INVERSE mode set NORMAL mode move cursor up move cursor down move cursor right move cursor left + This edit submode is entered using the plus (+) key. The ‘>>EDIT<<’ prompt is changed to ‘+ +EDIT+ +’. It is identical to the normal edit mode except that it does not support control functions. All keys are valid except ESC. Control characters may be directly entered. The plus (+) key or the semi-colon (;) may be used to enter this submode. F This is the filter format command it allows you to change the filter values so that you can configure your own filters. G Turns the sound on or off each time you press the ‘G’ key. (Default at BOOT is on.) H_ Sets character entry mode to Hexadecimal I Moves cursor up. J = Moves cursor left. Moves cursor right. Moves cursor down. Reads last sector. Reads next sector. Allows cursor to be jumped to any absolute position in the displayed sector. P Sends the buffer contents to your printer. A header is printed first which shows the track, sector, and volume. When first used, the program will ask which slot your printer is using and whether you wish to use 40 or 80 columns. R_ Prompts you for the track and sector to read. Use the RETURN key to accept default values. S Prompts you for a new slot. Valid entries are from 1 to 7. U_ Toggles the status indicators between hex and decimal and updates the display information. Only the track, sector, and cursor are affected by this key. (Default at BOOT is hex.) W Prompts you for the track and sector to write to. Use the RETURN key to accept default values. After entering the track TINO Ze5 OZMEZA 49 Book of Softkeys Vol. I and sector, DiskEdit will beep and pause. This is your last chance to change your mind. Press RETURN to WRITE, or any other key to escape. X Clears the screen and exits to BASIC. ASCH Filters The number following the filter (F) indicator is the filter currently selected. There are 9 filters. Each affects the format of the displayed screen contents. They do not change the actual buffer contents in any way. They may be selected by pressing the corresponding number (1-9) key. Rolling your own The filters can be modified from the keyboard. Select a filter (1-9) by pressing the appropriate number key. Press the ‘F’ key. The 256 screen characters are divided into 8 blocks. The prompt under ‘BLOCK’ indicates the original group of characters while the prompt under ‘CHG:’ indicates what characters will be displayed on the screen. The first prompt is ‘INV1’ for inverse letters. Press ‘7’. This causes all inverse characters in block 1 to display as normal. Block 7 is normal letters. The ‘INV1’ prompt under ‘CHG:’ will change to ‘NOR2’. By pressing a number from 1 to 8, each of the original blocks can be changed to display as any other block. Pressing ‘RETURN’ will skip a block. Next to ‘CHG:’ is ‘FN#’. The ‘‘FN#’ is short for function number. There are 3 functions. 1. Print block, delete one character 2. Delete block, print one character 3. Delete entire block Customizing the Program DiskEdit is an Applesoft program with packed machine code. This means that the machine code portion of the program is hidden in such a way that DOS thinks it is part of the Applesoft program. The machine code is hidden behind the REM in line 0 rather than at the end of the BASIC program. This was done in order to allow program modification while keeping the program size as small as possible. If you load the program and list it, you will see a single BASIC line: 0 CALL 2167 : GOTO 10 : REM Book of Softkeys Vol. I 50 In order to make changes you will need to follow these steps: 1. RUN the program. 2. When the copyright notice is on the screen, press RESET to exit the program. 3. LIST the program and make changes. 4. After making any changes, RUN the program and exit using the ‘*X’’ key. This will change the zero page pointers so that DOS can save the machine code along with the modified program. 5. SAVE the modified program to disk. DiskEdit BASIC program 10 TEXT: HOME: GOSUB 2150: GOTO 750 20 REM CLEAR TEXT WINDOW 30 POKE 35,21: HOME: RETURN 40 REW GET CHARACTER WITH PROMPT 50 POKE - 16368,0 60 GET N§:KY = ASC (NS) + 128: IF KY < > 155 THEN RETURN 70 REH RESET ALL DEFAULTS 80 POKE TR, 1S: POKE SC, SS: POKE CM,RD: TK = 1S:SE = SS: CALL TT: CALL MV 90 REM CLEAR STACK, GOTO CMD PARSER 100 CALL - 10621: GOTO 750 110 REM MAKE NOISE AND RETURN 120 PRINT G$G$; : RETURN 130 REM FIND BINARY START 140 IF PEEK (1024) = 164 THEN 190 150 REM FOR DECIMAL NUMBER 160 Al = PEEK (1024) - 176:A2 = PEEK (1025) - 176: IF A2 > - 1 THEN GOSUB 400:Al = KY:A2 = PEEK (1026) - 176: 1FA2 > - 1 THEN GOSUB 400: RETURN 170 KY = AL: RETURN 180 REM FOR HEX NUMBER 190 KY = PEEK (1025) : GOSUB 280:Al = KY:KY = PEEK (1026): GOSUB 280:A2 = KY:KY = Al * 16 + A2; RETURN 200 REM GET KEY WITHOUT PROMPT 210 KY = PEEK ( - 16384): IF KY <128 THEN 210 220 POKE - 16368,0: RETURN 230 REW HANDLE AN ERROR 240 Al = PEEK (EF): GOSUB 30: VTABI2: HTAB 12: IF Al = 16 THEN PRINT “UNABLE*TO‘WRITE": GOTO260 250 PRINT "DISK*DRIVE*ERROR” 260 PRINT GSG$; ; FOR X= 170 1000: NEXT: POKE EF ,0: POKE 35,24: CALL MV: GOTO 80 270 REM PROCESS HEX/DEC INPUT 280 KY = KY - 176: IF KY <Q ORKY > 22 THEN KY = 128: RETURN 290 IF KY > 9 THEN KY = KY - 7: IFKY < 10 OR KY > 15 THEN KY =128 300 RETURN 310 REM GET HEX OR DEC ONLY 31 Book of Softkeys Vol. I 320 GOSUB 50 330 IF KY = 141 THEN RETURN 340 GOSUB 280 350 IF KY = 128 THEN GOSUB 120: GOTO 320 360 IF PEEK (HF) AND KY > 9 THEN GOSUB 120: GOTO 320 370 RETURN 380 REW CALCULATE HEX/DEC NO. 390 IF NOT PEEK (HF) THEN KY =Al * 16 + A2: RETURN 400 KY = Al * 10+ A2: RETURN 410 REM GET TRACK VALUE 420 VTAB 22: HTAB 14 - PEEK (HF): GOSUB 320: IF KY > 15 THEN KY = TK: GOTO 480 430 IF NOT PEEK (HF) AND KY >2 THEN 480 440 IF KY > 3 THEN 480 450 Al = KY; PRINT NS; ; GOSUB 320: IF KY > 15 THEN KY = Al: GOTO480 460 A2 = KY: GOSUB 390 470 REM CHECK FOR VALID TRACK# 480 IF KY <0 OR KY > 34 THEN PRINT GS; ; GOTO 420 490 REW SAVE OLD TRK#, POKE NEW 500 TS = TK:TK = KY: POKE TR, 1K: CALLTT 510 REM GET SECTOR VALUE 520 VTAB 22: HTAB 21 - ( PEEK (HF)) * 2: GOSUB 320: IF KY >15 THEN KY = SE: GOTO 620 530 REM CHECK FOR HEX | /0 540 IF NOT PEEK (HF) THEN 620 550 REM SAVE KEY 560 IF KY > 1 THEN 620 570 REM GET ANOTHER KEY 580 Al = KY: PRINT NS; : GOSUB 320: IF KY > 15 THEN KY = Al: GOTO 620 590 REW CHECK FOR VALID SECTOR# 600 A2 = KY: GOSUB 390: IF KY < 0 ORKY > 15 THEN PRINT GS: : GOTO 520 610 REM SAVE OLD SCT#, POKE NEW 620 SS = SE:SE = KY: POKE SC,SE: CALLTT 630 REW IF WRITE THEN LAST CHANCE 640 IF PEEK (CH) = WR THEN VTAB24: HTAB 2: PRINT “PRESS*RETURN'TO*->"; : FLASH : PRINT "WRITE"; : NORMAL : PRINT "<-,*ESC‘TOEXIT"G$; : NORMAL : POKE - 16368,0: GOSUB 210: IF KY <> 141 THEN 80 650 GOTO 710 660 REM PRINT 40 "="'S 670 FOR X = 110.40: PRINT "="; : NEXT : RETURN 680 REM PRINT SCREEN PROMPTS 690 CALL TT 700 REM READ OR WRITE A SECTOR 710 CALL 10 720 REM PRINT BUFFER TO SCREEN 730 CALL MV: RETURN 740 REW COMMAND PARSER 750 POKE 216,0: CALL TT: VTAB 23: HTAB 1: CALL - 958: iF PEEK(EF) > 0 THEN Book of Softkeys Vol. I 52 GOSUB 240 760 REM SAVE CURRENT TRACK/SECTOR 770 TS = PEEK (TR) :$S = PEEK (SC) :TK = TS:SE = SS 780 CALL XC:KY = PEEK (225) - 192 790 IF KY = - 5 OR KY = - 21 THEN1380 800 IF KY <0 OR KY > 26 THEN 750 810 ON KY GOSUB 100, 1870, 1830, 100, 1400, 840, 1450, 100, 100, 100, 100, 100, 100, 100, 1590, 1480, 100, 420, 1680, 100, 100, 100, 1720, 1740, 100, 100: GOTO 750 820 PRINT G$; : GOTO 750 830 REM *** DEFINE FILTER *** 840 TEXT : HOME : VTAB 22: HTAB7: PRINT “CONFIGURAT|ON*FOR*FILTER‘#” PEEK (FL) 850 VIAB 2: PRINT GS"#*BLOCK™**#*CHG: “*FNH‘CHRS‘STATUS” 860 PRINT 870 DL = PEEK(231) + PEEK (232) * 256 - 1:CG = PEEK(233) + PEEK(234) * 256 -1 880 Fl = PEEK (FL) 890 REM PRINT CURRENT VALUES 900 FOR X = 1 108: PRINT X".*"F§(X)"*->'"; 910 F = PEEK (CG + X) 920 Fl = INT (F /32) +X: IF Fl > 8 THEN Fl = Fl -8 930 F2 =F - ( INT (F / 32) * 32) 940 F3 = PEEK (DL + X) 950 Fa = PEEK (NO + Fl) 960 F1 (X) = F1:F2(X) = F2:F3(X) =F3 + (F(F1) * (F2<>0)) +(F(X) * (F2=0)) 970 PRINT F1" .*"F$(FL) ;: HTAB 23: PRINT F2; : HTAB 27: POKE 2091,F3: CALL HP: CALL AP: IF X <> 1 THEN 1000 980 HTAB 36: IF F4 = 1 THEN PRINT*ON*"; 990 1F Fa = 0 THEN PRINT "OFF"; 1000 PRINT : PRINT : NEXT 1010 REM EDIT CURRENT VALUES 1020 FOR X = 1 TO 8: VTAB X * 2 42: HTAB 12 1030 REM GET BLOCK # 1040 GOSUB 50:A = KY - 176: IF NS = CHRS (13) THEN A = F1(X):NS = "" 1050 IF A< 1 OR A> 8 THEN PRINTGS; : GOTO 1040 1060 PRINT NS;’; HTAB 15: PRINT F§(A) ;: HTAB 23 1070 C= F2(X) 1080 REM CALCULATE OFFSET 1090 IF A> =X THEN =A-X 1100 IF A< X THEN F = (8 - X) +A 1110 POKE CG +X,F * 32+C 1120 REM GET FUNCT ON # 1130 GOSUB 50:C = KY - 176: IF NS = CHRS (13) THEN C = F2(X) :NS = "* 1140 IF C.< 0 ORC > 3 THEN PRINTGS; ; GOTO 1130 1150 PRINT NS; 1160 REM CHANGE FILTER VALUE 1170 POKE CG +X,F * 32+C 53 Book of Softkeys Vol. I os ITA —SkaxYog Jo Yoog O99TOLOD : TV = AM N3HL ST < AY 41 “OZE GNSOD :+SN INIUd AN = TY 009T NUML34 “LL TIVO NSHL ST < AM 4] °0Z€ GNSOD : (4H) W33d - ZE BVLH $22 QVLA 06ST ee YOSUNO AHIT ++ HIY 08ST 08 0109 ‘0 #Ud OLST AXAN © INTUd 09ST AXAN SY TWO ‘(W +X + T¥) 939d ‘ 160Z3N0d $17 / 9T OL T= YOS 09ST AXAN SGHTWO © (W +X + Ty) ¥33d ‘ T60Z3WOd $171 / 9T OL T= ¥ 40S OST Sw7w INUd :SQVLH “XH TIVO :X'WN 3M0d '17/ 9T d3lS 992 OL 0 =X 404 O€ST (OA) ¥3d we SHMOAy ANTS °XH TWO '3S°HN 3¥0d $+. {HOL03S4 INIUd :XH 110 “ML‘HN 3MOd : !u9:KOWUL, INId OST INIYd ‘Ud Had OTST T- 92 + (48) ¥33d = TW 00ST O€ ANSOD O6¢T 0921 SNSOD NSHL Ud LON 41 O8bT x8 AdQQQUVH INIUd ++ W324 OLPT NUNL3Y = (2) $HHO = $9 O9PT NUNL3Y “14 = $9 NBHL (2) $YHO = $9 41 $9 INIUd OSPT 130/NO ONNOS NUNL HSU OPT 08 0.109 -856 - TIVO ‘1 SVLH °€2 GYLA °03 TIVO OftT * wLIX,0L/083>,SS3Udeveu INIYd O2PT 253QOW. LNTUd +21 QVLH : TYMUON OTPT T'QN 30d $5 ,>>L1036<,1NIUd © SSU3AN] 2 BVLH 342 QVLA OOPT INIOd AMINA 30M 1103 W3Y O6ET OTPIOLOD 0'ON 3¥Od ©! +4#L103++,1NIUd : SSUIANI :2 QVIH “72 BYLA O8ET NUMLIY NSHL O = 13 41 OLET ANIOd AMLNA 300M ++1103++ H3Y O9ET 0€Z 0109 OST AX3N -006 OL T = X HOd OFET AIX 'N3340S 3401S3u N3Y O€ET V'ld +N 3¥0d 02ET OF V5 add0e INTUd OTET OZET 0109 ** weNO. ANIUd :T = YNSHL wAw = $NJI “96 QVLH “¥ BVLA °898- TIVO :T SVLH OOET 06 GNSOD :!$Due°(u ANIYd = TWHYON © Nw LNIYd | ASUBANL $+ 4/A)9iL103¥9N1UNGNOUALTISe3AVST. INIUd } INIUd © ANd 062T SMLVLS Y3LTI4 139 NIU O82T AXSN 0L2T d¥ TIVO ‘dH TWO “AN T602 3MOd = 22 QVLH O92T AM'X + 10. 30d 0621 @+2 s XQVIA $898 - TIVO 1 QVIH :952 - AN= AW OP2T 2€ + (V+) +AM= AMNSHL 161 <A I O€2T OVZT 0109 :2E + (V+ 2)+ AM= AN NHL 261 > AY 4! O22T 0021 0109 © $9 INIUd NBL €22 < AN HO O9T > AN 41 OTZT (ed = AY NBHL TPT = AMA! 205 GNSOD <* vy :YILOVYVHO UFLNS. INIYd “1 QVLH “02 QVLA 002T OL2T NSHL €= 940 1> 941 O6IT O= AMNBHL O= O41 :(X)E4 = AM OBTT 1610 A2 = KY; PRINT NS; : GOSUB 390: IF NOT PEEK (HF) THEN 1660 1620 IF KY > 25 THEN 1660 1630 Al = KY: GOSUB 320: IF KY >15 THEN KY = Al: GOTO 1660 1640 A2 = KY: PRINT NS; : GOSUB 390; IF KY < 0 OR KY > 255 THEN CALL TT: GOTO 1590 1650 REM CALCULATE NEW CURSOR POSN 1660 POKE CS, KY: CALL WV: CALL TT: RETURN 1670 REW CHANGE SLOT NO. 1680 VTAB 22: HTAB 4: GOSUB 320: IF KY > 15 THEN CALL TT: RETURN 1690 IF KY <1 OR KY > 7 THEN 1680 1700 POKE SL, KY * 16: CALL TT: RETURN 1710 REM WRITE A TRACK/SECTOR 1720 POKE CM, WR: GOSUB 420: POKECM, RD: CALL TT: RETURN 1730 REM CLEAR SCREEN, RECONNECT DOS AND EXIT TO BASIC 1740 TEXT : HOME : POKE 103, 1: POKE104,8: CALL 1002: END 1750 REM FIND PRINTER SLOT 1760 GOSUB 30: VTAB 12: PRINT "HHICH'SLOT‘IS'YOUR*PRINTER*USING?*1~7°";; : GOSUB 320: IFKY > 15 THEN RETURN 1770 IF KY > 7 THEN GOSUB 120: GOTO1760 1780 1F NOT KY THEN RETURN 1790 PR=KY:L1 =2 1800 PRINT : PRINT : PRINT TAB(6) "PRINT*USING*80°COLUNNS*(Y/"; ; INVERSE : PRINT "N"; : NORWAL: PRINT "):";: GOSUB 50: IFN$ = "Y" THEN LI = 1 1810 RETURN 1820 REM CALL FOR CATALOG 1830 CALL 1002: ONERR GOTO 1850 1840 GOSUB 30: PRINT : PRINT CHR$(4)"CATALOG,D" PEEK (DR)" ,S" PEEK (SL) / 16: PRINT : CALLFR: POKE 35,24: VTAB 24: HTAB7: PRINT "PRESS‘ANY*KEY‘TO°CONT INUE*" ; : GOSUB 210: GOTO730 1850 POKE 216,0: GOTO 240 1860 REM DISASSEMBLE THE BUFFER 1870 GOSUB 30: VTAB 21: PRINT : PRINT:KY = PEEK (CS) 1880 REM START AT CURSOR 1890 POKE 58, KY: POKE 59, PEEK (BF) 1900 Al = 0:A2 = 21 1910 REM START AT LAST BYTE 1920 FOR X = 1 TO.A2: IF PEEK (59) > PEEK (BF) THEN :Al =1: IF PEEK (1152) < > 160 THEN PRINT : GOTO 2090 1930 IF Al THEN PRINT : NEXT : GOTO2090 1940 CALL BI 1950 NEXT 1960 REH <ESC> KEY? = EXIT 1970 GOSUB 210; IF KY = 185 THEN2130 1980 REM <RTN> KEY? = 20 LINES 1990 IF KY = 141 THEN 1900 2000 REM <SPACE> KEY? = 1 LINE 2010 IF KY = 160 THEN A2 = 1: GOTO1920 2020 IF KY = 213 THEN GOSUB 140: GOSUB 1550: VTAB 1: GOTO 1890 55 Book of Softkeys Vol. I 2030 IF KY < > 208 THEN 1970 2040 REM PRINT SCREEN 2050 GOSUB 140:L = KY 2060 IF NOT PR THEN GOSUB 1760 2070 HOME :KY = L: PR# PR: GOTO1890 2080 REM PRINT EXIT MESSAGE 2090 PRINT "END'OF*BUFFER‘PRESS'RETURN‘TO*CONT INUE” ;: GOSUB210 2100 REM LAST CHANCE TO PRINT 2110 IF KY = 208 THEN 2050 2120 REW EXIT BINARY ROUTINE 2130 PRINT : POKE 35,24: PRH 0: GOTO730 2140 REM DEF INE VARIABLES aL =2 <DR = 2072:VO = 2084: TR = 2074:SC = 2075:CH = 2082 2170 NM = 2091 :FL = 2101 :EF = 2094:HF = 2095:CS = 2100:BF = 2103 2180 NC = 2099 2190 Fl = PEEK (FL) 2200 NO = PEEK (2106) + PEEK (2107) * 256 2210 10 = 2111 :WV = 2114:HX = 2117:ED = 2120:B1 = 2123:FR = 2126:TT = 2129:XC = 2135 2220 HP = 2141:AP = 2144 2230 FS(1) = "INVI":FS(2) = "INV2":F§(3) = "FLSI":FS(4) = "FLS2":F$(5) = "CTRL": FS(6) = "NORI":FS(7) = "NOR2":FS(8) ="L/C*" 2240 F(1) = 192:F (2) = 128:F(3) =128:F(4) = 64:F(5) = 64:F(6) = 0:F(7) = 0:F(8) = - 64 2250 GS = CHRS (7) 2260 VTAB B: PRINT "D'I*S!K*E*D'I*T*S*V*E*R'S*[40'NS!4*.*0": PRINT ™SCOPYRIGHT1981°(C)‘HARDCORE*COMPUTIST" : PRINT 2270 HTAB 5: FOR X = 170 32: PRINT"-":: NEXT : PRINT : HTAB 6: PRINT ™AD|SKCEDITING‘UT IL TY*PROGRAM" 2280 HTAB 5: FOR X = 1 T0 32: PRINT"-"; : NEXT : PRINT - PRINT 2290 VTAB 22: PRINT "INSERT“DISK'-"PRESS*ANY'KEY'TO*CONTINUE"; : GOSUB 210: VTAB 22: CALL - 958: GOTO 730 Diskedit source code 0010 0015 % DISKEDIT || - VERSION 4.1 0020 »* COPYRIGHT 1981 SOFTKEY 0025 * LAST UPDATED MAR 24 84 0030 0035 -OR $800 0040 -TF EDO 0045 0022- 0050 WNDTOP EQ $22 0023- 0055 WNDBTM = .EQ $23 0024- 0060 CH EQ $24 0025- 0065 CV EQ $25 0026- 0070 BASE2 EQ $26,27 Book of Softkeys Vol. I 56 0028- 003A- 0048- 0067- Q0E0- O0EL- O0E4- O0E9- 0309- 03E3- ¢000- 010- B3F2- ED24- F88C- F8D3- FO4A- F953- FC58- FC62- FDDA- FDED- 0080- 0081- 0082- 0084- 0086- 0088- 0089- 008C- 008D- 008E- 0091- 0095- 009A- 009B- 00A0- QOAA- OOAE- 00B5- 00C9- OOCA- 37 0075 BASE] — EQ $28, 29 0080 PCL -£Q $3A,3B 0085 10BPL EQ $48 0090 PRGSTR .EQ $67 0095 LOC -EQ $E0 0100 NUM EQ SE1 0105 BUFFER.POINTER .EQ $E4 0110 DCHR -EQ $E7,E8 0115 CFLT —. EQ. $E9, EA 0120 RYTS =. EQ. $309 0125 GETIOB EQ $3E3 0130 KEY -EQ $C000 0135 STROBE .EQ $C010 0140 VT0C -EQ $B3F2 0145 LINPRT EQ $€D24 0150 INSDS —.EQ $F88C 0155 INSTDS EQ $F8D3 0160 PRBLANK .EQ $F94A 0165 PCAD) —.EQ $F 953 0170 HOME -EQ SFC58 0175 CR.LF EQ $FC62 0180 PRHEX EQ $FDDA 0185 COUT -EQ $FDED 0190 # ------------------------------~ 0195 CTRL.AT .EQ $80 0200 CTRL.A EQ $81 0205 CTRL.B EQ $82 0210 CTRL.D EQ $84 0215 CTRL.F —.EQ $86 0220 CTRL.H .EQ $88 0225 CTRL.| —.EQ $89 0230 CTRL.L .EQ $8C 0235 RETURN EQ $8D 0240 CTRL.N EQ $8E 0245 CTRL.Q EQ $91 0250 CTRL.U —.£Q $95 0255 CTRL.Z —.EQ $9A 0260 ESCAPE EQ $9B 0265 SPACE —.EQ SAO 0270 STAR EQ SAA 0275 PERIOD EQ $AE 0280 FIVE -EQ $B5 0285 LTR.| «EQ $C9 0290 LTR.J EQ $CA 0295 LIR.K EQ $CB 0300 LTR.M = .EQ SCD 0305 Book of Softkeys Vol. I CHARACTER CODES 0310 % -------------------. ~- 1ST LINE OF BASIC PROGRAM 0315 0800- 00 11 08 0803- 00 00 8¢ 0806- 32 30 0320 START —.HS._-00110800008C3230 0808- 36 37 3A 080B- AB 31 30 OB0E- 3A B2 0325 -HS_36373AAB31303AB2 0810- 00 00 00 0330 -HS 000000 0813- 4C 73 08 0335 IMP INITDOS 0340 0345 4 --------------------nne INPUT/OUTPUT BLOCK 0350 0816- 01 0355 IOBIND HS 01 0817- 60 0360 SLOT HS 60 SLOT * 16 0818- 01 0365 DRIVE HS 01 DRIVE # 0819- 00 0370 EXPVOL HS 00 REQ. VOLUME O81A- 00 0375 TRACK — HS. 00 TRACK # 081B- 00 0380 SECTOR HS 00 SECTOR # 081C- 27 08 — 0385 «DA DCT O81E- 00 09 0390 DA BUFFER 0820- 00 00 0395 -HS 0000 0822- 01 0400 CHND HS 01 COMMAND 0823- 00 0405 ERCODE HS 00 ERROR CODE 0824- 00 0410 VOLUME —.HS 00 VOLUME # 0825- 60 0415 OLDSLOT .HS 60 PREV. SLOT 0826- 01 0420 OLDRIVE .HS 01 PREV. DRIVE 0425 0827- 00 0430 DCT -HS 00 TYPE CODE 0828- 01 0435 PHASES —.HS 01 PHASES/TRK 0829- EF D8 0440 -HS EFDB = TIME COUNT 0445 0450 ---------------—------—-------- BASIC variables 0455 0828- 00 0460 BYTE -HS 00 NW 082C- 00 0465 OLDTRK HS 00 OT 082D- 00 0470 OLDSCT = .HS 00 0S 082E- 00 0475 ERRFLG —.HS 00 EF 082F- 00 0480 HEX.OR.DEC.FLG .HS 00 HF 0830- 01 0485 ON.OFF = .HS 01 ST 0831- 01 0490 CFLG -HS 01 PF 0832- 00 0495 -HS 00 0833- 00 0500 USE.CTRL.CHARS .HS 00 TH 0834- 00 0505 CRSVAL —.HS 00 cs 0835- 01 0510 FLTNUM = .HS 01 FL 0836- 00 0515 -HS 00 0837- 09 0520 DA /BUFFER BF 0838- 00 00 0525 -HS 0000 Book of Softkeys Vol. I 538 083A- 8B 0C 083C- 00 00 00 0535 083F- 4C 90 08 0555 0842- 4C 29 0A 0560 0845- 4C OE 12 0565 0848- 4C 7E OF 0570 084B- 4C 00 0A 0575 084E- 4C 6B 0B 0580 0851- 4C C9 0C 0585 0854~ 4C BD 0C 0590 0857- 4C 5D 0E 0595 O85A- 4C AE 0B 0600 085D- 4C 03 12 0605 0860- 4C DA 11 0610 0863- 4C OA OE 0615 0866- 60 60 60 0620 0869- 00 O86A- FF 086B- 01 086C- 00 086D- 00 086E- 00 O86F- 01 0870- 10 0871- 23 0872- 00 0530 -DA FSTAT NO. -HS 000000 0540 0545 % 0550 JMP CALLIO 10 JHP HXBYTE JWP EDIT =—-ED JMP BINARY BI JHP PROMPT == TT JHP PROHPTO 1 JHP PARSE = XC JMP FILTERO HC JMP HEXPRINT HP JMP ASCPRINT AP JNP RIGHT 0625 0630 * 0635 0640 OFFSET HS 00 0645 FIRST = .HS FF 0650 EDFLG = .HS 01 0655 HCOUNT HS 00 0660 SPACES —.HS 00 0665 EDIT.MODE.FLAG .HS 00 0670 KEYFLG = .HS 01 0675 MAXSCT — HS 10 0680 MAXTRK HS 23 0685 SPECIAL.FUNCTION .HS 00 0690 os BASIC Cal! table JHP PRINT .SCREEN. DATA JMP CALC. FREE.SECTORS FR UNUSED «HS 606060 — UNUSED en INTERNAL VARIABLES 0695 ----------------------------. --Get DOS pointers 0700 0873- 20 £3 03 0705 INITDOS JSR GETIOB 0876- 84 48 == 0710 STY 10BPL 0878- 85 49 = 0715 STA |OBPL+1 O87A- AO 01 0720 LY #1 087C- Bl 48 = 0725 LDA (10BPL) ,Y 087E- 8D 17 08 0730 STA SLOT 0881- C8 0735 INY 0882- B1 48 0740 LDA (1OBPL),Y 0884- 8D 18 08 0745 STA DRIVE 0750 % ------------------------- Reset program pointer 0887- AQ IF 0755 LDA #STOP 0889- 85 67 0760 STA PRGSTR 088B- A912 0765 LDA /STOP 59 Book of Softkeys Vol. I 088D- 85 68 0770 ‘STA PRGSTR+L 088F- 60 0775 RTS 0780 078§ % ------------------ Call Read/Write Track Sector 0790 0890- A908 0795 CALLIO. LDA /10BIND 0892- AO 16 0800 LOY #10BIND 0894- 20 D9 03 0805 JSR RATS 0897- 90 06 0810 BCC .1 0899- AD 23 08 0815 LDA ERCODE GET ERROR # 089C- 8D 2E 08 0820 STA ERRFLG 089F- 60 0825 1 RTS 0830 0835, Put buffer here 0840 08A0- 0845 -BS $900- 0900- 0850 BUFFER .BS $100 256 bytes 0855 0860. % -------------------- Disassemble an instruction 0865 QAQO- A9 8D 0870 BINARY LDA #RETURN 0A02- 20 ED FD 0875 JSR COUT PRINT <CR> OAOS- AS 3A 0880 LDA PCL QA07- 8D 2B 08 0885 STA BYTE QAOA- 20 0E 12 0890 JSR HXBYTE QAOD- A904 — 0895 STEP LDA #4 OAOF- 85 24 0900 STA CH OALI- AQ AD 0905 LDA #$AD OA13- 20 ED FD 0910 JSR COUT Print dash OAL6- A2 01 0915 LOX #1 and a OA18- 20 4A F9 0920 JSR PRBLANK space. OAIB- 20 8C F8 0925 JSR INSDS —-Disassem OAIE- 20 03 F8 0930 JSR INSTDS current OA21- 20 53 F9 0935 JSR PCADJ — instr. OA24- 85 3A 0940 STA PCL & update OA26- 84 3B 0945 STY PCL+l —prg cntr. 0A28- 60 0950 RTS 0955 0960 % ------------~------------------ Select a filter 0965 0970 PRINT. SCREEN. DATA 0975 0A29- AD 35 08 0980 LOA FLTNUN OA2C- 0A 0985 ASL OA2D- 0A 0990 ASL OA2E- AA 0995 TAK QA2F- AQ 00 1000 LOY #0 OA31- BD 95 0C 1005 .1 LDA FLT.LOC,X Book of Softkeys Vol. I 60 0A34- 99 E7 00 1010 0A37- £8 1015 QA38- C8 1020 0A39- CO 04 = 1025 OA3B- 90 F4 1030 1035 1040 1045 OA3D- A900 1050 OA3F- 85 E4 1055 OA41- 85 25 1060 OA43- 20 CF OA 1065 . OAM6- £6 25 1070 QA48- A525 1075 OA4A- C9 141080 OA4C- DO FS 1085 OASE- AS 25 1090 OA50- 20 8F 0A 1095 QAS3- AO 27 1100 OASS- AD AD = 1105 OAS7- 91 28 1110 . OA59- 88 1115 OASA- 10 FB 1120 QASC- 4C C9 OC 1125 1130 1135 ---- STA DCHR,Y INK INY PY #4 BCC .1 phecomeceeee aes --Print buffer data to screen LDA #0 STA BUFFER. POINTER STA CV JSR PRINT.OLD.LINE INC CV LDA CV CMP #20 Last line? BNE .2 No! LDA CV JSR FIND. BASE..ADDR UY #39 LDA #SPACE STA (BASEL) ,Y DEY BPL .3 ‘IMP PROMPT aan Memory locations for text scrn 1140 1145 TEXT. SCREEN. BYTE 1150 OASF- 0004 = 1155 OAGI- 80.04 1160 OA63- 00 05 = 1165 OAGS- 8005 1170 OAG7- 0006 = 1175 OA69- 80 06 1180 OAGB- 0007 1185 OAGD- 8007 1190 OAGF- 2804 = 1195 OA71- A804 1200 0A73- 28 05 = 1205 OA75- A805 = 1210 OA77- 28 06 = 1215 0A79- A806 = 1220 OA7B- 28 07 = 1225 OA7D- A807 1230 OAF- 5004 = 1235 OA81- D004 1240 OA83- 5005 = 1245 .DA $400 Line 1 -DA $480 .DA $500 -DA $580 -DA $600 -DA $680 -DA $700 .DA $780 DA $428 DA $448 «DA $528 DA $5A8 DA $628 -DA $6A8 -DA $728 DA $7A8 «DA $450 -DA $400 -DA $550 61 Book of Softkeys Vol. I OA85- D005 = 1250 -DA $500 OA87- 5006 = 1255 -DA $650 QA89- DO 06 = 1260 -DA $6D0 OASB- 5007 = 1265 -DA $750 OASD- D007 = 1270 DA $700 Line 24 1275 1280 1285. * -------------------- --Enter with line? in ACC. 1290 1295 FIND. BASE. ADDR 1300 OA8F- 0A 1305 ASL 0A90- AA 1310 TAX OA9I- BD SF OA 1315 LDA TEXT. SCREEN. BYTE, X OA94- 85 28 1320 STA BASE] OA96- 18 1325 cLc OA97- 69 1B 1330 ADC #27 OA99- 85 26 = 1335 STA BASE2 OA9B- BD 60 OA 1340 LDA TEXT. SCREEN. BYTE+1 ,X OAQE- 85 29 1345 STA BASE1+1 QAAO- 85 27 1350 STA BASE2+1 OAA2- 60 1355 RTS 1360 1365. # ---------------------. —-Convert CRSVAL to line# 1370 1375 FIND. CURRENT. LINE 1380 QAA3- A214 1385 LOX #20 AAS- CA 1390 .1 DEX OAAG- BD B8 0A 1395 LDA FIRST. CHAR. POSN, X OAA9- CD 34 08 1400 CUP CRSVAL OAAC- 9005 1405 BCC .2 OAAE- FO 03 1410 BEQ .2 OABO- 4C-A5 0A 1415 WP 1 OAB3- 86 25 1420 .2 STX CV OABS- 85 E4 = 1425 STA BUFFER. POINTER OAB7- 60 1430 RTS 1435 1440 FIRST. CHAR. POSN 1445 OABS- 00 0D 1A OABB- 27 34 41 QABE- 4E 1450 -HS 00001A2734414E OABF- 5B 68 75 OAC2- 82 8F 9¢ QAC5- Ad 1455 -HS 5B6875828F9CA9 OAC6- B6 C3 DO OAC9- DD EA F7 1460 -HS B6C3D0DDEAF7 Book of Softkeys Vol. I 62 1475 OACC- 20 A3 OA 1480 1 1495 OACF- A5 25 1500 OADI- 20 8F 0A 1505 OAD4- AQ 0D — 1510 OAD6- 8D 6C 08 1515 OAD9- A6 E4 — 1520 OADB- BD 00 09 1525 . OADE- 48 1530 OADF- EC 34 08 1535 OAE2- 00 05 — 1540 OAE4- AE 6F 08 1545 OAE7- F003 1550 OAE9- 20 B1 OB 1555 . OAEC- AD 00 1560 . OAEE- 91 26 = 1565 OAFO- £6 26 1570 OAF2- 68 1575 OAF3- AE 6F 08 1580 OAF6- FO 44 = 1585 OAF8- 48 1590 QAF9- 4A 1595 OAFA- 4A 1600 OAFB- 4A 1605 OAFC- 4A 1610 OAFD- A6 E4 1615 OAFF- EC 34 08 1620 0B02- 00 0B 1625 0B04- 09 30 1630 0B06- C9 3A 1635 0p08- 90 0D 1640 OBOA- £9 39 = 1645 OB0C- 4C 17 0B 1650 OBOF- 09 BO

Showing the first 100000 of 238680 characters.

mp.ls