Should I bother learnig SPIN or should I just dive into Propeller Assembly??
Capt. Quirk
Posts: 872
Pual made the comment earlier that PASM was easier to learn then SASM (SX) and assembly language is what I really want to learn the most.
I have read the manual and 3 of the 5 PE pdf's (2-4). Spin is so completly different than SX/B and Pbasic, I figure it will take·about the same amount of time to learn Spin as it would PASM. I am not a fast learner and I would spend months on either language. To me Spin represents magic, and PASM seems more logical (Spock like, lol).
Bill
Also, what·do you use GEAR for, I thought it would be more like SX-SIM?
I have read the manual and 3 of the 5 PE pdf's (2-4). Spin is so completly different than SX/B and Pbasic, I figure it will take·about the same amount of time to learn Spin as it would PASM. I am not a fast learner and I would spend months on either language. To me Spin represents magic, and PASM seems more logical (Spock like, lol).
Bill
Also, what·do you use GEAR for, I thought it would be more like SX-SIM?
Comments
With Spin it's quite simple to throw in a couple of serial debug messages or hook on a TV screen as many others have done. In PASM it's quite difficult to get debug info.
I use GEAR primarily for debugging assembler code. But, it is also useful for debugging Spin, although it can be a bit strange if you're a slow learner (because it uses it's own very special language - bytecodes).
So in summary, learn both [noparse]:([/noparse]
PASM is a must if you want speed, but Spin is great for glueing your project together.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's not all that hard to count the number of grains of sand on the beach. The hardest part is making a start - after that it just takes time.·· Mirror - 15 May 2007
Assembly is very nice on the propeller at least I think so, there are a few strange concepts to learn and I have highlighted some of these in my "assembly step by step" program (see thread index sticky). You can use assembly to do simple things REALLY fast but don't dump Spin as you will need it to access all the lovely objects written by others (even if those are written in assembly).
So my overall advice is relax, there is not as much to learn as you might imagine to get going and spin is not nearly as strange as you might imagine.
Its not helped by how good the Parallax guys are at using spin, they tend to use a lot of clever tricks and all those funny symbols, that can make the example programs and objects hard to read, don't despair.
Oh and be sure to get stuck in, you can't learn a foreign language by reading a dictionary and you can't learn a programming language by just reading a manual. But be sure to have it by your side, if you don't understand it say "there is no reason why I should, let's look it up"
Graham
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
In any case, Spin is *very* easy to learn; it's just like Basic or C. There are a couple of gotchas, and a few
small things that are "different" (like the @ operator and array indexing) but if you already know Basic or C,
Spin will truly be a walk in the park. (You also have to realize that Spin is a *very* simple language, simply
because the whole interpreter must fit in less than 512 assembly instructions.) Pay close attention though;
there are some gotchas (and they are listed throughout the forums; see tips and tricks). The normal ones
that get me are:
<= is not less than or equals; it's an assignment operator of the result of <. Ditto for >=.
Use =< and => respectively.
a[noparse][[/noparse]0] is the same as a is the same as a[noparse][[/noparse]0][noparse][[/noparse]0]. This is very different than most languages.
Use @v to take the address of variable v; use long[noparse][[/noparse]v] to assign to it (if it's a long), and so on.
Spin "Objects" are not the same as C++ or Java objects. They are completely static and
expanded at compile time.
In addition, Spin programs can use all of main (hub) memory while assembly programs are constrained to 496 words (instructions and data) unless they're done using the "Large Memory Model" hybrid interpretive structure which is still under development. Spin programs are also more compact since they're interpretive byte codes rather than 32-bit instructions.
Thanks again
Bill
Post Edited (Capt. Quirk) : 6/18/2007 6:59:47 PM GMT