Rsadeika said...
Are you typing in the full path, and the file name? For instance: PropBASIC F:\PropBASIC\test1.bas /p. I made an
assumption that all you need is PropBASIC test1.bas /p, but that did not work.
<edit
The program, I think, is supposed to flash the LED, but with a setting of 'delay 500', I did not see anything happen.
When I increased the value to 'delay 1500', then I saw it flash. So, I am not sure as to how the delay values
are supposed to work.
edit>
Ray
Version 0.00.03 has a small bug with values less than 512; it uses the immediate value but leaves out the required #. For values 512 and higher the compiler creates a symbol with the correct value.
Jon,
Okay I fixed the problem with 9-bit constants as parameters, and the DUPLICATE VARIABLE NAME. Version 0.0.04 is in the first post.
humanoido,
I'm not sure, you need to have all the files in one directory. And the path/filename must be complete and be in quotes. I'd make it something simple like C:\PropBasic, then you would use:
PropBASIC "C:\PropBASIC\test.bas"
from the C:\PropBASIC directory.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
Bean said... · I've decided that the __PARAMx variables will be used exclusively for subroutine parameters. So you DON'T need to store them into other variables in the subroutine, because they will never be used by PropBASIC commands.
That makes sense to keep overhead low. Can I assume the __TEMPx variables are reused whenever possible?
Is there still a need for __PARAMCNT since all arguments to·a sub are 32bit values anyway?
regards peter
Peter, · Yes, the __TEMPx variables will be used for certain commands that need temporary variables.
__PARAMCNT is still needed because subroutines can still have a variable number of parameters.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
I noticed that you have to have the DEVICE, and FREQ call out in the program. What if I
want to run the program using the prop internal clock, will their be a provision for that?
You probably need to set FREQ to the frequency of the internal clock.
I would prefer passing the FREQ value via the commandline and
that the generated spinfile would get a constant FREQ = <value_from_commandline>
That way you don't have to edit the propbasic source just to run on another frequency.
(I don't see the necessity for DEVICE at all for compiling code that runs entirely in 1 cog)
Rsadeika said...
I noticed that you have to have the DEVICE, and FREQ call out in the program. What if I
want to run the program using the prop internal clock, will their be a provision for that?
Ray
Remember, we're on the very front end of things so there are a lot of rough edges. You can use RC mode like this:
DEVICE P8X32A, RCFAST
FREQ 12_000_000
After opening the Spin file in the IDE you need to comment-out the _XINFREQ line. A compiler update will take care of this later.
Ps. it is posible You write litle manual ... On words that can be used and syntax to them
Regards ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
You can look at the SXB help file for syntax (attached).
That should give you enough info, particular on the loop contructs.
Many commands are not implemented yet and some never will
because the Propellor is very different from SX.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Nothing is impossible, there are only different degrees of difficulty. For every stupid question there is at least one intelligent answer. Don't guess - ask instead. If you don't ask you won't know. If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha, sometimes the regional settings have to be US.
I had that problem some years ago. I now run WinXP SP3 and
have no issues using Dutch regional settings.
> I get a "Navigation to web page was cancelled." error message. OS is Vista Home Preminum 64 bit.
I don't have Vista, but here's the MS KB on that issue...
While it would save one long in cog ram you take a bit hit on speed; 4 cycles for MOV versus 7 to 22 with RDLONG. PropBASIC will ultimately use LMM so this becomes moot.
For small drivers LMM may not be necessary. But I thought of an alternative.
If DATA is implemented (it doesn't work currently) I could use
myConst: DATA LONG 2999
All DATA must appear before PROGRAM Start (or after the basic program) and
is placed in a seperate DAT.
Then I can use
temp = Rd_long @myConst
where Rd_long (or LREAD) is a native·basic statement·to·read·a long from hubram.
BTW. this DATA could also be used to have external variables.
I could do Wr_long @myConst,temp
regards peter
Post Edited (Peter Verkaik) : 9/3/2009 6:24:31 AM GMT
Comments
Yes. I was able to setup EditPlus so that I can edit the PropBASIC source files and compile them with a button press.
Version 0.00.03 has a small bug with values less than 512; it uses the immediate value but leaves out the required #. For values 512 and higher the compiler creates a symbol with the correct value.
With 0.00.03 if you have two or more PAUSE statements in the program you get a nasty error:
Compile
<snip>
71 PAUSE 1024
ERROR 2 DUPLICATE VARIABLE NAME "_1mSec" ; PAUSE 1024
Exception EAccessViolation in module PropBasic.exe at 0001197C.
Access violation at address 0041197C in module 'PropBasic.exe'. Read of address 0000008C.
Output completed (3 sec consumed) - Normal Termination
Okay I fixed the problem with 9-bit constants as parameters, and the DUPLICATE VARIABLE NAME. Version 0.0.04 is in the first post.
humanoido,
I'm not sure, you need to have all the files in one directory. And the path/filename must be complete and be in quotes. I'd make it something simple like C:\PropBasic, then you would use:
PropBASIC "C:\PropBASIC\test.bas"
from the C:\PropBASIC directory.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
·
· Yes, the __TEMPx variables will be used for certain commands that need temporary variables.
__PARAMCNT is still needed because subroutines can still have a variable number of parameters.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
·
I have put the compile command in a .bat file
so you can compile by doubleclicking test.bat using windows explorer.
You may need to edit the path.
regards peter
want to run the program using the prop internal clock, will their be a provision for that?
Ray
I would prefer passing the FREQ value via the commandline and
that the generated spinfile would get a constant FREQ = <value_from_commandline>
That way you don't have to edit the propbasic source just to run on another frequency.
(I don't see the necessity for DEVICE at all for compiling code that runs entirely in 1 cog)
regards peter
Remember, we're on the very front end of things so there are a lot of rough edges. You can use RC mode like this:
After opening the Spin file in the IDE you need to comment-out the _XINFREQ line. A compiler update will take care of this later.
Post Edited (JonnyMac) : 9/1/2009 8:10:18 PM GMT
I tried to implement indexed variables and came up with this
It compiles, only temp2 compiles into
temp2 res 1
where it should be
temp2 res 3
And I wonder, is there a way to use less than 4 instructions to have temp2(index) = value
regards peter
What purpose could a NOP have? Delay?
regards peter
Compiles into
From the inline code (red) it is clear that there better be native basic statements to access hubram.
Proposal:
· value = Rd_Byte address[noparse][[/noparse],byteindex]
· value = Rd_Word address[noparse][[/noparse],wordindex]
· value = Rd_Long address[noparse][[/noparse],longindex]
··Wr_Byte address[noparse][[/noparse],byteindex],value
··Wr_Word address[noparse][[/noparse],wordindex],value
··Wr_Long address[noparse][[/noparse],longindex],value
When this is available together with the indexed variables, then we have a minimal basic that can do
some real tasks.
regards peter
Jon is right. It's a Propeller instruction pipe issue; without "some instruction" between the modifier and it's target, the sequence will fail.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
Bean (Hitt Consulting)
Very nice work...
Ps. it is posible You write litle manual ... On words that can be used and syntax to them
Regards ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
You can look at the SXB help file for syntax (attached).
That should give you enough info, particular on the loop contructs.
Many commands are not implemented yet and some never will
because the Propellor is very different from SX.
regards peter
Thanks .... But.
Look on atached picture.
Regards.
ChJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Maybe you need to install the sxkey IDE software.
http://www.parallax.com/tabid/460/Default.aspx
regards peter
Ray
John Abshier
Sapieha, sometimes the regional settings have to be US.
I had that problem some years ago. I now run WinXP SP3 and
have no issues using Dutch regional settings.
regards peter
http://forums.parallax.com/showthread.php?p=597707
regards peter
I don't have Vista, but here's the MS KB on that issue...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ray
John Abshier
temp = 2999
compiles into
mov temp,_2999
but shouldn't that be
mov temp,#2999
which fails (constant too large)
So it seems every constant > 511 needs to be preloaded in a variable
myConst long 2999
then use
temp = myConst
Edit:
Just noticed, _2999 is a preloaded variable with value 2999
regards peter
Post Edited (Peter Verkaik) : 9/2/2009 9:53:02 PM GMT
the mov temp,_2999 must be replaced by
rdlong temp,@_2999
Saves 1 long in cog ram for every constant > 511 (but speed becomes slightly less)
Proposal: put all CON values > 511 that are defined before PROGRAM Start
into a seperate DAT section and use RDLONG to load these constants.
regards peter
For small drivers LMM may not be necessary. But I thought of an alternative.
If DATA is implemented (it doesn't work currently) I could use
myConst: DATA LONG 2999
All DATA must appear before PROGRAM Start (or after the basic program) and
is placed in a seperate DAT.
Then I can use
temp = Rd_long @myConst
where Rd_long (or LREAD) is a native·basic statement·to·read·a long from hubram.
BTW. this DATA could also be used to have external variables.
I could do Wr_long @myConst,temp
regards peter
Post Edited (Peter Verkaik) : 9/3/2009 6:24:31 AM GMT