Skip to main content

Open Apple Vol 1 No 02 MAR 1985

  • PublicationApple Periodicals
  • Date1985-03-01
  • Pages8
  • SourceOpen_Apple-Vol_1_No_02-MAR_1985.pdf
← Magazines Open Apple Vol 1 No 02 MAR 1985
/ 8
Source: Internet Archive — Aggregated Apple-era periodicals, 1981–2012.
Page 1
Loading…
Text content (OCR)
March 1985 Vol. 1, No. 2 Steve Wozniak, designer of the Apple II, is no longer involved in any Apple projects, although he remains an employee on a consulting basis, according to Linda Mervill, Apple Il specialist in Apple's corporate relations department. Steve is starting a home video products company, which will develop products that will allow consumers to use video cassette recorders in new ways. Wendell Sander, head hardware designer for the Apple III, has reportedly joined Steve, but that is unconfirmed. According to the Wall Street Journal (Feb 7, p. 42), Wozniak told reporters that his departure was prompted in part by bitter disagreement with Apple's manage- ment over the company’s direction and by frustration with the rigidity of a big corporate bureaucracy. Wozniak said the Apple II "has been ignored in the hope that itwill die and goaway.” Steve's new products have “nothing to do with home computers,” according to Merrill. Steve has always been a vocal spokesperson for Apple Il users inside Apple itself. Although he is still “officially a part of Apple”, his absence on a full- time basis is a blow to those of us already concerned about the relatively minuscule development investment Apple makes in its Apple II family. Apple's annual stockholder’s meeting, held on January 23 this year, was a Macintosh circus. Not one of the new products announced works with the Apple Il. Apple did announce, however, that by fall it would havea peripheral card for the 1BM PC that will allow connection to AppleTalk —its new low-cost system for hooking (non-Apple Il) personal computers, printers, large memory devices, and other peripherals together, Apple spokesperson Merrill tells us Apple is aware that many Apple II users, particularly in educational institutions, are interested in this capability and she assures us that Apple is working on it. Meanwhile, AppleWorks was December's sales leader in retail stores, according to Infocorp, a market research firm in Cupertino. The program walked away with 17 per cent of all software sales. The much ballyhooed Lotus 1-2-3 was in second place with just 10 per cent of the market. Quote of the month: I would argue that the ultimate deciding factor in computer obsolescence is software availability. The sure sign of a computer growing into obsolescence is that no new software is being developed for it. And if software is available to do what you want done with your computer, it will not be obsolete for quite some time. (By this measure, the Apple I! may never be obsolete.) The quote is from Mark Wilsdorf, editor of AgriComp (103 Outdoors Bldg, Columbia, MO 65201, $24/yr), a well-done magazine that covers the area where agriculture and personal computers overlap. Much of the magazine's material is based on spreadsheet templates that work with any kind of computer. If you are one of the world's unfortunate souls involved in agriculture, you should get this one, depression or not. New enhanced ROMs for the Apple Ile have been mentioned in various press reports the last few weeks. The new ROMs reportedly make the Ile and IIc more compatible. When Apple officially introduces these new ROMs we'll have a com- plete report (and if it's not by March 15, the April Open-Apple may be mostly blank). Basham fires up the Incinerator | got a letter and disk from Bill Basham, developer of Diversi-DOS (arch- competitor of my own ProntoDOS) this month: Your discussion of garbage collectors in the January issue inspired me to finally write one. I've enclosed the latest Diversi-DOS update, which includes a 48K and a 64K garbageman on it. I hereby donate the 48K garbageman to the public domain. Since the 64K version works only with Diversi-DOS, I will retain the rights to it. There's also a source listing for the 48K garbageman for you to publish if you wish. Of course, used the Pascal assembler (ed note: expletive deleted), so you may have to do some retyping and possibly add some improved comments. Feel free to make upacatchy name for it. My garbageman may be a little slower, but I'm confident that it is the world's smallest. That should make it ideal for publication, and | hope will make that issue a hot one. Bill apparently wants me firmly entrenched in the newsletter business and out ofthe DOS-enhancement business. After looking over his program | am inclined to give up trying to compete with him —this is a masterpiece. Readers of our January issue will remember a two-page spread on how to avoid garbage collection — the malady that strikes string-intensive Applesoft programs. at the most inopportune times. ProDOS solves the problem by including its own high-speed garbage collector. Now DOS 3.3 users also havea high-speed garbage collector that fits entirely within DOS. As with ProDOS, however, you have to give up the ability to initialize disks. Basham’s program, hereby christened the Incinerator, works by making a temporary copy of the standard Applesoft garbage collection routine and mod- ifying it. The copy is placed in the DOS “nibble buffers”, a rather large memory area that gets overwritten whenever a disk is accessed. Since the disk is inaccess- ible while the routine is running, however, it's a nice safe place to go to bum the garbage. The modifications cause the old garbage collector to use two new routines at critical places. These routines, as well as the code that moves and patches the old garbage collector, resides in the DOS area normally used by the init com- mand. The program begins with a third section that installs the main body inside DOS. Here's the speed comparison from our January article with Incinerator timings added: Garbage collection tine In seconds unter of 005 3.3 Incinerator Profl0S strings 250 5 0.7 ot 500 13 15 0.2 100e a4 4.0 0.5 For those of you interested in such stuff, the complete source code for Basham’s Incinerator follows. You can study it with the help of the comments I've written. If all you want to do is use it, you can type it in by hand. However, if you have a modem, software that allows you to capture files, and access to Compu- Serve, you can also download it from the Micronetworked Apple User Group library (GO PCS-51). It filed in the "Apple II Hacking’ section, Select brouse from the menu that appears and enter INCINERATOR when you are asked for a "/key’. (All of the other programs in the first three issues of Oper-Apple are also now available in the MAUG library) Basham's original version—the one that now comes with Diversi:DOS—is connected to the Applesoft ampersand hook. | have modified the version pub- 18 Open-Apple lished here so that itis called automatically by DOS every time a carriage return is printed. On each call, the amount of unused memory left is checked. If there is more than about 1K, control quickly retums to DOS. Iftheré is less, collection occurs automatically. ‘To force collection, use the following command: POKE 49815, : PRINT : POKE 48816,4 . Fast garbage collector for 48 00S 3.3 ¥ —; By BL11 Basham, Diversified Software Research 1: January 1985 » —: Conments and D05 hooks by Tos Weishaar * public donain prograt .0R $4000 -TF_INCINERATOR COUNTER «£0 $45 INDEX EQ 85E STREND EQ. $60 the louer edge of string space FRETOP EQ $6F neu strings are stored From here dow MENSIZ £0. $73 the upper edge of string space, HIMEH FNENAM «EQ $B DSCLEN 0 SBF LoTR. 398, P3.DOSWRRM EQ $308 page 3 vector INITAOR «EQ. SSDIE_INIT’s entry in DOS cad jump table FHLINIT EQ SAEBE File Manager’s INIT instruction area RNIS.INIT £9 SBEAF RWTS‘s INIT instruction area cour -EQ SFDED Monitor's print-character subroutine n00.GARE £9 $8800 (SE484) Addresses of FP.GARE MOD.CONTINUE EQ $8808 (3E48C) entry points after 1NOD.CHECK.BUMP .£0 SBBCE (SESS2) relocation in 00S nOD.NOVEUP EQ SBBE4 (SE56B) nibble buffer. ‘W0D.RELO -£9 $8821 (SE495) Points uhere MOD. GARE NHOO.PTCH.2 .E SBBS2 (SE4D6) must be changed due to NOD.PTCH.2 «EO SBBBE (E542) relocation. FP.GARE .EQ 5E484 Address of original garbagenan INERATOR's string address buffers 0022: NSTR £0 34 of strings collected on each pass (34 max) DSC.AOR.LO £0 FH. INIT SC-ADR.HI .£Q DSC.ADR.LOFNSTR DSC.LEN £9 DSC.ADR HI NSTR FILINIT area (AEBE-AF@7) As used to save string variable table pointers. BCL: 8033: STR.AOR.LO .£Q S8C1L Left-over part of nibble buf STR-AOR.HI .EQ STR.ADR.LONSTR 18 used for string pointer: * ends at S8C56, thus 34 max ‘CINCINERATOR's installation routines ‘CHECK..00S ac First, check to make sure 00S Lon 1800 hasn’t already been modified. LOX 1800 Installing the INCINERATOR Lov #s01 ‘over an existing DOS patch <1 AOC P3.D0SWARMEL.Y could damage disks. ecc.2 INK Check is made by simply adding 4-2 POC INITAOR,Y ecc.3 IN +3 AOC FM.INIT.Y ec. INK <4 POC RATS. INIT,Y bcc.5 IN -5 OEY PL CMP SFL BNE 6 CPx 803 EQ INSTALL «6 LOK sAAS9 8 SIX $AAS9 RIS 9 HS 80 HS 0.87 AS INSTALL DEC INITAOR LOR 4856 STA SBEE Lov ns¢0 Loa TEST..GARB,¥ STA RATS. INIT. INy BNE 1 Lov seo -2 LOR 6. STA S9F2C,Y vey PL 2 Lox Int LOA 0 Isa ap sx RTS #8 80 #5 80.00 <6 IMP RATS. INIT iz INCINERATOR ain body These routines are moved into the RWIS INIT spacé are called by 00S every time something 1s printed. Wel. 1, No.2 together the first tuo bytes in each area to be aodified ‘and comparing the result with the standard DOS 3.3 result. If DOS has been moved to the language card area, or if program is run under ProDOS, Anclusion of page-3 uarastart vector (see $4007) uill cause check to fail. 00S ok, begin installation below. Cant execute; 005 modified. Save 00S stack pointer uhile printing error message. Print message. Restore stack pointer and quit. -AS ~"CAN’T EXECUTE.” ACTIVE DOS MODIFIED OR MOVED.~ Point INIT entry in DOS command table to an RTS--D0S INIT command now does nothing. Disable RWTS “forsat’ conaand. Move INCINERATOR routines to area normally used by the RWTS init command. Install hook in DOS. Putting hook at $9F2C ‘means INCINERATOR will be called uhenever a <return> is printed. Save DOS stack pointer while printing as Print successful-installation-message. Restare stack pointer and return to caller; installation done. AS -“THE INCINERATOR TS NOW INSTALLED.~ Hook to our routines; moved to $9F2C and TEST.GARB LOA ws04 ‘BEQ INCINERATE cc ‘AOC STREND+1 (CMP FRETOP+1 BCS INCINERATE DONE ne s9FAa Downloaded from www.Apple2Online.com Main entry point. First check to see if garbage needs to be collected. If lots of space is left, don’t proceed. The $04 at $49C5 aeans collection occurs only if there is less than AK free. Change it if necessary. Return to 00S to continue output. 1 INCINERATE * These routines move 8 copy of Aaplesoft’s original %* garbage collector into the DOS nibble buffers, patch it * so that it calls new routines at two critical places, ‘and then junps to the neu version. INCINERATE Loy 1813 <1 LOA FP.GARBSSFF,Y STA MOD.GARB+SFFY FP.GARB 1s Applesoft’s original garbage collector. First we move it into the DOS “nibble buffers” at $8808-8CS5. vey These are overuritten on all 005 BNE 1 calls, but we can use them for 2 -2, LOR FP.GARB,Y fmonent. here. ‘STR NOD.GARB,Y -NOD.GARE 1s what we call the new IN location, since the new copy will be ONE 2 patched by the routines below. Ya LOY WNSTR-1 ST¥ COUNTER Initialize COUNTER with the number of <2 STA STRADR.HI,Y strings (minus 1) and fill the string vey address buffer with zeros. PL 3 LOY 1503 LOX RELOCATION. TABLE,Y LOR RELOCATION. TRELE+4,Y STA MOD.RELO,X Adjust four adrs within MOD.GARE Uhat must change because it’s been moved. LOA 1588 (588 is the correct high byte ‘STA MOD.RELO®1,X for all relocated adrs.) Oey PL 4 Loy 502 = LOA PATCH.HOOK,Y ‘STA NOD.PTCH:1,¥ LDA PATCH.HOOK+3, Nodify GARB in two places so that it Juaps to our neu patch routines rather than doing things the old STA MOD.PTCH.2,Y FP way. vey PLS MP NOD.GARB Juap to the neuly eodified garbage * collector. RELOCATION. TABLE EQ *-TEST.GARB+RNTS. INIT HS 00,19.70.EF.9F.95.9F Data needed for relocation. Patch for original move-string routine. PATCH.WOOX £0 *-TEST.GARB+RATS. INIT .JNP_SAVE .ADRS INP MOVE .STRINGS * * MOVE.STRINGS is called by our modified garbagenan © after a complete scan of the string variable tables has been completed. MOVE. STRINGS eri: EQ. *-TEST. GARB#RUTS. INIT 4 First find the highest address in our buffer. LOA HNSTR Initialize counter with the nuaber of STA COUNTER ‘strings our buffers will hold. FIND.HIGH LOX WNSTR=1 X ks First adr: becones the highest found. LOY HNSTR-2 Y points to the adr under study. HI.CHECK LOA STR.AOR.HI,Y CrP STR.AOR.HT,X BCC _NXT.HT BNE NEW.HI LOA STR.ADR.LO,Y CrP STR.AOR.LO,X CC NXT.HT Current is less, next please. NEW.HI TYR Current Js greater, move current TAK pointer to X. Conpare current to highest found so fa Current is less. Current is greater. Can’t tell, test low byte. NXT.HE DEY Continue until entire buffer has been PL HI. CHECK ‘scanned: X then points to highest x string in buffer. aa — roe E = z * Pass this address to a section of the * original garbage collector for moving. LOA STR.AOR.HI,X Get highest adr BED DONE If zero, we've moved them all. Collection conplete, raturn to 005 STA LONTRAL Pass Lt to MOD.CARB LOR STR.AOR.LO,x STA LOATR LOR ns00 Renove this address from buffer STA STR.AOR.HI,X LDA DSC.AOR.HI,X Pass the descriptor address and length STA FNCNAML to NOD. GARB LOR OSC.ADR.LO,X STA FNCNAM LOA OSC.LEN,X JSR MOD.MOVEUP Tell MOD.GARB to nove it. * Repeat until everything in buffer has been eoved. ST FRETOP Adjust FRETOP STA FRETOP+1 DEC COUNTER Continue until all adrs BNC FIND.HIGH An buffer have been soved. LOY aNSTR-1 Reset counter for SAVE.ADRS ST¥ COUNTER HP MOD.CONTINUE find continue search. © SAVE.AOR is called uhen MOD.GARB has found a string higher * than the Louest string found so far. SAVE.ADR saves * the address of the string and its variable-table * descriptor address and length in our special buffers. * The new string’s addresses overurite those of the lowest * string Found up till now Afterwards, a scan is rade of the buffers to redetermine the address of the lowest string found so far. The address of that string 1s passed to NOD.GARB and the pointer to it is saved so that any higher string found will overurite it. SAVE.ADRS EQ *-TEST.GARBVRUTS. INIT LOY COUNTER Get current index to adr-save buffers. STA STR.ADR.HI,Y High byte of string adr in Az store it. 1A Lou byte of string adr in X; store it. STA STR-AOR.LO,Y LOR INDEX+L High byte of descriptor address was in STR DSC.AOR.HI,Y INDEX+1; store it. LOR INDEX Lou byte of descriptor address was in STA DSC.ADR.LO,Y INDEX; store it. LOA OSCLEN Descriptor lengths store it. X starts as ptr to first adr in buf; * becomes ptr to lowest adr in buf. LOY aNSTR-2 Y is pointer to adr now under study. Low. CHK LOA STR.AOR-HI,X Compare current low to adr under study. BEQ LONE If current low 1s zero, exit. CNP STR.ADR.HI,Y G29] 8cc wxT.LOW Current lou is lover, next please BNE NEW.LOW Neu adr is lower, point to it with x LOA STR.AOR.LO,X GNP STR.AOR.LO,Y Can't tell--test low byte. BCC NxT-LOW next please NEW. LOW va Move pointer aimed at current adr to TAK pointer for lovest adr NXT. LOM Oey Check next adr in buffer till PL LOW.CHK there aren‘t any more. LOA STR.AOR.LO,X Then take the louest address ue have in sta LoNTR the buffer so far and put It in LOWIR, LDA STR.AOR.HI,X 50 MOD.GARB will call us if it Finds STA LOWTReL any higher strings. Loon STX COUNTER Save ptr to lowest string as new index. INP MOD.CHECK.BUNP Return to MOD.GARB to continue search. 20 Open-Apple A Song Continued We descended into the murky depths of the Apple Monitor last month, examined memory asa dump of hexadecimal values, as machine language code, and as ASCII characters. | explained how to change the contents of any memory byte from one hex value to another. While these are the most common uses of the Monitor, it can also do other useful and interesting things. The Monitor was actually designed as an assembly-language-program debug- ing aid. Nowadays — nearly a decade after Wozniak designed it—much better debuggers are available. Nonetheless, the fact that this one has been built into every Apple ever manufacturered makes its features worth further investigation. It is difficult to stamp out all the bugs in assembly language programs without some way to stop the program at trouble spots and see what's happening, The standard method for doing this is to use the break instruction. The machine language code for a break is $00. To see what happens when this instruction gets executed, let's put one at address $300 and jump to it. Here's how: *300:0 . [press return to check) 2300- 0@ @2 00 02 20 00 00 00 *3005, e302. Ae0@ x00 When you enter 500G, your Apple executes the break instruction we just put at that address. This causes a “crash” back into the Monitor. You will heara beep and seea one line display that begins with an address. The address is always two bytes beyond the location of the crash-inducing break instruction. The rest of the line shows you the status of your microprocessor when the break occurred. The 6502 microprocessor found in Apples has five special memory locations, called regis- ters, that do all the work. These are called the A, X. ¥, P, and S registers. The display shows what values were in these registers when the break occurred. Aftera break, youcan List your program or examine memory. Ifyou need to refer back to what the contents of the registers were when the break occurred, you can do so with the contro-E(xamine) command, like this: . (press control-£, return) 8200 X=00 ¥=0@ P=30 SFO You canalso load the registers with any desired values before executing aroutine byusing controE, enteringa colon and the desired memory values, and Going to the desired routine. In the following example, we put newnumbers in the A, X.andY registers and jump to our break instruction to see if theyre really there: . (press control-£, return) Ae00 x=00 ¥=00 P30 S=FO vl 22:33 #3008, 32-— ALL X=22 Y=33 P30 SFO ‘Note: unless you know what youre doing, don't try to change the contents ofthe P or registers. The effect can be dramatic. ‘Meet Mini. The Monitor program built into the original Integer Basic Apple Il also had commands for stepping through and tracing machine language pro- Grams, as well as a Mini-Assembler. The MintAssembler allows you to enter a program in assembly language. Itstill existsin the Integer Basic image on DOS 33 ‘System Master disks, but the S(tep) and T(race) commands are unavailable to all buta few old-timers. ‘The MintAssembler is useful for entering short and quick assembly language programs. It doesn’thave many of the features of a full-blown assembler, however (such as labels, equates, and assembler directives), so its usefulness is limited. To get it running, boota DOS 3.3 System Master disk and enter the intcommand to get into Integer Basic. Then call -2458 (or drop into the Monitor and enter F6660). The rin Assembler prompt is the exclamation point. All Monitor commands work within the Mini-Assembier if you start a line with a dollar sign. To begin an assembly, enter the address at which you want the machine langage to go, acoton, anda mnemonic: Vol. 1 No.2 DOALL -2458 15300.30F (beep) (S means this is a Monitor comand) 0300- 00 €2 00 00 08 60 00 08 2308- 00 08 00 08 08 08 08 08 "300:LDA MCF (start adr, colon, instruction) 0300-99 CF Loa asor JSR FOED (note space before JSR) 0303-20 ED FD JSR SFOED To get out of the Mini-Assembler, press reset. Enhanced ROM enhancements. The Mini-Assembler can also be foundin the new enhanced ROMs for the Apple Ile. You can start up this version of the Mini- Assembler directly from the Monitor by entering an exclamation point. The enhanced Ile ROMs also have a new search command that finds all ‘occurrences of a one- or two- byte value in a specified memory range. The command for finding two sequential bytes with the values $ED and $FD in the range from $F800 to $FFFF is FDED<F800,FFFFS. Note that the value to be searched for is entered backward (which makes forward if you're looking for an address pointer that’s stored backward) and that the line ends with an “S”. You can also search for a single byte (ED<F800.FFFFS), butyou can't search fora two- byte pair if the first byte is a zero. The lic’s Monitor, although otherwise similar to the Monitor in the enhanced Ile ROMS, doesn’t have these features. On the other hand, the IIc Monitor's list command (examined last month) correctly disassembles the additional com- mands in the 65C02 microprocessor's instruction set; this is something neither Me Monitor can do. March 1985 More Commands. There are several fairly useless commands available from within the Monitor. W(rite) and Read) are used to save and recall ranges of memory toand from cassette tape. The lIcis missing these commands since it doesn'thave a cassette interface. Still around in all versions of the Monitor, but of little value since the introduction of DOS, are the control-B(asic), contro!-Ciontinue Basic), control-P(rinter), and control-K(eyboard) commands. Control-B will coldstart Basic, jumping out of the Monitor and erasing any Basic program in memory. Control also jumps from the Monitor to Basic, but does a warmstart and leaves any Basic program intact. To keep DOS active, 3D3G (DOS/Basic coldstart) and 3D0G (DOS/Basic warmstart) should be used instead. Control-P and Control-K are the equivalent to the DOS pr# and in# commands. Avoid trouble and use the DOS versions. ‘Two more infrequently used Monitor commands are I(nverse) and Normal). These commands affect the way characters are printed. They work just like their Applesoft brethren. N(ormal)is also often used to separate several commands ona single command line, much like the colon is used in Applesoft. We used it that way ourselves last month in line 500 of the Lam Technique demonstration program (page 13). And we use it that way again momentarily. Monitor: with bells, Hexadecimal arithmethic is easy with the Monitor — ifyou are willing to limit your questions to two digits and can put up with two-digit answers. Watch this: 127480 oF 10-0 =51 "30-98 0 +5090 =e Onlyaddition and subtraction work. Multiplication and division are not supported. The Monitor includes commands that allow you to move a range of memory toa new location or to compare two ranges of memory with each other and print the differences. The format for these commands is { destination} < {start}.{end} fol- lowed by either aM(ove) or Verify) command character, Note how the less-than sign forms a little arrow that graphically displays which way the bytes will be moved. Here's how you use them: +800¢300.3FF1 {noves the $300-83FF range to $800-S82F) (verify that the aove took place--no response means that it did.] ¥900¢300.3FFV (compare the $300-$3FF range to $3€51-S9E80. ) (discrepancies: unber after dash 1s value at address shoun punter is parantheses 1s value at corresponding address in comparison range.) ¥96516300.3°FV @y2-8F (aC) 33-90 (65) 04-98 (FF) The first line above demonstrates the M(ove) command, This command copies an image of the $3D0-$3FF memory range at $800-($82F). The image at $3D0is left unchanged, although this is not always the case, as we'll see shortly. The second line demonstrates the V(erify) command. Here we ask the Monitor to compare the $3D0-83FF memory range with what's at $800. It does so and reports all discrepancies. Since our move command just made these ranges match, there are no discrepancies to report. The third line compares the $3D0-S3FF range with a range of memory inside DOS 3.3 at $9E51-$9E80. The two areas should be similiar, since Uncle DOS moves what's at $9E51 to$3D0 whenever a disk is booted. As youcan see, three bytes are different. The number after the hypen shows the value at the address displayed on the screen; the number in the parentheses shows the corresponding value in the range being verified. Now, consider what happens when the range of memory we are moving overlaps the range of memory we are moving to. If we are movinga memory image lower, the move will take place normally. in the process, however, the overlapped part of the original image will be destroyed. When we move a memory image higher, on the other hand, an interesting thing happens. The portion of the image that does not overlap is repeated throughout thenewrange. You can quickly filla range of memory with a specificvalue or pattern cofvalues, for example, ike this: #2000:FF N 2001¢2000.2006M (Put FF at 2000, useN(ormal ) as a command separator, M{ave) contents of 2000-200E ta 2001.) Oper-Apple 21 ¥2000.200F (Displayneu contents of 2080-200F .) 2000- FF FF FF FF FF FF FF FF 2008- FF FF FF FF FFF FFF The 2000:FF initializes the first byte of the range. The Ntells the Monitor we are done with the memory change command and now want to enter another com- mand, The 2001<2000.200EM moves the value now at byte 2000 into bytes 2001 through 200F. The generalized format for the M(ove) command used in this way—when length indicates the length of the pattem to be repeated—is: {startelength} < {start} . fend-length} The machine language command 20 DD FB will beep your Apple's speaker. Want toheara thousand beeps? ‘ry this: 2000:20 DD FB N 2003<2000. 2884" N 2888:60 N 20006 That command line only takes about 114 seconds to execute. The 2BB8:60 puts ‘machine language command at the end that returns us smoothly to the Monitor. ‘Try 2000L Then try LLLLLLLL. Amazing stuff. Or perhaps you'd prefer: +N FBDOG 34:0 (put a space after the zero, befere you press return) This trick creates a repeating command. Start the line with a single letter command, end it with 34:0(space). This pokes a zero into byte $34, which causes the Monitor to start executing the line over again at the beginning, If you want to start beyond the beginning, replace the zero with the number of the character you want to start with, minus one, Enough tricks. The pointis that a familiarity with the Monitor, which is available in every Apple II ever built (and few other kinds of computers), gives you the power to control your machine at a ery elementary level. The box on the previous page summarizes the Monitor's commands. Help for the absent-minded Absent-mindedness is a common fault, especially around here. Conse. quently, we have a great deal of sympathy for those who manage to destroy important files by mistake. Word processing and spreadsheet files are particularly vulnerable. The prob- lem is that most programs’ save and load commands are easily mixed up. A frequent cause of file loss is that a user absent-mindedly saves a blank screen over the top of a valuable file. Listen carefully on any clear evening and you will hear crys of ile-loss anguish emanating from chimneys in most major cities. However, ifthe word processor or spreadsheet program uses DOS 3.5 textfiles, the lost data is easily recoverable. This is because DOS 3.3 doesn’t remove the old file from the disk. Instead the new contents are written over the top of the old contents and an end-of-file mark (control-e, hex $00) is placed at the end of the new stuff. If the new contents consist of nothing (a blank screen), only one character of the original file is destroyed (the one under the new end-offfile mark). To recover the file, all you have to do is replace that fileending zero with something else. ‘Typically this is done using a disk-edit utility. I once used this technique to recover a large section of a friend's Masters Thesis and prevented a potential suicide. The technique requires some expertise, however. Abetter way, once you get DOS 3.3's append command working (see the back page of this letter) isto let append find the end-ofite mark, then overwrite it with a carriage return. When the file is reloaded into the word processor or spread- sheet, it will burst forth virtually unscathed (damage to word processor files will be at the beginning; damage to spreadsheet files will be at the end). Here's a program that uses this trick. Go out and save a few lives with it. 10 REM Phoenix 100 HONE : VTAB 12 : DS=CHRS(4) 110 PRINT “PLEASE INSERT DISK WITH LOST FILE.” 120 PRINT“ WHAT IS THE NAME OF THE FILE” 130 PRINT 140 INPUT “"3F 150 PRINT DS;"UNLOCK "ZFS : REM Create error if File-nat-Found. 160 PRINT DS;“APPEND“3FS : REM Move File pointer to end-of-File marker, 170 PRINT DS;“WRITE™:FS = REM 17S PRINT 180 PRINT D8; “CLOSE“:FS pverurite marker with a <return>. 2 REM Rest of file magically reappears. 190 PRINT “FILE FIXED!” : END Ask (or tell) Uncle DOS Loose Ends Last month left some questions unanswered, and a couple of them still have me puzzled. But readers have helped with answers to some. Regarding AppleWorks and non-Apple printers and interface cards: Apple has released an updated version of AppleWorks to dealers that solves this problem. Dealers are supposed to update your orig- inal disks for free. Call ahead to make sure your dealer has the update. My source on this one highly recommends you insist on talking to the dealer's technicians, rather than salespeople, for this and all similar problems with Apple programs and equip- ment. It's the technicians that Apple notifies about such bugs and how to fix them. My source adds that the ProDOS version of AppleWriter has the same problem—dealers have also been issued a fix for this. One of last month's letters asked how to do an 80- column screen dump. In the response to that letter, I mentioned that my printer garbled when | printed while the 80-column screen's even columns, which are stored in auxiliary memory, were turned on. But I didn't know why. The reason occurred to me as soon as the letters were printed. Printer interface cards, like most Apple II peripherals, use a small amount of memory inside the text screen. This area is usually called the scratchpad area, or the screen holes. When the even columns are on, the scratchpad area the interface card is using disappears; thus the problems. If you need a faster 80-column screen dump, delete tine 505 from last month's program (page 15), remove the “L$+" in line 340, change line 560 to “PRINT L$+CHR$(PEEK(ADR));”, and remove the “LS” from line 380. Remittance bug revealed Tom, try this program: {EM L year subscription price {EM 2 year subscription price 30 PRINT (¥1#2)-¥2 RUN 4 Why do your bills say a two-year subscription is an $8 savings? Philip Straus Philadelphia, Pa. My error. Abby, Open-Apple’s spokeswoman, nearly resigned when she saw your letter. She agreed to continue with Open-Apple only if | tacked a couple of extra months onto the subscriptions of those of you who actually paid $44, and I've done so. Input comma no garbage Ihave an addition to the Selective String Preserva- tion technique for avoiding garbage collection that you wrote about in the January issue (pages +5). Here's a routine that replaces Applesoft’s inputcom- mand so that commas are allowed. Normally rou- tines that use get like this cause garbage collection to occur frequently, but this one doesn’t create any more garbage than input itself does. As written, the routine also filters out control characters. 5 SL=PEEK(111) : SH=PEEK(112) . 10 255 5 PRINT AS: F ASC(AS) = 13 THEN C=255 : GOTO 95 + IF ASC(AS) > at THEN [5=15+88 56 NEXT 57 PRINT 58 POXE 111,SL : POKE 112,34 989 ISeW1D8(I5,1) e 56 1S is made permanent by line 59, which makes a new copy of it after the pointers at 11] and 112 have been changed to erase the temporary copies of A$ and I$, They will be overwritten and won't cause garbage collection. Jim Parr Bloomington, Ill. Fast garbage bugs | tried the fast garbage collector published in the January 1981 Call -A.PPL.E. and mentioned in your January issue. | had some trouble getting it to work. ‘After studying the code, I discovered some bugs. The ‘subroutine NZTAB, which zeros out the address table, ends with a JMP to FNDVAR2, not an RTS. Conse- quently, the initial call to NZTAB should be a JMP, not a JSR, and should occur just before FNDVAR2, between lines 63 and 64, not at line 59. In addition, the Y register should be cleared when a new address is placed in INDEX. Add a LDY #0 just before lines 69 and 79. Steve Hunt ‘Cambridge, Mass. There was one more bug. Val Golding, editor of Call APPLE. when the original program was pub- lished, tells me he misspelled the author's name and I reprinted his mistake, The author's name is Randy Wigginton. I's an important name to spell right, as Randy has been involved with Apple since, as a 16- year-old in 1976, he hitched rides to Homebrew Computer Club meetings with Steve Wozniak. He's been one of Apple's most prolific wizards ever since. Rana, A.P.P.L.E, Abacus Your February editorial about DOS 3.3 was on the mark, and raises an interesting question. How do people who make double-sided drives (e.g, Rana Elite Il) make them compatible with DOS 3.5? Do they define a logical track to be two physical tracks— presumably one on each side of the disk? This would create, in effect, tracks with 52 sectors, which you say DOS 3.5 can handle. limagine this scheme would not require any repositioning of the head to read all data from any logical track. Speaking of Rana, while | still see their products being advertised by a number of mail order houses, they appear to have completely discontinued their ‘own advertising, 1 was greatly interested in their 8086/2 unit since it provides MS-DOS compatibility for the Apple as well as high capacity drives usable under all four operating systems that run on the Vol. 1 No. 2 Apple (DOS 3.5, Apple Pascal, CP/M-80, and ProDOS), lobtained a pre-publication copy of the 8086/2 man- ual, and actually saw a unit once at a dealer, though like most dealers he couldn't answer a single ques- tion. A friend of a friend has one, and while the level of compatibility with the IBM PC is notas high as one would like, he reportedly is satisfied with it.I wrote a lengthy letter to Rana asking a number of questions about six months ago and never got an answer. I'm still interested. | still have all those unanswered ques- tions and one more besides: How come you don't hear anything about a product that once seemed destined to sell several hundred thousand copies at ‘over $1,500 each? [would like to call attention to a situation that I feel is deplorable, especially since it involves a group in which [had placed considerable trust and which had enthusiastically recommended to many friends. The billing policy of APPLE. (the user group in the Seattle area that publishes Call-A.PPL.E. magazine) doesn't conform to the standard practices of ethical mail order merchandising, On December 1, | ordered sev- eral software packages from them by mail. They billed my credit card on December 11, and as of late January they had not yet shipped me anything and refused to make a commitment on when they would ship. Standard practice is to bill only at the time shipment occurs. | like to think of APPL.E.asa group of the Apple community's most upstanding citizens, so this incident comes as a grave disappointment. On a more pleasant note, | would like to recom- mend the 128K RAM card manufactured by Abacus Enterprises, P.0. Box 1836, Detroit, MI 48231 (313- 524-2444 voice, 313-524-0238 300 baud). | think it is a super product and the service provided by Aba- cuss outstanding, The hardware is unique in that an external switch allows the card to emulate either the Saturn or Legend bank switching protocols. The card can be write protected, also by means of an external switch. Abacus has released a software package called Back-to-Back that allows swapping images of the lower 48K of RAM into and out of the 128K card at the press of a button. This makes it possible to suspend operaton of one program, toggle to a second and, at the press of a button, resume opera- tion of the first right where you left off. Abacus also provides avery easy-to-use RAM disk emulator for use with DOS 3.3, Dan Strassberg Arlington, MA Rana provides a highly modified version of DOS 5.3 with its high capacity drives. It actually has two Volume Table Of Contents sectors on each disk and is consequently incompatible with tots of stuff including ProntoDOS. | picture Rana as a company that tries just a little bit too hard. Their products do wonderful things nobody else can do, but at the price of compatiblity problems that keep them out of the fast lane. Like you, I've bought tons of stuff from APPLE. over the years and have recommended them in this letter and other places. Like you, | recently had an order delayed. The folks in Seattle say they ran into unexpected problems with a cross-town move they made in late December, and that is why customers are experiencing delays. Asa certified mall order junkie, Icommend you for having the good sense to pay by credit card, and I recommend that everyone buy mail order goods that way when possible. If APPLE. still hasn't shipped, complain to your credit card company and let them handle it. That will get A.PPL.E-S attention. March 1985 Acharming difference You say the S.H, Lam technique for entering Mon- itor commands from inside Basic programs (Feb pages 12-13) works fromwithin a subroutine. But the same routine appears on the Beagle Bros Peeks, Pokes and Pointers chart and the chart says it won’twork within a subroutine. Who's right? Uncle Louie ‘San Diego, Calif. Both of us. In the version shown on the Beagle Bros chart, D823G is tacked onto the end of the Monitor command string. In the Open-Apple ver- sion, D9C6G is tacked on. Both formulae cause the Monitor to jump to charmed spots within Applesoft, however, one spot is more charmed than the other and works from within subroutines. Who needs OPEN In January's Digging Into DOS (page 2), the straightforward way you give to read a text file con- tains an extra step. For reading text files, open is a redundant command. If you want to open abc and read from it just print d$;"read abc”. Looking at the code for read, it’s easy to see why openis not required. The first thing DOS does in read is to check whether the file is open. If not, it opens it. Ino longer use the open command for reading text files. An added advantage is that a file is not created ifit doesn't already exist—you'll get a file not found error instead. ‘The write command works in a simliar manner. Charles H. Putney Shankill, Co. Dublin, Ireland You are absolutely right. The only problem with this trick is that Apple never documented it; conse- quently the ProDOS developers apparently didn't know about it; consequently it doesn’t work with ProDOS. Disk free space In the March 1984 issue of Softalk, you wrote about the DOS 3.3 Volume Table of Contents and you printed a Basic program to calculate the number of free sectors on a disk. I have used that program as a subroutine in a larger program, which is now running under your ProntoDOS. | am getting very limited by having DOS at 48K, and the program is causing Applesoft’s garbage collection to occur very fre- quently. [ would like to use your DOS-UP program on the ProntoDOS disk to move DOS up to the top 16K. Can you tell me where DOS's VTOC buffer is located after DOS has been moved? Robert Nyberg Tucson, Ariz. It's 16,384 ($4000) bytes higher than before, but that information won't help you much. If you look at that address range from within a Basic program, what youl see is the machine language code of Applesoft itself, not DOS. If you turn the upper 16K of memory on so you can see DOS, your Basic program will crash because Applesoft will disappear. You have to peer at the high reaches of memory with an assembly language routine. A better approach to solving your problems may be to use the garbage collection tips published in this issue and inJanuary’s. Although I've written a program for moving DOS to the upper 16K of memoryand although many, many people use it, my experience has been that moving DOS often causes as many problems as it solves. If you are writing pure Basic with no assembly lan- guage routines and no fancy tricks, a relocated DOS works great. But as soon as you try to fine tune things, problems begin to occur. Another approach to consider is to switch to Pro- DOS. This won't increase the amount of memory available, but it gives you fast garbage collectionand a chain command that’s quick and easy to use. On 128K machines you'll have the ProDOS /RAM disk; you can use it to keep the chained parts of your program available for quick access. Finding the number of free blocks on ProDOS disks is pretty easy. Fish it out of the catalog, which you can open andread like any other file, 80-columns & machine language How do you activate or deactivate Apple’s 80- column card from within a machine language pro- gram? After the card is activated, what routine is used to write a character to the screen? Tom Carlin Cleveland, Ohio First, the easy stuff. Once you have the card tumed ‘on, you send characters to it from machine language by loading the character into the A register and doing a JSR to COUT ($FDED)—exactly the same procedure as used in 40 columns, To deactivate the card, simply use this procedure to print a Control-U. Other fancy things you can do by sending control ‘characters to COUT with 80-column mode activated are: ASCII action val control chr rane cursor moving codes/none clear any part of the screen # $03 backspace left one character y SIC fud. space right one character J $28 Lire feed down one Line " $00 return left edge and down one y $19 hone upper left corner text moving codes/neither moves the cursor MSI? scroll up text eoves up V¥ $16 scroll doun text aves doun screen clearing codes L sec clear uhole screen K $08 clear E05 cursor to end of screen } $10 clear EOL cursor to end of line 2 SIA clear line clear Line cursor ison other codes SOF inverse begin inverse display N $0E normal begin normal display Q $11 40-colunn begin 40-column display R $12 82-colunn begin B0-colunn display u 315 quit turn 80-colunn card off Tuming the card on varies depending on whether you want DOS to remain connected or not. If youare using DOS 5.3 and you leave it connected, Uncle DOS will respond to commands that are preceeded by a return and a control-D, just as he does from Basic. Simply send the command to COUT one letter ata time. In this situation, youtumon the 80-column card by sending DOS the command PR#*3. ProDOS does not respond to commands sent to COUT from assembly language programs. You must use the ProDOS machine language interface, or, if your machine language program is CALLed from a Open-Apple 23 Basic program, you can poke the command string into the keyboard input buffer at $200 (don't forget to put a retum at the end), and do a JSR DOSCMD ($BE03) to execute it. Once again, use PR*3 to tum ‘on the 80-column card. (CAUTION: several com- mands, including read, write, and append, don’t work correctly when initiated with DOSCMD,) Ifyou don’t need DOS, tum on the card like this: 903 LOR 8803 —_—GB-colvan slot number 20 95 FE JSR QUTPORT do a pri with stC95, se LOR 888) return 2@.C0 FD JSR COUT print it with aF0eD Big Boy Data Managers Is there a good database manager for the Apple IIc that will accomodate 15-20 thousand names and cross reference them with about 25 categories? Lowell Levinger Inverness, CA J haven't tried all of the database programs avail- able for the Apple, but of the ones | have used, the database manager in AppleWorks is my run-away favorite. | think it's the strongest of the three pro- grams that comes with AppleWorks. It won't do what you want, but keep reading. After trying for a couple of weeks to set up Open- Apple's subscriber records with a “high-powered” Apple Il database manager (and getting nowhere), I turned to AppleWorks and had the whole thing set up, complete with several kinds of status reports, in asingle aftemoon. Since then I've written some Basic programs that read AppleWorks-generated text files and do spe- cial manipulations (such as, while printing monthly ‘mailing labels, also printing an invoice label for the remittance envelope if an account is unpaid). Apple- Works’ ability to generate standard text files holding data it has sorted, selected, and formatted is a very strong feature of the program. If you have a lic, you should have AppleWorks anyhow, so if I were you I'd start with it. It's quite easy to use and is a good place to organize and practice using a database. It won't be your final solution, however—the great limitation is that you won't be able to get anywhere near 15,000 records inasingle file. Usinga llc you'd probably need about 30 separate files to hold that much data. There is a possibility this wouldn't be a problem for you, but that’s unlikely. By starting with AppleWorks, however, you'll have a clearer idea of what you want to do and how to doit. Its great advantages are speed, ease of use, and clarity. Sorting a 500 record file takes less than 10 seconds. You can move from record to record instantaneously. You can display a whole screenful of records at the same time and scroll through them. Once you see what AppleWorks can do with a sample of your data, you'll be in a better position to judge other database managers by their instruction manuals. Given ProDOS, there is no theoretical rea- son why a IIc shouldn't be able to handle a database as large as yours. I would recommend a hard disk or other high-capacity storage device to avoid finger blisters caused by constantly opening and closing disk drive doors, however. It’s also necessary to consider how often the records in your file are to be updated. If the records consist of something like daily meal requests for 15,000 people, the Apple IIc will be woefully inade- quate simply because one person working at one computer can’t update that many records in one 24 Open-Apple day. If the records are updated yearly, on the other hand, a single person using good software and a lic will be able to manage the data and do lots of other stuff, too. Always keep in mind the limits of what one person using one computer can do when organizing this much data. Sometimes you just can’t handle it without going to some kind of multt-user system. Another big boy ‘Acompany here in Texas called Applied Engineer- ing has a card for the Apple Ile that can expand memory to as much as 1 megabyte (1,024K bytes). The company also offers a patch for AppleWorks that will allow the user to have an 800K desktop. That " should quell some of the blithering about how limited AppleWorks is due to memory restraints. For the price of an IBM PC and Lotus XYZ a smart user could have a Ile with 1 meg of RAM, Apple- Works, and the Sider hard disk drive. There might even be enough left over to buy a joystick. This would turn the Ile into a real mother-hummer. It might also make afew of the PC parrots choke on their crackers. Gary Maddox Weatherford, Texas You think just like I do. | have one of Applied Engineering's cards on order—look for a complete report here ina month or two. The DOS 3.3 append challange Could you discuss the bug in the append com- mand of DOS 3.3? When the file being appended to ends at the end of a sector, it doesn’t work. I have discussed this with Apple, but they had no help to offer. Is there a way to fix this? Ferd G. Fender Glenview, Ill DOS 3.3's append command graphically demon- strates the difficulty of getting all the little bugs out of complex software. Apple has officially modified append three times and still doesn’t have it right. 1 have officially modified it once and didn't get it right either, So it's with some fear and trembling that I enter this discussion. Append is very similar to the DOSopen command. You use it to get a specific text file ready for reading from or writing to. When you use open, DOS alms its position-in-file pointer at the first byte of the file. When you use append, on the other hand, DOS alms its pointer at the byte just beyond the last byte in the fle. your next actions to write to the file, what you Open Apple is a trademark of Tom Weishaar. Apple Computer and (Open- Apple are two dilerent. unrelated, independent companies thal wish everyone in the world had an Apple write will start at the end of the file, rather than the beginning, and thus will be appended, or added to, -the original fite. If your next action is to read from the file, youl get anend of data error.) Unlike ProDOS, DOS 3.3 doesn’t keep a record of how long text files actually are. When you issue an append, DOS 3.3 simply starts reading the file and continues until it comesacross a byte holding a zero. By definition, the first zero byte encountered marks the end of the file. However, by the time DOS retrieves the zero, the position-in-file pointer is aimed at the next byte—the byte beyond the zero. So DOS next executes an internal position command to back up the position-in-fle pointer by one byte. So far this all seems pretty simple, right? What I've Just described is exactly how the DOS 3.2.1 append command worked. But there's a bug here. While a zero byte in afile is themain method for marking the end of the file, it's also possible for a file to simply have no more sectors. This happens whenever a file's length is a multiple of exactly 256 bytes. The final sector in the file will be completely filled with data, there will be no more sectors assigned to the file, and there won't be a zero anywhere in sight. In this situation, the positionin-fle pointer doesn’t get bumped up an extra notch, yet append insists on bumping it back a notch as usual. The effect is that the final byte of the originat fie is overwritten by the appended material whenever a file ends exactly on asector boundry. When the original version of DOS 5.3 was released (around here | call it DOS 3.3.0), a patch was added to take care of the problem. Unfortunately, what should have been asimple test in the append routine to determine whether the position-infile pointer should be reset or not became a 74 byte patch of amazing complexity. However, it fixed the bug. Yet, like many patches, it added a new bug of its own. This bug is quite obscure —let’s just say that when the stars are right, the DOS 3.3.0 append command will still fail to work. It was about this time that yours truly wrote ProntoDOS for Beagle Bros. Much of the room for the ProntoDOS routines came from removing Apple's 74-byte patch. | solved the major append bug and got rid of the exotic one with just a few bytes of code. I bragged that | had solved the DOS 3.5 append problem. Such fat-headedness is always inappropriate for assembly language programmers. For there was yet another bug. The position rou- tine that DOS calls to notch back the position-in-file pointer doesn't work correctly if the file being appended to ts longer than 32,767 bytes. Art Schumer described the bug in an article that appeared in the August 1982 Call -A.PP.LE., page 57. (it’s also inCall-APPLE. In Depth #3: All About DOS, page 191) Unfortunately, I didn’t come across the article until several months after | had finished ProntoDOs. The folks at Apple saw the article, however, and when they released a new version of DOS 5.3 forthe le in January 1983 (1 call this version DOS 3.3e), they fixed this bug. Rather than using position to notch back the pointer, the Ie version modifies the pointer by hand. Apple also added 13 additonal bytes of code to fix the more exotic bug in their original 74-byte patch. Was everybody happy? Does this story have a pleasant ending? Not yet, gentlepeople; Apple's new patch made things even worse. The position-in-file pointer within DOS is three bytes long. One byte is aimed at the byte offset vol. 1, No.2 within a sector. The next byte is aimed at the sector number—until it hits 256 anyhow. Then the third byte comes into play and the second byte starts over again at zero. ‘Apple's DOS 5.3e patch only adjusts the lowest of these three bytes. Whena file-ending zero appears in the final byte of a sector, the middle byte of the pointer will have been advanced to point at the next sector. But since the patch doesn’t decrement the middle byte, the position-in-file pointer ends up aimed 256 bytes beyond where it Should be, DOS 3.5e’s append falls completely once every 256 times, In September 1985 Apple released a third version of DOS 3.5, Apple's people said this would be the final update to DOS 3.5, since ProDOS would be introduced within a few months. (I call this final falrly-fixed version DOS 3.3)). This version expands’ the 3.3e patch to decrement the middle byte of the position-in-file pointer correctly. However, it still ne- glects to decrement the high byte of the pointer when necessary; consequently even this version has an append that will fail if you try to add something toafile that's exactly 65,535 bytes tong. The program that follows fixes all the append bugs 1 know about in all three versions of DOS 5.3. Enter and run the program and test the results on a few fles. If everything works, you can initialize a new disk and the changes will become a permanent part of the DOS on your new disk. With standard DOS 3.3, the patch overlays a portion of Apple's useless 74 byte append patch and thus requires no additional space. ProntoDOS, however, already uses that area for something else. If you are a Pronto user, start with an unmodified copy fresh from the original Beagle Bros disk. Then enter, run, and test this program. After the append patch has been added, you can use Pronto Update to add most, but not all, of the other ProntoDOS enhancements and to update your disks. Don't run this program after making other enhancements to ProntoDOS or trouble could result. (if you are a DiversiDOS user, incidentally, your append command already works correctly.) 10 IF PEEK(978)O157, THEN PRINT “48K 00S 3.3 NOT ACTIVE." : END 15 PRINT “Installing APPEND patch... 20 REN identify 00S type 21 ID=PEEK( 45725) 22 IF ID=165 THEN 0} + GOTO 30 23 IF ID=186 THEN 0} GoTo 30 24 IF 108182 THEN 07 + GOTO 30 25 IF 10=206 THEN OTS="ProntoD0S” : GOTO 40 26 PRINT “ACTIVE DOS NOT RECOSNIZED.” : END + GOSUB 500 + GOSUB $00 34 AS="B652" : GOTO se 40 C4="AGCO:83 86° : GOSUB 500 44 05="B6E3" 50 C$-AS+":80 18 AC £6 B5 00 10 AC EA BS 0 6 AC ES 85 Fe aC CE ES BS CE £4 aS CE EG 85 20 76 FE 60 32 PRINT OTS: 54 PRINT “APPEND now works with any size file.” 56 END + GOSUB See currently active. 500 CS=C8+" N DSCC" 510 FOR I=1 TO LEN (C8) : POKE SL1+T, ASC(NID8(CS,1,1)]+128 + NEXT 520 POKE 72,0 : CALL -144 530 RETURN
mp.ls