Can PropBasic call .spin files as Tasks
Regor
Posts: 19
I download PropBasic and its ultra cool.
I noticed when I wrote a task a .spin file actually got generated which got me thinking.
Is there a way to include Spin files not generated from the PropBasic Tasks? Aka, can I move·AnyonesCool.Spin file into the PropBasic folder and then use it within my PropBasic program?
I noticed when I wrote a task a .spin file actually got generated which got me thinking.
Is there a way to include Spin files not generated from the PropBasic Tasks? Aka, can I move·AnyonesCool.Spin file into the PropBasic folder and then use it within my PropBasic program?
Comments
That said; Bean has given an example of calling other code - look for his "dispatcher". <edit> See http://forums.parallax.com/showthread.php?p=867134 - third post from bottom.</edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
Announcement: To cut costs in the current economic climate, we have switched-off the light at the end of the tunnel.
Post Edited (simonl) : 3/12/2010 11:11:37 PM GMT
It may not be the ONLY way, but it is probably the easiest way.
Basically, you keep the spin program alive and wait for requests from PropBASIC. All data exchange is handled with HUB variables in PropBASIC.
PASM code in .spin files can be pretty easily inserted into PropBASIC, but "spin" code cannot and must be called using the dispatch method.
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
·
So, what you are saying I can't call a method I did in spin like this "method.spin".
So, what you are saying I can't call a method I did in spin like this "method.spin" as a TASK.