spin from asm
danielstritt
Posts: 43
i know spin is an object oriented language, and asm is generally considered not to be, but is it at all possible to use spin based objects calling them from asm based code?
Comments
ASM is, well, an assembly language.
No, you cannot call the methods of Spin objects from PASM.
Neither can you call PASM procedures from Spin.
The only way for PASM and Spin to interact is through shared variables in HUB RAM through which they can pass commands/data/results etc.
One normally does this by having Spin start some PASM in a COG and passing an address of a HUB RAM area as a parameter to COGNEW/INIT. The running PASM in the new COG gets that address in its PAR register and now it can communicate with any other Spin (or PASM) that uses that area.
There are examples in the manual and in the many objects in OBEX.