PASM Labels Used in Called Methods
pjv
Posts: 1,903
Hi All;
In a Spin program, is there a better way to access the PASM labels of an object's methods other than using the "object#constant" reference procedure ?
In the Spin program, I wish to know the cog address of PASM labels of a ch routine, and find having to manually redefine a set of constants in the assembler program as the label address move around while I debug it to be a real pain.
Perhaps there is a trick I am unaware of.
Cheers,
Peter (pjv)
In a Spin program, is there a better way to access the PASM labels of an object's methods other than using the "object#constant" reference procedure ?
In the Spin program, I wish to know the cog address of PASM labels of a ch routine, and find having to manually redefine a set of constants in the assembler program as the label address move around while I debug it to be a real pain.
Perhaps there is a trick I am unaware of.
Cheers,
Peter (pjv)
Comments
What does "PASM labels of an object's methods" mean?. As far as I know methods don't have PASM labels what with not being PASM code.
Kuroneko, how do you (automatically) generate such a table ?
Heater, I have a Spin program that wants to call one of several assembly methods in an object, using a common PUB to access them. The compiler knows the addresses of these entry points, but won't let me use their names in the parent that's calling them. Hence so far I'm obliged to use the 'object # constant' procedure to effect what I'm trying to do. And during debugging that is a real pain because the addresses all keep changing.
It would seem to me to be a real benefit if constants could be allowed to inherit the address value of a PASM label. And while we're at it, to allow constants to have global assignments across all objects.
Cheers,
Peter (pjv)
-Phil
Phi...., I have done that, but it makes for a further level of indirection, increasing size and dropping performance. This is for use in my OS, and I want it to be as tight and responsive as I can get it. The assembler knows the addresses, so why not let them be used directly in the program's CONstant definition block.
Marko.... I'll try your suggestion while I'm debugging.
Cheers,
Peter (pjv)