Shaos (enthusiast)
2002/10/07 15:39
|
RW1P2 - crosstool for development Sprinter soft
|
| |
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
[re: Shaos] |
| |
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
[re: Shaos] |
| |
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
[re: Shaos] |
| |
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] |
| |
> 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
[re: Shaos] |
| |
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
[re: b00mzi11a] |
| |
> 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
[re: Shaos] |
| |
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
[re: b00mzi11a] |
| |
> 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
[re: Shaos] |
| |
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!
|
Shaos (Registered Developer)
2003/08/10 14:17
|
Re: RW1P2 - crosstool for development Sprinter sof
[re: b00mzi11a] |
| |
> all other programs that I use seem to work perfectly
I'm affraid that I can't fix the problem :(
I haven't any unicode oses - only russian os (no unicode)
please, write me full information about a return of command "ver" in the command line of your windows
Alexander Shabarshin (shaos@mail.ru)
NedoPC Project
|
b00mzi11a (stranger
)
2003/08/10 14:35
|
Re: RW1P2 - crosstool for development Sprinter sof
[re: Shaos] |
| |
It's Microsoft Windows XP [Version 5.1.2600]
it's XP Pro with Service Pack 1
Don't worry too much tho, I can get around it by editing the text in Notepad and transferring it over afterwards, Pasting seems to be ok :D
|
Shaos (Registered Developer)
2003/08/10 15:23
|
Re: RW1P2 - crosstool for development Sprinter sof
[re: b00mzi11a] |
| |
> editing the text in Notepad and transferring it
I think that it isn't good approach :(
So, Paste is Ok. What about Open?
Alexander Shabarshin (shaos@mail.ru)
NedoPC Project
|
b00mzi11a (stranger
)
2003/08/10 15:31
|
Re: RW1P2 - crosstool for development Sprinter sof
[re: Shaos] |
| |
well - pasting still looks messed up, but it will compile and run it succesfully :) Opening just looks the same as typing normally or pasting... As I say - it is not too bad if I use notepad, I have dual-monitors so I have enough screen area to have both the editor and notepad open at the same time... thanks!
|
Shaos (Registered Developer)
2003/08/10 15:47
|
Re: RW1P2 - crosstool for development Sprinter sof
[re: b00mzi11a] |
| |
Ok, I will search any information about the problem and probably solve it in a future.
Alexander Shabarshin (shaos@mail.ru)
NedoPC Project
|