Starting with spin/assembly
Princ
Posts: 12
Hi,
i would like to ask you for help. I´m starting with spin/assembly language and i don´t have enought sources for study.
I checked:
http://gadgetgangster.com/news/45-designer-news/275-propeller-assembly-tutorial.html ( there are two tutorials (for assembly) one from potatohead and the second from desilva)
http://forums.parallax.com/showthread.php/94027-Assembly-step-by-step?p=647408#post647408 also assembly
and in proppeler manual is tutorial for spin language.
if you know some other sources please write me down (i would like to programe tv,sound and other stuff and i don´t have enought knowledge)
thanks a lot for help
i would like to ask you for help. I´m starting with spin/assembly language and i don´t have enought sources for study.
I checked:
http://gadgetgangster.com/news/45-designer-news/275-propeller-assembly-tutorial.html ( there are two tutorials (for assembly) one from potatohead and the second from desilva)
http://forums.parallax.com/showthread.php/94027-Assembly-step-by-step?p=647408#post647408 also assembly
and in proppeler manual is tutorial for spin language.
if you know some other sources please write me down (i would like to programe tv,sound and other stuff and i don´t have enought knowledge)
thanks a lot for help
Comments
For Spin, the Propeller Education Kit Labs and Text is a good way to start, if you want to stay close to the hardware. It features a DIP chip setup on a breadboard, but the code could be used with other boards. It's a great kit, and the book is also a free PDF download: http://www.parallax.com/product/32305
There is also a section of our Learn site for the Propeller Board of Education and Spin programming. These feature Spin objects and tutorials designed to make things simple for first-time programmers, but are a little abstracted from the hardware. http://learn.parallax.com/propeller-board-education
Then there is "Programming and Customizing the Multicore Propeller Microcontroller - the Official Guide" published by McGraw-Hill. Since it is not published by us, it is not a free download, but it is available from our store: http://www.parallax.com/product/32316 It features both Spin and Assembly examples, covering a wide variety of subjects from the basics to sensor management with lots of interesting applications. You may particularly like the speech synthesis chapter at the end! The example code and other resources used in the book ARE free downloads from our FTP site. There is no password: ftp://ftp.propeller-chip.com/pcmprop/
If you have not found OBEX yet, you might enjoy browsing all of the Spin and Propeller Assembly code in this community repository. You will find a variety of video and audio drivers there: http://obex.parallax.com/
I am sure I have overlooked other great resources, but I hope this is enough to get started until the thread has more replies!
Hi Princ - we have a podcast called First Spin that teaches how to program in Spin from having zero experience in programming: http://www.tymkrs.com/shows/category/first-spin/ And I have posted many many examples on http://tymkrs.tumblr.com/archive with explanation as well. Let us know what we can help with!
Addie of Tymkrs
One of the resources that really helped me figure out how to use PASM was JonnyMac's Spin Zone articles.
I hope you check out some of my Propeller projects in post #2 while you're looking through my index.
I have another question. I don´t understand to the words like Flag C Z and comands like WC WZ WR NR i read something about it in the manuals but i didn´t
understand much and my english is not so good so if someone could try to explain it on basic level
(also i don´t understand to this conditions
No CarryNo Carry and Not Zero
No Carry and Zero
No Carry or Zero
No Carry or Not Zero
Carry
Carry and Not Zero
Carry and Zero
Carry or Zero
Carry or Not Zero
Not Zero
Zero
Carry == Zero
Carry <> Zero
Never
Always
i copied from desilva assembly tutorial
Thanks a lot for your replies.
The C ( Carry flag or bit ) indicates that the result of a previous operation was larger than what a 32 bit register could hold so the Carry bit would be set to 1.
The Z ( Zero flag or bit ) indicates that the result of a previous operation was 0, and the Zero bit would be set to 1.
The propeller machine language (PASM) instructions include bits that specify if an instruction should be executed, and bits that specify if the result of that instruction should be written.
When you put an IF_xxxxxxx condition in front of a pasm instruction that instruction will only be executed if that condition is true. See page 243/244 of Propeller Manual v1.2 for a list of the conditions.
You can also specify if the result of an instruction should be written to a flag or register by placing NR, WR, WC, WZ after the instruction.
NR – No Result is written to the register.
WR – Write Result to the register.
WC – Write Carry status to the carry flag.
WZ – Write Zero status to the zero flag.
See page 291 of Propeller Manual v1.2 for more details.
Since each of these conditions has it's own bit in the instructions there are many possible combinations of conditions and results.
To be honest I don't think the propeller manual makes a good tutorial for spin. It's an important reference but not a good tutorial. In my never humble opinion the book that comes with the propeller education kit is the best tutorial I've seen for the propeller. It's available for a free download so take a look. It starts with the assumption that you never heard of spin or the propeller and ends up with you using a loop of wire to make a "metal detector"! It's a lot of fun and very well written.
Agreed, the current Propeller Manual is meant as a reference.
And I am glad you like the Propeller Education Kit Labs book, 4x5n! ! It was fun to work on. I especially enjoyed the metal detector too.