ZX Basic vs Commodore V2.00 (Vic 20)
ZX Basic vs Commodore V2.00 (Vic 20)
any differences that stand out to you? drawbacks?
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
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
- 1024MAK
- Posts: 5332
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: ZX Basic vs Commodore V2.00 (Vic 20)
Err. How long have you got?
There are rather a lot.
One of the biggest, is the different string handling.
Another biggie is the character sets, the ZX81 character set and codes being unique to it only. The Commodore character set and codes also being non-standard. The ZX Spectrum character set almost looks sane by comparison!
Different ways that variables and their names are handled.
Oh, the wonderful helpful error messages...
The ZX81 did get some limited graphics commands. The ZX Spectrum expanded on this.
Mark
There are rather a lot.
One of the biggest, is the different string handling.
Another biggie is the character sets, the ZX81 character set and codes being unique to it only. The Commodore character set and codes also being non-standard. The ZX Spectrum character set almost looks sane by comparison!
Different ways that variables and their names are handled.
Oh, the wonderful helpful error messages...
The ZX81 did get some limited graphics commands. The ZX Spectrum expanded on this.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
Re: ZX Basic vs Commodore V2.00 (Vic 20)
anything else? maybe a video comparison?
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
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
Re: ZX Basic vs Commodore V2.00 (Vic 20)
Commodore BASIC only allowed each line number to be a maximum of 255 tokenised bytes, but realistically four lines by 22 columns may be entered. This means 88 characters on entry per BASIC line, either in your programme listing or in direct mode; with keyword abbreviations, this would mean more than 88 characters, but then it would be difficult to edit those lines of your programme after the fact.
BASIC v2 also has some idea of integer types, for instance
The range of A% would therefore -32768 to +32767, however internally this was still essentially handled as a floating point number except for integer arrays:
This would be more memory efficient than
Regarding dimensional arrays, you also didn't need to declare the first 11 elements within an array. You could simply do this in BASIC v2:
This is not possible on Sinclair BASIC. Also you do not need the LET command to declare variables (although it's faster later on in your programme if you do declare your variables first).
You may enter line zero on your programme without any fancy POKEs as well.
You have a DATA statement, which may contain mixed data types, like so:
You may use the INPUT command on BASIC v2 with a text prompt, like this:
String manipulation is used with the LEFT$, RIGHT$ and MID$ commands, unlike Sinclair BASIC which uses A$(1 TO 4), you would use LEFT$(A$, 3) because BASIC v2 zero indexes its strings.
Finally, for my quick guide, you may use simple mathematical functions in BASIC v2, like:
Regards,
Shaun.
BASIC v2 also has some idea of integer types, for instance
Code: Select all
LET A%=100
Code: Select all
DIM A%(255): A(0)=-128: A(1)=128
Code: Select all
DIM A(255): ...
Code: Select all
0 FOR I=0 TO 10: A(I) = INT(RND(0)*16): NEXT I
You may enter line zero on your programme without any fancy POKEs as well.
You have a DATA statement, which may contain mixed data types, like so:
Code: Select all
0 FOR I=0 TO 3
1 READ A$(I)
2 NEXT
3 READ A,B
999 DATA "HELLO", "SAILOR", "WIBBLE", "FIN", 128, 256
Code: Select all
0 INPUT "HELLO ";A$
1 PRINT "HI, ";A$
Finally, for my quick guide, you may use simple mathematical functions in BASIC v2, like:
Code: Select all
0 DEF FN A(X)=X*X
1 PRINT FN A(9)
Shaun.
Re: ZX Basic vs Commodore V2.00 (Vic 20)
The biggest difference, of course, is that the ZX81 ROM is 8K whereas the BASIC Kernal on the Commodore VIC-20 is 16k, therefore Commodore BASIC was more verbose.
Regards,
Shaun.
Regards,
Shaun.
Re: ZX Basic vs Commodore V2.00 (Vic 20)
Shaun_B wrote: You may use the INPUT command on BASIC v2 with a text prompt, like this:
Also allowed on the ZX SpectrumCode: Select all
0 INPUT "HELLO ";A$ 1 PRINT "HI, ";A$
Regards,
Shaun.
Re: ZX Basic vs Commodore V2.00 (Vic 20)
Hi Dr Beep,
I though the comparison was for ZX81 BASIC against VIC-20 BASIC. If not, then one may also define mathematical functions in ZX Spectrum BASIC, but more complex than those on BASIC v2.
Regards,
Shaun.
I though the comparison was for ZX81 BASIC against VIC-20 BASIC. If not, then one may also define mathematical functions in ZX Spectrum BASIC, but more complex than those on BASIC v2.
Regards,
Shaun.
- 1024MAK
- Posts: 5332
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: ZX Basic vs Commodore V2.00 (Vic 20)
Well, it does depend on which “ZX BASIC”! There have been three for Z80 based machines:
Although each version expands on earlier versions, each is different in many ways. They are not code compatible. Some source may be forwards compatible, but not all commands and functions work the same.
Mark
- BASIC for the ZX80 (4K byte ROM)
- BASIC for the ZX81, also available for upgrading a ZX80 (8K byte ROM)
- BASIC for the ZX Spectrum (16k byte ROM)
Although each version expands on earlier versions, each is different in many ways. They are not code compatible. Some source may be forwards compatible, but not all commands and functions work the same.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
- 1024MAK
- Posts: 5332
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: ZX Basic vs Commodore V2.00 (Vic 20)
For me, the most annoying limitation of the ZX80 and ZX81 BASICs is no multi-statement lines
A ZX Spectrum was the first computer in our house when I was young. At school I used Acorn BBC Model B machines. So I got into the habit of using the full screen width of a line (well, as much as possible). Either with working code, or with comments after a REM.
But you can’t do this on a ZX81
Mark
A ZX Spectrum was the first computer in our house when I was young. At school I used Acorn BBC Model B machines. So I got into the habit of using the full screen width of a line (well, as much as possible). Either with working code, or with comments after a REM.
But you can’t do this on a ZX81
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Autumn is here. Bye bye summer 2024...
Re: ZX Basic vs Commodore V2.00 (Vic 20)
This is the apparent annoyance with ZX Spectrum BASIC (and all other variants except for ZX80/81 BASIC) because multi-statemented BASIC lines might make it more difficult to debug.
As this is primarily a ZX81 forum (although there is some interest in ZX80 as well), let's stick to the differences between CBM BASIC v2 and ZX81 BASIC. The differences between ZX80 and ZX81 BASIC should be documented somewhere, and if not here then maybe a thread about ZX80 BASIC vs ZX81 BASIC as well.
Regards,
Shaun.