Path: utzoo!attcan!uunet!ginosko!brutus.cs.uiuc.edu!wuarchive!decwrl!shlump.nac.dec.com!esteem.enet.dec.com From: fitzpatrick@esteem.enet.dec.com (Dave FitzPatrick) Newsgroups: comp.sys.apple Subject: Re: BASIC.SYSTEM v1.3 BLOAD Bug Message-ID: <4977@shlump.nac.dec.com> Date: 27 Sep 89 19:50:31 GMT Sender: newsdaemon@shlump.nac.dec.com Organization: Digital Equipment Corporation Lines: 88 In article <8909261820.AA26117@trout.nosc.mil>, mdavis@pro-sol.cts.com (Morgan Davis) writes... >Dave Lyons (dlyons@apple.com) writes: > >> The problem where BLOADing over protected memory BSAVEs instead is a known >> bug in BASIC.SYSTEM 1.3; the fixed version will see the light of day >> shortly. > >Is there a known patch we can apply to our copies of 1.3 just to protect >us until the fixed version is released? > >UUCP: crash!pnet01!pro-sol!mdavis ProLine: mdavis@pro-sol >ARPA: crash!pnet01!pro-sol!mdavis@nosc.mil MCI Mail: 137-6036 >INET: mdavis@pro-sol.cts.com ALPE|BIX: mdavis Morgan, I posted this bug report in apple/software on BIX yesterday and the following was there this morning, posted by George Powell (yllar.17). [> apple/software #1647 yllar.17 2278 27Sep89 09:49 TITLE: bug fix for basic system 1.3 Ok folks, here is the patch to basic system 1.3 It really was quite easy to track down this one...the guilty code, is at $Af01, seems the way this was coded, if it got any kind of error reading the file, it would then try to write it, all the problem was, is when returning from the routine that does MLI calls, it would BCS to a write routine nearby, in place of BCS to the rts statement...the following basic program will patch basic 1.3, and it will not mess up any other basic version, it will simply abort. When running this, you must write protect the disk when told to do so, and unprotect it when told to. Also, sorry bout all caps, i was in a hurry....and besides, it doesn't need to be fancy anyway...you also MUST type the word 'OK' in uppercase after write protecting the disk..otherwise the same bug could trash the basic system file, if there is a error of some kind reading it.. If anyone has any probs with this mod, please let me know, but there should be nothing to worry about after the patch....the original value in $AF05 was $0F, when it should have been $9F...maybe the assembler basic was written with has some weird bug...who knows...but anyway, the patch works, and im going to bed now..enjoy.. GP :> l8tr cut on the line and EXEC from basic... =========================CUT HERE========================================== 100 HOME 110 PRINT "THIS WILL PATCH THE BLOAD" 120 PRINT "BUG IN BASIC.SYSTEM 1.3" 130 PRINT "WRITE PROTECT YOUR DISK" 140 PRINT "AND THEN ENTER 'OK' TO PROCEED" 150 INPUT A$ 160 IF A$ < > "OK" THEN 100 200 PRINT CHR$ (4)"BLOAD BASIC.SYSTEM,A$2000,TSYS" 1000 FOR A = 14591 TO 14610 1010 READ X 1020 IF PEEK (A) < > X THEN 3000 2000 NEXT A 2010 POKE 14597,159 2011 HOME 2020 PRINT "PATCHING DONE" 2030 PRINT "UNPROTECT THE DISK, AND PRESS RETURN" 2040 INPUT A$ 2050 PRINT CHR$ (4)"UNLOCK BASIC.SYSTEM" 2060 PRINT CHR$ (4)"BSAVE BASIC.SYSTEM,A$2000,TSYS,L10240" 2070 PRINT CHR$ (4)"LOCK BASIC.SYSTEM" 2075 HOME 2080 PRINT "BASIC PATCHED": END 3000 PRINT "NOT BASIC 1.3, OR ALREADY PATCHED" 3010 PRINT "PROGRAM ABORTED" 3020 END 40000 DATA 169,203,32,112,190,176 40010 DATA 15,44,87,190,112,7,224,15,208,3,32,33,184,76 -- Dave FitzPatrick (UUCP) {decvax, ucbvax, allegra}!decwrl!esteem.enet.dec.com!fitzpatrick (Internet) fitzpatrick%esteem.DEC@decwrl.ARPA (BITNET) fitzpatrick@esteem.enet.dec.com (BIX) dave.f (co-moderator of the 'television' conference) (US MAIL) DEC, 77 Reed Rd. MS: HLO2-1/E11, Hudson, MA 01749