COGINIT captures new cog in D?
Seairth
Posts: 2,474
in Propeller 2
If D is not an immediate value, does COGINIT capture the newly-started cog's index in D? (like it does on P1?)
Comments
Did you mean D[4]?
So, given the following combinations (where D is not an immediate value):
* D[4] not set, WC not set -> C is not altered, D is not altered
* D[4] not set, WC is set -> C is set always set to 0, D is not altered
* D[4] is set, WC not set -> C is not altered, D is not altered
* D[4] is set, WC is set -> If cog is available, set C to 0 and D to new cog ID; otherwise set C to 1 and D is not altered.
D is always altered if it is a register and WC is used, whether or not D[4] is set. Of course, if WC is used and D is a register, you'd certainly have D[4] set.
Look correct?