PropBASIC
caskaz
Posts: 957
Hi, Guys.
I installed PropBasic(bst-0.19.1.exe & PropBasic-bst-00.00.87-47.exe)
I made sample(LED.pbas) But it don't work
Compiling, there are errors.
LED (36.33)Error:Unresolved Symbol-__param1
LED (41.33)Error:Unresolved Symbol-__param1
LED (49.33)Error:Unresolved Symbol-__param1
How does it resolve?
Post Edited (caskaz) : 3/13/2010 5:22:57 AM GMT
I installed PropBasic(bst-0.19.1.exe & PropBasic-bst-00.00.87-47.exe)
I made sample(LED.pbas) But it don't work
OnTime CON 250 OffTime CON 750 IsOn CON 1 IsOff CON 0 LED PIN 0 LOW idx VAR LONG DELAY_MS SUB 1 PROGRAM Start Start: FOR idx = 1 to 3 LED = IsOn DELAY_MS OnTime <-- (36.33) LED = IsOff DELAY_MS OffTime <-- (41.33) NEXT DELAY_MS 1_000 <-- (49.33) GOTO Start SUB DELAY_MS PAUSE __param1 ENDSUB
Compiling, there are errors.
LED (36.33)Error:Unresolved Symbol-__param1
LED (41.33)Error:Unresolved Symbol-__param1
LED (49.33)Error:Unresolved Symbol-__param1
How does it resolve?
Post Edited (caskaz) : 3/13/2010 5:22:57 AM GMT
Comments
I have attached a new code file. I believe this is what you are trying to accomplish. You can compare it to your code and see the changes. I tested it on my Propeller Professional Development Board, but it should work on any board or Propeller setup running on a 5mhz crystal
In future post it would be helpful to post what your setup is and attach your code as a file so others can download and easily look at it.
Hope this help gets you moving forward.
Tony
Post Edited (Tony B.) : 3/13/2010 4:37:34 AM GMT
I forgot Device directive.
Although I had checked my code for several times....
Although delta doesn't set initial value, it works.
PropBASIC set initial data at VAR directive?
Everything looks fine in your code to me. Why wouldn't it work ?
PropBASIC does NOT set any initial value to VARs unless you specify. Like "delta VAR LONG = 0". Otherwise it will have whatever value happens to be in memory at the time.
Thanks for giving PropBASIC a try, it looks like you are getting the hang of it already.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
·
Thank you for your reply.
PropBASIC code fine works.
I wonder statement of "RDLONG 0, delta".
Although I read "PropBASIC_Syntax_Guide_0x13", there was not such a thing.(set "delta" to the current clock frequency)
And there is words of viewing a 1-for-1 (from BASIC to Asm code) on Section"About PropBASIC", How can asembler codes watch?
RDLONG 0, delta reads the first long in hub memery into delta.if you look at the spin compiler output you will see this.
For example assuming the clock is 80_000_000MHz, in hex this is 04-C4-B4-00,these should be the values stored in the first 4 hub mem locations
Gerry
Post Edited (Gerry Keely) : 3/15/2010 10:31:35 AM GMT