Shop OBEX P1 Docs P2 Docs Learn Events
Use @ operator to reserve space for new cog? — Parallax Forums

Use @ operator to reserve space for new cog?

RaymanRayman Posts: 15,343
edited 2025-07-06 16:06 in PASM2/Spin2 (P2)

Seems can also use @ operator to reserve stack space for new cog:

cogspin(newcog,IMU(56),@" ")

Note: There are actually many spaces after the @" that are somehow hidden here...

It'd be easier if could do:

cogspin(newcog,IMU(56),@byte[1000])

This compiles but goes horribly wrong...

Comments

  • Re-using constant data space as variables is kindof nasty. It's better to just use regular VAR arrays.

    @byte[1000] already means something (the same as the plain integer 1000... syntax symmetry with other more useful things)

Sign In or Register to comment.