0

I'm implementing error handling, TRAP/ON ERROR and RESUME, in my parser. As the C64 is arguably as close as one might get to "a standard", I chose to use those error numbers in my code as well.

I came across this list and implemented it. For reasons unknown, I ended up on another page the next time I googled it. The two pages have very different numbers, although the error strings are generally the same.

I assume the first of those two, the PDF, differs in that it is "B-Series Error Messages". I'm not very familiar... what is this "B-Series"? Is this the >3.5 versions that had TRAP and ERR$?

1

1 Answer 1

4

what is this "B-Series"?

I would assume 'B-series' being about the CBM-II series, in the US/Canada usually known as B128 (keyboard style) and B256 (CBM 8296 LP style).

The CBM-II series was intended to continue the PET/CBM success by providing a compatible family of machines from home to business use with 3 lines:

  • 5xx - Low end 'home' style with additional sound/graphics
  • 6xx - Keyboard style business machines
  • 7xx - Computer with screen much like the latest CBM-LP models

Combined with 4 memory sizes:

  • 05 for 64 KiB
  • 10 for 128 KiB
  • 20 for 256 KiB
  • 30 for 512 KiB

Although not all machines produced really followed this. For one, the 505 was labelled as 500, while the US Models were (mostly) labelled B128/B256.

CBM 610 / B128

enter image description here

(Picture taken from Wikipedia)

CBM 710 / B256

enter image description here

(Picture taken from Wikipedia)

See also Cameron Kaiser's beautiful crafted B128 Floodgap page for more details and pictures

Is this the >3.5 versions that had TRAP and ERR$?

Yes.

They featured an enhanced BASIC 4.0, often mentioned as 4.0+. Like the machines, BASIC development was as well not finished. IIRC there was at least one project to fix all that.

The Reference Manual states inChaper 3 (p.9):

... The most important features of the new interpreter are:

  • Screen commands
  • Formatted data output
  • IF..THEN..ELSE structures
  • Editing and directory processing
  • Variable and data processing
  • Error trapping
  • Memory processing

And continues in section 3.5 (p.11) as:

3.5 Error Trapping.

Sometimes it is sensible to trap errors which are normally processed by BASIC, for example division by zero. In this instance BASIC would normally give an error message and stop the program. If a TRAP statement is used, such an error can be dealt with by the program itself, allowing you to restart the program where the error occurred. There are several ways of treating an error. Variables can be corrected in the statement and re—executed. The program execution can also be restarted at another point. Error trapping in BASIC 4.0+ also gives information on the type of error, on the line number in which it occurred and, if necessary, the text of the standard BASIC error message which BASIC would have displayed if the error had not been trapped.

Section 5.3.2 Interception of Program Errors on p.25 describehandling and statements (DISPOSE, RESUME and TRAP) as well as error codes fetched by ERR$(). The list seems to be the same as found in your first link (Commodore.CA),except it ends with number 42 (*1).

So yes, it seems your assumption is right.


*1 - Which I think of as a a sensible decision to do - then again it might simply be that there were different ROM/Documentation versions and 43 was simply not present at the time when the preliminary manual was made.

2
  • It seems there is no strong reason to go one way or the other then - <3.5 doesn't have error handling so the codes are inaccessible anyway, >3.5 has error handling but was not released. I guess I'll go with the 3.5 codes, they are nicely laid out. Or were the codes "visible" to the user in the C64? Commented May 8 at 15:27
  • @MauryMarkowitz Not sure about the C64, but 128's BASIC 7.0 had as well TRAP & ERR$, didn't it?
    – Raffzahn
    Commented May 8 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .