VICE home Knowledge Base - Article 20-013


[Bug] Petcat wrong handling of DATA and REM statements


The information in this article applies to the following versions of VICE:

BACKGROUND

Every BASIC command is tokenized by the CBM BASIC interpreter into some special tokens. PETCAT (part of the VICE package) is a tool which does (de-)tokenizing between the various CBM BASIC versions and ASCII files, allowing for editing CBM BASIC files on a PC with an editor of choice.

SYMPTOMS

A bug was found in the way PETCAT tokenizes BASIC programs. A line like the following was erroneously tokenized:

20 DATA 1,2,3,END

Here, the last "END" was written as a token, which is not done on a real CBM. This will cause a bug when this DATA statements are READ and using in the BASIC program.

The same bug affects REM statements, too, but as these statements are not executed at all, no negative impact is known for these.

CAUSE

This is a bug in PETCAT in the VICE versions listed above.

SOLUTION

Wait for a new version of VICE.

STATUS

The VICE team has confirmed this to be a bug in the VICE versions listed at the beginning of this article. It has been corrected in all subsequent versions

ACKNOWLEDGEMENT

Thanks to Andrea Musuruane for reporting this bug.

REVISION

Last Reviewed: August 19, 2004