Difference between New rom and Old Rom

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Re: Difference between New rom and Old Rom

Post by Crayon21 »

McKlaud wrote: Mon Nov 05, 2018 9:15 pm regarding your second question, try these:

Code: Select all

PRINT PEEK 3823

PRINT SQR 0.25

PRINT 0.25 ^ 2

PRINT 4 - 0.0000000001

PRINT SQR 0.0625
If you have Zeddy with the bugged ROM results might surprise you.
late comment but, edition 2 is bugged. took me till now to realize it
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Re: Difference between New rom and Old Rom

Post by Crayon21 »

Crayon21 wrote: Sun Apr 04, 2021 12:11 am
McKlaud wrote: Mon Nov 05, 2018 9:15 pm regarding your second question, try these:

Code: Select all

PRINT PEEK 3823

PRINT SQR 0.25

PRINT 0.25 ^ 2

PRINT 4 - 0.0000000001

PRINT SQR 0.0625
If you have Zeddy with the bugged ROM results might surprise you.
late comment but, edition 2 is bugged. took me till now to realize it
also noticed a weird thing. On the old rom, entering one of the programs apparently intrudes into screen memory (it prints symbols instead of doing what it's supposed to) and crashes the computer on the old rom. 5th program down.
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Difference between New rom and Old Rom

Post by Moggy »

All the ROMs could be classed as bugged as they still have the rounding errors inherent in floating point maths.
There was a couple of articles by maths guru Frank O'Hara in ZX computing that explained this in great depth along with work-arounds in BASIC.

Internally the ZX81 is accurate to 9.5 digits of accuracy but after rounding displays only 8.

So asking for an accurate resolve of PRINT 4 - 0.0000000001 and getting an erroneous result from a device that for all practical purposes is accurate to 8 digits is entirely expected considering this is an 11 digit decimal.

The "bug" was an admitted mistake by John Grant,owner of Nine Tiles authors of the ROM, in the floating point division routine therefore a bug whereas things like the example above are due to the aforesaid rounding errors and accuracy of held numbers rather than mistaken ROM coding.
Post Reply