Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recent Examples
#1
Hi,

Can I ask if there are recent examples programs or tutorials for ZX BASIC? I'm accustomed to Sinclair BASIC and would like to convert some Spectrum Programs, but I'm also interested in the extra capabilities that ZX BASIC provides and linking to sprite toolkits and the Game Engines like BiFrost.

The Sample Programs section of the Wiki seems a little short on content and very simplistic.

http://www.boriel.com/wiki/en/index.php/...e_Programs

I have tried reading through the reserved words and for example clicking on the SCREEN Keyword (replacement for SCREEN$):

<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN</a><!-- m -->

Comes up with 'There is currently no text in this page.'

I looked at the Programming Tutorials section:

<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Tutorials">http://www.boriel.com/wiki/en/index.php ... :Tutorials</a><!-- m -->

There is a very old partly completed PacMan tutorial, and a couple of tutorials in Spanish.

Sorry if this post sounds negative, it's certainly not meant to be. I'm just struggling to find resources.

Thanks
Reply
#2
Have you checked the examples/ directory bundled with ZX Basic?

To make ZX Basic as much compatible as possible with Sinclair BASIC, use the --sinclair command line option.

Code:
zxb --sinclair program.bas
Reply
#3
Nearly 100% of that information is valid nowadays. I mean, ZX Basic is very much like Sinclair BASIC.
So if you have experience with Sinclair BASIC you should at least start doing simple programs with no hassle.

This is the most comprehensive (Spanish, translated with google translate) tutorial: <!-- m --><a class="postlink" href="http://bit.ly/2wro5o8">http://bit.ly/2wro5o8</a><!-- m -->
It's valid still today.

The most important differences with Sinclair Basic are:
  • Every IF sentence must be closed with END IF. E.g. IF a < b THEN GOTO 100: END IF
  • Line numbers are optional (see listing examples)
  • There are other differences. Use --sinclair for maximum compatibility until you're more familiarized.

There are many improvements (Functions, WHILE, DO LOOP...). But for starting this is all you need to know.
Hope this helps. Otherwise, don't hesitate to ask for help.

The wiki samples are simple but shows all of these features. Some functions are not available (ATTR, SCREEN$, POINT) by default if you don't use --sinclair flag.

Also the wiki contains a lot of general information about the language:
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax</a><!-- m -->
Reply
#4
I seem to keep referencing this. Probably means I have to finish it.

<!-- m --><a class="postlink" href="https://docs.google.com/document/d/1vUneCCC18oXLglzoRcJdrMDUSh7vaO_tGDjzjOc8IhU">https://docs.google.com/document/d/1vUn ... DjzjOc8IhU</a><!-- m -->

And you can get the source code for the eventual program (Berksman) from WOS.
Reply
#5
My bad, I though I had put the link above! Sorry.
It's also in the Wiki, but he probably overlooked it.
Reply
#6
boriel Wrote:My bad, I though I had put the link above! Sorry.
It's also in the Wiki, but he probably overlooked it.


To be fair he had seen it, which I missed "a very old pacman tutorial" Smile

I should finish it probably. But it was hard enough finishing the game! That tutorial definitely should get people a long way as is, though, and of course the source code is all available.

JonesyPeter: What are you looking for specifically, that, for, example, the PacMan tutorial doesn't cover? It does assume you've got a working knowledge of Sinclair Basic, which might be a poor assumption; but there are tutorials for sinclair basic (like the old zx spectrum manual) elsewhere.
Reply
#7
jonesypeter Wrote:Hi,

Can I ask if there are recent examples programs or tutorials for ZX BASIC? I'm accustomed to Sinclair BASIC and would like to convert some Spectrum Programs, but I'm also interested in the extra capabilities that ZX BASIC provides and linking to sprite toolkits and the Game Engines like BiFrost.

The Sample Programs section of the Wiki seems a little short on content and very simplistic.

http://www.boriel.com/wiki/en/index.php/...e_Programs

I have tried reading through the reserved words and for example clicking on the SCREEN Keyword (replacement for SCREEN$):

<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN</a><!-- m -->
SCREEN$ paged updated: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN</a><!-- m -->
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)