ZX BASIC: Test for 48/128k system

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
cha05e90
Berk
Posts: 33
Joined: Sun Nov 19, 2017 7:02 pm

Re: ZX BASIC: Test for 48/128k system

Post by cha05e90 » Tue Jul 30, 2019 3:29 pm

Oh dear, they changed syntax from 128/+2 to +3/+2x? :o

I only know the first 128 (Toastrack) and assumed using the silicon disk is the same syntax with all 128K ZX Spectrums...:-(
0 x
+/+/48K/128

AndyC
Manic Miner
Posts: 251
Joined: Mon Nov 13, 2017 5:12 am

Re: ZX BASIC: Test for 48/128k system

Post by AndyC » Tue Jul 30, 2019 6:49 pm

No, unfortunately not. I do prefer the +3DOS syntax, as it makes it much easier to allow a user to choose where to save, but the lack of support for the "old" 128K syntax makes it difficult to write a BASIC program which uses the extra memory and runs on all machines.
0 x

User avatar
cha05e90
Berk
Posts: 33
Joined: Sun Nov 19, 2017 7:02 pm

Re: ZX BASIC: Test for 48/128k system

Post by cha05e90 » Wed Jul 31, 2019 8:32 am

AndyC wrote:
Tue Jul 30, 2019 6:49 pm
... makes it difficult to write a BASIC program which uses the extra memory and runs on all machines.
Oh, yes, seems so! Up to now I can determine whether there is a silicon disk or not with:

Code: Select all

1000 LET sys48=1: REM 48K as default, no silicon disk
1010 IF PEEK 2899=159 AND PEEK 23611=221 THEN LET sys48=0
...alas I learned now that this will only work on ZX Spectrums up to the +2. *sigh* :-)
0 x
+/+/48K/128

Post Reply