I use assembly to program "workhorse" functions that need to be fast, for example I have been programming some stepper motor control stuff, this code will sit in a cog going very fast and the rest of my program which is written in spin accesses it as required.
I think Mike is right when he says that propeller assembly is not that bad, it's easier than other assemblies I have tried or looked at, not least because the propeller is 32 bit and you don't have to mess around making up 16-bit numbers out of 8-bit ones etc and there is no working register to confuse yourself with.
May I suggest you have a look at my 4 step plan for learning assembly (when you have learnt some spin), really it only shows some basic principles but they will get you on the right track. DeSilva's assembly tutorial can then take you on your way to being a guru like these guys.
Graham Stabler said...
I think Mike is right when he says that propeller assembly is not that bad, it's easier than other assemblies I have tried or looked at
Like anything, the more one gets familiar with it the easier it becomes. Going through the 'hello world' equivalent in flashing Leds is a good grounding to get started and then everything just builds on that.
The hardest thing I've found is in getting my head around indirect addressing and self-modifying code ( MOVS, MOVD ). Not that it's hard, just that it's unfamiliar for most people used to working with Flash-based program code. I seem to end up with a lot of code bloat doing indirect addressing so I've probably not learned all the tricks yet.
Getting proficient with conditionals ( IF_Z etc ) takes a bit of getting used to for those not familiar with them and more used to conditional Branches and Jumps but comes fairly quickly and their use in deterministic code timing ( very useful in bit-banging work ) becomes self-evident.
> unless he came up with his own meaning behind BTDT and it wasn't very nice.
But then, he could simply ask. He didn't.
There are a lot of abrevs. I don't know either. In that case I simply assume it isn't an offense and ask what it means.
Anyhow, let's end this OT here. And give me a slab because of reacting upon.
Nick,
back to the CAD and drawing a nice Propeller-PCB for a revolutionary (is it?) ignition-module for combustion engines ...
Revolution::Propeller::Engine; a promising match!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.: YADRO
Comments
I use assembly to program "workhorse" functions that need to be fast, for example I have been programming some stepper motor control stuff, this code will sit in a cog going very fast and the rest of my program which is written in spin accesses it as required.
I think Mike is right when he says that propeller assembly is not that bad, it's easier than other assemblies I have tried or looked at, not least because the propeller is 32 bit and you don't have to mess around making up 16-bit numbers out of 8-bit ones etc and there is no working register to confuse yourself with.
May I suggest you have a look at my 4 step plan for learning assembly (when you have learnt some spin), really it only shows some basic principles but they will get you on the right track. DeSilva's assembly tutorial can then take you on your way to being a guru like these guys.
http://forums.parallax.com/showthread.php?p=647408 - assembly step by step
http://forums.parallax.com/showthread.php?p=609066 - good thread index with links to lots of resources (needs updating)
Oh and be sure to check out the education kit labs:
http://forums.parallax.com/showthread.php?p=617192
Graham
The hardest thing I've found is in getting my head around indirect addressing and self-modifying code ( MOVS, MOVD ). Not that it's hard, just that it's unfamiliar for most people used to working with Flash-based program code. I seem to end up with a lot of code bloat doing indirect addressing so I've probably not learned all the tricks yet.
Getting proficient with conditionals ( IF_Z etc ) takes a bit of getting used to for those not familiar with them and more used to conditional Branches and Jumps but comes fairly quickly and their use in deterministic code timing ( very useful in bit-banging work ) becomes self-evident.
not really but I would like to understand what would prompt such rudeness unless he came up with his own meaning behind BTDT and it wasn't very nice.
But then, he could simply ask. He didn't.
There are a lot of abrevs. I don't know either. In that case I simply assume it isn't an offense and ask what it means.
Anyhow, let's end this OT here. And give me a slab because of reacting upon.
Nick,
back to the CAD and drawing a nice Propeller-PCB for a revolutionary (is it?) ignition-module for combustion engines ...
Revolution::Propeller::Engine; a promising match!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO