FAQ  •  Register  •  Login

Recent Examples

<<

jonesypeter

Posts: 2

Joined: Sun Jun 26, 2016 8:06 pm

Post Thu Aug 03, 2017 4:00 pm

Recent Examples

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/ZX_BASIC:Sample_Programs

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

http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN

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

I looked at the Programming Tutorials section:

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

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
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Thu Aug 03, 2017 8:22 pm

Re: Recent Examples

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
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Aug 04, 2017 10:36 am

Re: Recent Examples

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: http://bit.ly/2wro5o8
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:
http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Tue Aug 08, 2017 11:19 am

Re: Recent Examples

I seem to keep referencing this. Probably means I have to finish it.

https://docs.google.com/document/d/1vUn ... DjzjOc8IhU

And you can get the source code for the eventual program (Berksman) from WOS.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue Aug 08, 2017 12:52 pm

Re: Recent Examples

My bad, I though I had put the link above! Sorry.
It's also in the Wiki, but he probably overlooked it.
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Wed Aug 09, 2017 11:31 am

Re: Recent Examples

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" :)

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.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Wed Sep 06, 2017 1:32 pm

Re: Recent Examples

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/ZX_BASIC:Sample_Programs

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

http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN


SCREEN$ paged updated: http://www.boriel.com/wiki/en/index.php/ZX_BASIC:SCREEN

Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO