How to short size for PropBASIC
caskaz
Posts: 957
Hi.
I translate atomic-watch from spin to PropBASIC.
Part of time-decode's program(spin) is 273Longs.
But part of time-decode's program exceed cog-memory by 66Longs.
It become 4Longs(exceed size) to use sub/func.
There are technique of shorting code-size?
Post Edited (caskaz) : 3/25/2010 1:47:49 AM GMT
I translate atomic-watch from spin to PropBASIC.
Part of time-decode's program(spin) is 273Longs.
But part of time-decode's program exceed cog-memory by 66Longs.
It become 4Longs(exceed size) to use sub/func.
There are technique of shorting code-size?
Post Edited (caskaz) : 3/25/2010 1:47:49 AM GMT
Comments
you can either use the LMM option for PropBasic.
Bean wrote how to use it in some thread·about the question which is the preferred language.
Or you can try to squeeze your code.
Your question is very very open, it is difficult to give you the right hints, without seeing the source code.
I don't know "atomic-watch".
Good luck, Christof
PROGRAM Start LMM
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
·
Thanks for your reply.
Where is "the end of the PROGRAM"?
I insert "PROGRAM Start LMM" to "the end of the PROGRAM" .
And then error message
"Error: Symbol already allocation here __init"
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
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
· I'm not sure if you are aware that you can replace
With this
It generates the same code, but I think it's easier to follow what's happening.
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
·
I see about LMM.
Attached file occure "monitor.spin(45,1) Error:Symbol already allocated here __Init" to compile.
Sorry, ' cogstart PropClock --> cogstart monitor inside attached file
I attached not-modified file by mistake.
How does this solve?
Post Edited (caskaz) : 3/27/2010 1:35:15 AM GMT
You don't use PROGRAM with task code.
Just remove the PROGRAM line from your "TASK monitor" routine.
If you want a TASK to use LMM you add LMM to the "TASK taskname" line. Such as "TASK monitor LMM". It is pretty rare that a task need to use LMM so it not used very often.
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
·
I deleted PROGRAM with task code.
Error has gone.
Post Edited (caskaz) : 3/27/2010 7:33:52 AM GMT