where can i find more information on the COGNEW parameter to address a block of memory, or any information on passing more than one 14 bit value to a cog running assembly?
The information is primarily in the Propeller Manual in the section on the COGNEW/COGINIT instruction and the Spin COGNEW/COGINIT "function" for starting an assembly routine. In Spin, the 2nd parameter is assumed to be a 14 bit long address (bits 15-2) with the low order 2 bits discarded. This is included in the COGNEW/COGINIT instruction that's executed and the passed value appears in the PAR register when the cog starts up (in bits 15-2 of the PAR register).
The only way to pass more than this 14 bit value to a cog is to pass the address of a group of longs as the 14 bit value and to use RDLONG (and possibly WRLONG) to access this group of longs (or words or bytes). There are plenty of examples in the form of various objects in the Object Exchange, but you'll have to look through them to see how it's done.
Comments
The only way to pass more than this 14 bit value to a cog is to pass the address of a group of longs as the 14 bit value and to use RDLONG (and possibly WRLONG) to access this group of longs (or words or bytes). There are plenty of examples in the form of various objects in the Object Exchange, but you'll have to look through them to see how it's done.