[comp.sys.apple] BASIC.SYSTEM v1.3 Bug

brianw@microsoft.UUCP (Brian Willoughby) (09/26/89)

What is the proper channel to alert Apple development of bugs in their
code?  I just got the paperwork for an APDA membership, but there should
be a method that doesn't depend upon joining a group which charges a
membership fee.  Any of you Apple Co. readers know who would be
interested in this?  To whom should I send EMail?

I just got ProDOS 8 v1.8 and version 1.3 of BASIC.SYSTEM and I have been
downloading lots of comp.binaries.apple2 files to my Apple.  I also
recently designed a single chip circuit to my Disk II which uses a
BiColor LED to indicate writes to the disk when RED, and GREEN whenever
else the motor is on.  This combination alerted me to a bug introduced in
the 1.3 version of the BASIC.SYSTEM code.

I created a file with BinSCII and tried to run it using the dash command
(but I was unaware that the file was actually still BLU encoded).  It
worried me quite a bit to see the drive start writing to the file.  I
believe that it only wrote to the file I was loading, because none of the
other files were trashed (I think).  I reloaded the file using BLOAD,
this time with a paper insert to fake a write protected disk, and was met
with the familiar DISK WRITE PROTECTED message.  At least I got a proper
error message, even though writing to the file wasn't on my mind.  At the
time, I was still thinking that the file was supposed to be a SYS (the
catalog showed BIN) file, so I thought that perhaps the load address
wasn't set correctly.  I tried BLOADing it by specifying A$2000, and it
loaded correctly.  Upon inspection, the file had definately been turned
to garbage by the erroneous overwrite.  So I reBinSCII'd it from the
source to recreate the bug while switching between different versions of
ProDOS.

The error was independant of the version of ProDOS, so I switched back to
BASIC.SYSTEM v1.2 and the problem went away.  Since the load address was
set to $0000, v1.2 responded with the proper error message: NO BUFFERS
AVAILABLE - addresses $0000-01FF being permanently in use.  I got the
same error using the dash command, or a BLOAD at the default address, but
I was able to load the file if I specified the address ($2000 or $0800).
Switching back to BASIC.SYSTEM v1.3, I get WRITE PROTECTED (or a damaged
file if the disk isn't protected) if I attempt the dash command or don't
specify the load address for a BLOAD.

I think that this error is independant of files created by BinSCII.
If my memory serves me correctly, I also had a file written to during a
BLOAD when the file DID have a proper load address.  This file was
created as type TXT, and BSAVED at A$800,L$xxxx, so it should have loaded
at $800 by default.  Unfortunately, I was unable to recreate this error
in a manner which might point to the source of the problem.

I doubt that I have a 'virus', since my copy of ProDOS and BASIC.SYSTEM
both came from GS/OS.  I am running a II Plus, with two Apple 3.5 Drives
connected through a UDC card.  I have also had problems when running a
program off a 3.5 disk.  Then when I access the Disk II for the first
time from this program, the head starts moving and making strange noises
and keeps doing that in what appears to be an infinite loop.  Quitting
the program, executing CAT on the 5.25 a few times and re-trying the 3.5-
based program restores 5.25 access to normal.  I really have no clue as
to what is going on here.  BTW, the scenerio was executing BinSCII from
a 3.5 disk while unpacking a file on a 5.25.

One caveat, I do make it a habit of modifying each version of ProDOS I
get so that it will access 40 track 5.25 disks.  But I always keep the
original, unmodified ProDOS around in case bugs show up.  As I mentioned
above, the errors were indepandant of the ProDOS version, but went away
when BASIC.SYSTEM v1.2 was used.  BTW, why don't you Apple II ProDOS
developers just support 40 track 5.25 drives in the standard release
ProDOS?  That is the only occasion that even tempts me to delve into the
dark expanses of ProDOS machine code.  (DOS 3.3 had many factors which
demanded modification!)

P.S. Do I get a free IIgs for finding this one?

Brian Willoughby
UUCP:           ...!{tikal, sun, uunet, elwood}!microsoft!brianw
InterNet:       microsoft!brianw@uunet.UU.NET
  or:           microsoft!brianw@Sun.COM
Bitnet          brianw@microsoft.UUCP

jerryk@pro-tcc.UUCP (Jerry Kindall) (09/26/89)

Network Comment: to #396 by microsoft!brianw@uunet.uu.net

Sorry Brian, no free IIgs for finding the BASIC.SYSTEM 1.3 bug.  Apple's known
about that since at least back in July -- they announced to developers at the
A2-Central Developer Conference that no one should use BASIC.SYSTEM 1.3
because it contains a bug.  The same bug you found.  There was an RTS
instruction left out of the BASIC.SYSTEM code at the point where it was to
return an error code, and instead of returning the error code, it fell through
into BSAVE.

BASIC.SYSTEM 1.4, which is part of the recently announced System Software
5.02, fixes this bug.
_
   _____   Jerry Kindall         |  ProLine:  jerryk@pro-tcc
  ||___||  2612 Queensway Drive  |  Internet: jerryk@pro-tcc.cts.com
  |  o  |  Grove City, OH 43123  |  UUCP:     nosc!crash!pnet01!pro-tcc
  |__O__|  (614) 871-4399        |
           (614) 875-7805        |  GEnie: A2.JERRY      ALPE: A2 Jerry

This is a work of fiction.  Any resemblance to reality is purely coincidental.