[comp.sys.apple] bugs in applesoft

tromey@tybalt.caltech.edu (cactus) (01/14/90)

In article <12882@phoenix.Princeton.EDU> kadickey@phoenix.Princeton.EDU (Kent Andrew Dickey) writes:
>[I ask anyone to name an actual *BUG* in Applesoft, other than the ONERR
>cannot-have-another-statement-on-the-same-line quirk?  Applesoft is
>amazingly stable for v1.0...in fact, Apple users have come to expect
>that from Apple, so anything less, (ie., other-computerish) seems a let
>down.
>			Kent Dickey
>kadickey@phoenix.Princeton.EDU

i seem to remember that about 1 or 2 years ago someone wrote an article
for nibble magazine where he fixed 13 (12?) bugs in applesoft. i dont have
my issues handy so i cant really look it up (but i could if you really
want).  i do remember that there is a bug in the floating point multiply
routine which causes it to get the last bit wrong under certain
circumstances.  also onerr is very buggy - apple even published a little
piece of machine code to fix up "some onerr goto problems with print and
?out of memory error messages." (quote from basic prog. ref. manual).
also wasnt there some bug with key and onerr?  i seem to remember...
hope this helps/tom
tromey@tybalt.caltech.edu		or is this just stupid?

huang@husc4.HARVARD.EDU (Howard Huang) (01/15/90)

>>[I ask anyone to name an actual *BUG* in Applesoft, other than the ONERR
>>cannot-have-another-statement-on-the-same-line quirk?  
>>
>>			Kent Dickey
>>kadickey@phoenix.Princeton.EDU

>i seem to remember that about 1 or 2 years ago someone wrote an article
>for nibble magazine where he fixed 13 (12?) bugs in applesoft. 
>...i do remember that there is a bug in the floating point multiply
>routine which causes it to get the last bit wrong under certain
>circumstances.  also onerr is very buggy...
>
>tromey@tybalt.caltech.edu		

I don't know about current versions, but the Merlin assembler used to
come with a program that would generate a source code listing for
Applesoft.  Interspersed among the comments are some bugs.  

One curious example:
There's one number that when typed in to Applesoft (as if you were 
starting a line of BASIC) causes the computer to crash.


Howard C. Huang
huang@husc4.harvard.edu

cyliao@eng.umd.edu (Chun-Yao Liao) (01/15/90)

In article <13257@cit-vax.Caltech.Edu> tromey@tybalt.caltech.edu.UUCP (cactus) writes:
>i seem to remember that about 1 or 2 years ago someone wrote an article
>for nibble magazine where he fixed 13 (12?) bugs in applesoft. i dont have
>my issues handy so i cant really look it up (but i could if you really
>want).  i do remember that there is a bug in the floating point multiply
>routine which causes it to get the last bit wrong under certain
>circumstances.  also onerr is very buggy - apple even published a little
>piece of machine code to fix up "some onerr goto problems with print and
>?out of memory error messages." (quote from basic prog. ref. manual).
>also wasnt there some bug with key and onerr?  i seem to remember...
>hope this helps/tom
>tromey@tybalt.caltech.edu		or is this just stupid?

I believe there are lots of bugs in Applesoft... and as I knew, there were
about 12 or 13 bugs (or maybe more, since I didn't really count them)
I used to have all of them printed out, but left the printout  in Argentina
as I came to this country.

--
|I want Rocket Chip 10 MHz, Z-Ram Ultra II, UniDisk 3.5 | cyliao@wam.umd.edu  |
|I want my own NeXT, 64 Mb RAM, 660 Mb SCSI, NeXT laser |    Chun Yao Liao    |
|              printer, net connection, software, etc.  | Accepting Donations!|
/* If (my_.signature =~ yours)  coincidence = true; else ignore_this = true; */

throoph@jacobs.CS.ORST.EDU (Henry Throop) (01/15/90)

In article <13257@cit-vax.Caltech.Edu> tromey@tybalt.caltech.edu.UUCP (cactus) writes:
n article <12882@phoenix.Princeton.EDU> kadickey@phoenix.Princeton.EDU (Kent Andrew Dickey) writes:
<>[I ask anyone to name an actual *BUG* in Applesoft, other than the ONERR
<cannot-have-another-statement-on-the-same-line quirk?  Applesoft is
<>amazingly stable for v1.0...in fact, Apple users have come to expect
<>that from Apple, so anything less, (ie., other-computerish) seems a let
<>down.
<>			Kent Dickey
<>kadickey@phoenix.Princeton.EDU
<
<i seem to remember that about 1 or 2 years ago someone wrote an article
<for nibble magazine where he fixed 13 (12?) bugs in applesoft. i dont have
<my issues handy so i cant really look it up (but i could if you really
<want).  i do remember that there is a bug in the floating point multiply
<routine which causes it to get the last bit wrong under certain
<circumstances.  also onerr is very buggy - apple even published a little
<piece of machine code to fix up "some onerr goto problems with print and
<?out of memory error messages." (quote from basic prog. ref. manual).
<<<<o wasnt there some bug with key and onerr?  i seem to remember...
<hope this helps/tom
<tromey@tybalt.caltech.edu		or is this just stupid?

Seems to me that Applesoft returns an incorrect '?RETURN WITHOUT GOSUB'
error when you set an onerr trap from within a subroutine and then 
return.

Henry


---
Henry Throop
Internet: throoph@jacobs.cs.orst.edu

toddpw@tybalt.caltech.edu (Todd P. Whitesel) (01/15/90)

Applesoft has numerous bugs, true, but most of the time you don't come close to hitting them, and few trash the machine.

Todd Whitesel
toddpw @ tybalt.caltech.edu

kadickey@phoenix.Princeton.EDU (Kent Andrew Dickey) (01/15/90)

In article <1990Jan14.212033.4109@eng.umd.edu> cyliao@eng.umd.edu (Chun-Yao Liao) writes:
>In article <13257@cit-vax.Caltech.Edu> tromey@tybalt.caltech.edu.UUCP (cactus) writes:
>>i seem to remember that about 1 or 2 years ago someone wrote an article
>>for nibble magazine where he fixed 13 (12?) bugs in applesoft. i dont have
>>my issues handy so i cant really look it up (but i could if you really
>>want).  i do remember that there is a bug in the floating point multiply
>>routine which causes it to get the last bit wrong under certain
>>circumstances.  also onerr is very buggy - apple even published a little
>>piece of machine code to fix up "some onerr goto problems with print and
>>?out of memory error messages." (quote from basic prog. ref. manual).
>>also wasnt there some bug with key and onerr?  i seem to remember...
>>hope this helps/tom
>>tromey@tybalt.caltech.edu		or is this just stupid?
>
  Before all the replies get out of hand, I clearly meant *SERIOUS*
bugs.  Getting the last bit wrong in a multiply is not that big of a
deal since Applesoft keeps more digits of precision that it will print
out.  Plus, floating point operations are inherently inaccurate, so
having the last bit wrong is trivial.

As for ONERR, I meant to imply that it does have a few bugs.  The
orgnization of AppleSoft (in assembly) makes good error trapping hard.
But no one seriously tries to recover from serious errors with RESUME,
do they?  Basically, AppleSoft is good at catching any error with ONERR,
the point is that you just can't reliably continue your program from
just *ANY* error that occurs just anywhere.  No other language even
attempts feats like this (at least, not a language I know).
Trapping math overflows always seems to work well for me, along with
trapping disk errors.

My point is that AppleSoft is very stable for what it does.  How many of
you have actually encountered these bugs, and not read about them from
someone else?  How many of us, on the other hand, have encountered bugs
in GS/OS or even ProDOS?  (DOS 3.3 was also notorious for bugs...).  
I know I have--GS/OS seems to mangle a disk or two every couple of
months, for no real reason.  I can't figure out why--it seems to create
a file, but not properly write the directory on the disk, and then
detect something's wrong and make my disk unuseable ("This disk appears
to be damaged...").

Anyways, end the discussion about all the bugs we know about in
Applesoft.  I just wanted to say I am impressed with it.  If you are
not, that's ok.

			Knet Dickey
kadickey@phoenix.Princeton.EDU