Looking for sample codes from spin to assembly
roykxing Posts: 3
in Propeller 1
I am a beginner of both spin and assembly, and needing to make a conversion on a piece of assembly code to spin. I've gone through parts of the manual but yet to be proficient enough to correctly utilize each command in practice.
Are there any existing sample codes that I can reference for basic commands and operations from one to and other?
Any pointer or tips would be greatly appreciated!
That's a little vague, assembly code in pasm?, post a sample of your assembly code. Here is a simple example
Usually it's in assembly for a reason. Speed usually. Converting it back to spin will then make the code too slow.
Thanks for the response!
Yeah, this was originally designed to run in assembly in a designated cog, but we run out of cog to use for this feature on a new device.
Therefore, we thought we could merge that into the main loop in spin, given that the procedures in the assembly don't require high speed.
here is a small piece of the code. I understand that it is pointer arithmetic in assembly, moving address, performing read, write and math eventually store back in each address. But I am very confused on how to do that in spin.
'rxdata contains the raw value
tmp1 := @rxdata
I'm not even sure if i am on the right path
See if this helps
THANK YOU SO MUCH Jon!
I could see the correlations now.