NewsProductsSprinterSupportDownloadSprinter ForumAbout usLinksSite map Russian site

English
   >> Software programming for the computer Sprinter
Thread views: 193 *View all threadsNext thread*Threaded Mode

Pages in this thread: 1 | 2 | (show all)
Shaos
(enthusiast)
2002/10/07 15:39
RW1P2 - crosstool for development Sprinter soft new Reply to this post

RW1P2 - Crosstool for develop sprite-oriented grafics software for Sprinter,ZX-Spectrum,Orion-128,Specialist,Radio-86RK.
Used RW1 programming language (see http://robots.shaos.ru). Syntax is similar to C-language.
I can offer two programs for show differences between C and RW1:

// hello.c
#include <stdio.h>
main()
{
printf("Hello, World")
}

// hello.rw1
robot "Hello"
author "A.Shabarshin"
main()
{
say "Hello, World"
}

So, RW1 program is "robot" with "author" and main function. At present I develop HELP in English. There is old english documentation.

Similarity C and RW1:
- function main()
- structure if(){...} else{...}
- structure for(;;){...} with break and continue
- structure while(){...} with break and continue
- structure do{...}while() with break and continue
- command goto Label
- command return Expr at end of functions (only v2.1 and above)

RW1 don't have:
- structure switch(){case...} and instead

switch(var)
{
case 0: ok=1; break;
case 2: ok=2; break;
case 3: ok=10; break;
}

we will write

def labs[4]={lab0,0,lab2,lab3}
goto labs[var]
lab0: ok=1; goto end
lab2: ok=2; goto end
lab3: ok=10; goto end
end:

- not support functions that may be used inside expressions (largest minus), but RW1 have "procedures" (in pascal terms) or in other words - functions that may be used inside program body or functions body, not in expressions. And you may use macros inside expressions. See RW1_STD.RWI include file:

@if(3)=((@1)?(@2):(@3))
@max(2)=(((@1)>(@2))?(@1):(@2))
@min(2)=(((@1)<(@2))?(@1):(@2))
@abs(1)=(((@1)<0)?(-(@1)):(@1))
@sqr(1)=((@1)*(@1))
@mod(2)=((@1)%(@2))
@and(2)=((@1)&&(@2))
@or(2)=((@1)||(@2))
@not(1)=(!(@1))
@neg(1)=(-(@1))

If you want use @max macro definition than

aa=10;bb=20;cc=@max(aa,bb)

So cc will be equal 20

- RW1 don't have multidimensional arrays - only onedimention

- variables have size only 16-bit signed (-32768...+32767)

Alexander Shabarshin (shaos@mail.ru)
http://www.shaos.ru

Shaos
(Registered Developer)
2003/06/17 08:14
Re: RW1P2 - crosstool for development Sprinter soft new [re: Shaos]Reply to this post

Now RW1P2 is a part of "Sprinter SDK"
See LESSON 1 http://shaos.ru/nedopc/sprinter/sdk/lesson01e.htm


Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

Shaos
(Registered Developer)
2003/07/23 21:49
Re: RW1P2 - crosstool for development Sprinter soft new [re: Shaos]Reply to this post

See LESSON 2 http://shaos.ru/nedopc/sprinter/sdk/lesson02e.htm


Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

b00mzi11a
(stranger )
2003/08/06 01:43
Re: RW1P2 - crosstool for development Sprinter sof new [re: Shaos]Reply to this post

Hi SHAOS -for some reason when I'm using the editor it keeps giving me very strange characters etc when typing the programs in, also when I open a resource to make sprites etc it gives very very strange results.. I am using Windows XP professional, any ideas?




Shaos
(Registered Developer)
2003/08/06 08:24
Re: RW1P2 - crosstool for development Sprinter sof [re: b00mzi11a]Reply to this post

> it gives very very strange results..

May I see screenshots?


Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

b00mzi11a
(stranger )
2003/08/08 22:16
Re: RW1P2 - crosstool for development Sprinter sof new [re: Shaos]Reply to this post

Yes - here is a typical one:

http://www.aonz38.dsl.pipex.com/rw1p2.jpg

Hope this helps!




Shaos
(Registered Developer)
2003/08/09 17:03
Re: RW1P2 - crosstool for development Sprinter sof new [re: b00mzi11a]Reply to this post

> Hope this helps!

It's very strange :(
What were you doing for it?

Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

b00mzi11a
(stranger )
2003/08/10 00:44
Re: RW1P2 - crosstool for development Sprinter sof new [re: Shaos]Reply to this post

It's just when I''m typing normally in the editor : foir examples -
if i type :

robot "HELLO WORLD"
it comes out as
robot "HELLO"HELLO WORLD"

- with the second part in blue ! I don't have any idea why.. the only thing I can think of is that I have Japanese language support in my version of Windows XP.. maybe that makes a difference?

thanks!




Shaos
(Registered Developer)
2003/08/10 11:50
Re: RW1P2 - crosstool for development Sprinter sof new [re: b00mzi11a]Reply to this post

> robot "HELLO WORLD"
> it comes out as
> robot "HELLO"HELLO WORLD"

during typing or after enter?

> I have Japanese language support in my version of Windows XP..

May be... I need more information
All of windows programs work normaly in your system?



Alexander Shabarshin (shaos@mail.ru)
NedoPC Project

b00mzi11a
(stranger )
2003/08/10 12:22
Re: RW1P2 - crosstool for development Sprinter sof new [re: Shaos]Reply to this post

This happens as I'm typing it - before I have pressed ENTER. Also another strange thing is that the blinking cursor follows my input normally for the first two characters,, and then it starts being several spaces ahead of the text i am typing! I have just disabled Advanced Text Services for that program, and it didn't make a difference..

Yes - all other programs that I use (including some other Editors/Compilers) seem to work perfectly..

thanks again!





Pages in this thread: 1 | 2 | (show all)
*View all threadsNext thread*Threaded Mode
Jump to