Page 1 of 1

35072121

Posted: Sat Aug 05, 2006 10:25 am
by Jeff-20
Why does this number crash the VIC? The computer can count higher with the use of exponents. However, this particular number gives it trouble?

If you haven't tried it yet. Just type 35072121 on an empty line.

Similarly, the PRINT""+-0 crash also makes me wonder...

Any theories?

Posted: Sat Aug 05, 2006 12:48 pm
by Thomas Hechelhammer
I would like to point to Commodore Trivia 15A.

"What happens when you type 35072121 in direct mode on the C64 and hit return?"

Short answer: There is an error in the PETSCII number to binary conversion routine (LINGET)

The problem with the PRINT-Statement is pointed out in Commodore Trivia 12A.

"What will happen if you type ?""+-0 into the CBM BASIC interpreter on the PET series, the 64 series, or the 128 series?"

Short answer: Due to a bug in the interpreter, you get a wrong stack-pointer and the CPU mostly runs into a $00 (=break) instruction.

For more detailled answers, please check out the trivia-pages.

http://www.c64trivia.co.uk/

Probably, someone could help me attaching files in my postings here ... this is more important for me. :roll:

-- Thomas

Posted: Sun Aug 06, 2006 6:00 am
by carlsson
phpBB has no such thing as attachments. You can include images, quotes or bits of code, but not as an attachment.

Posted: Sun Aug 06, 2006 6:10 am
by carlsson
Just to be complete, this error occurs when a 6 digit or greater line number is entered and the first 6 digits indicate a number in the range 35072-35327 ($8900-$89ff). Also, it appears the error occurs on the VIC-20, but I didn't completely verify it. It would be interesting to note if the error is found on all version of CBM BASIC.
Based on VICE behavior, this error occurred all the way since 8K PET 2001, and also on the Basic 3.5 in Plus/4. It was however fixed in Basic 7 on the C128.