Learning Assembly
DynamoBen
Posts: 366
While the Prop manual has some really good lessons on spin, the assembly information seems to be a little thin. Because I'm a high level guy I'm looking for some good tutorials for learning assembly. I noticed that the SX uses assembly exclusively. So my thought was that the SX tutorials might be a good starting point. Is this a good/bad idea? Are there better resources?
Comments
Explaining Propeller machine language to an expert HLL programmer is possible, though takes much time. I also have the suspicion there is no expert programmer who does not well know at least one kind of machine code....
For a very keen person I should recommend Donald Knuth's "Art of Computer Programming", where a quite useful machine language is described and applied in the first volume.
After doing that you should have no difficulty to follow deSiva's "Tutorial"...
Post Edited (deSilva) : 2/7/2008 6:24:42 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
http://www.diycalculator.com/index.shtml
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website
Looks like fun to read from the outside! I have got the impression it COULD be something like Donald Knuth's book for "the rest of us"
The main issue with most other good books about learning a machine laguage is that they (have to) concentrate on another very specific computer most unmatching the Propeller....
Assembly is easier than you think especially on the propeller
mov cheese,#10 'moves the number 10 into a register called cheese
add cheese, ham ' adds ham to cheese, result is in cheese
mov outa, cheese 'loads the sandwich into the output register
Please check out my mini 4 part tutorial, do it with the manual beside you, no real prior knowledge needed:
http://forums.parallax.com/showthread.php?p=647408
Unfortunately my tutorial is not deemed good enough to go along side the others but you would have found it in my index thread buried in one of the other stickies making it rather un-index like [noparse];)[/noparse]
Graham
Get stuff happening in Spin first.. translate to asm if speed needed.
It is not rocket science... it is a matter of understanding exactly what is required..
And understanding what the instructions do exactly is another issue..
To see stuff in asm execute at really high speed is awesome..
And to have 2 or 3 cogs doing stuff totally simultaneously is cool ..(don't you love that word.. cool)
cheers ron mel oz..
This code is a section from BoeBotBasic object.
Please help explain #def#clksetVal since I could not find the answer in the Propeller Manual.
Thank you.
Lang Co
"#def#clksetVal" is made up of 3 pieces. The first "#" indicates that the following operand is an immediate value. It causes the "i" bit to be set in the instruction. The "def#" indicates that the following identifier is expected to be defined in the object "def" declared in this object. The actual identifier (which is defined in another object) is "clksetVal".
Thank you - Mike - I get it now.
I'm sure Knuth's book is better, but I never read it.
Don't bother which Knuth until you decide that you really really want get that Nerd License. Instead, pick a program like keyboard.spin and work out what it does.· See what Parallax's people have done in assembly and do likewise. Just about anything Chip Gracey has written is worth any of Knuth's books and a whole lot cheaper.
All assembly commands can be classified into 3 catagories:
Knowing this fact helps when figuring out how to work in assembly because it helps you put things in perspective no matter how large the instruction set is.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Felt this was long and outta context, given the replies above. Sometimes a forum conversation sparks some good writing for me. If anybody found that post obtrusive, sorry --It just happens!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Post Edited (potatohead) : 2/9/2008 8:42:10 PM GMT