Exporting symbol table
The Wangster
Posts: 13
I need to know the addresses of certain labels in my propeller asm code. I currently am doing this manually, which is very time consuming. Are there more efficient ways to do this?
Thank you.
Thank you.
Comments
Anyway the Prop tool does not support the export of label addresses.
<edit> Thanks CJ for pointing out my typo </edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 4/28/2007 6:15:05 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
On a side note, can you modify propasm to do this?
That said, there is always more than one way to skin a cat (this is why I asked what exactly you are trying to do). You can create a monitor program which uses·offsets within hub memory to calculate the addresses.
So lets say your assembly code label structure looks something like:
·So while this assembly code is sitting out in hub memory, those addresses resolve to thier physical location in hub memory, and any program written in Spin simply needs to compute (proc1 - istart) to calculate what the equivalent address of the label is when it's loaded into a cog. Spit the entire series of label resolutions back to the PC via FullDuplexSerial and you can cut and copy the values back into your bytecode compiler.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 4/28/2007 10:31:22 PM GMT
how much spin are you using to do this? if it is REALLY minimal, I may have a way to get the hub absolutes with little effort.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
I wasn't asking Paul to do it, I was asking if it can be done. And how long would it take?
I wrote the whole thing in ASM for speed. SPIN is only used to launch the program.
get the compiler to list quite neatly the hub absolute address, or the cog register that will contain the instruction pointed to by the label
in a DAT section of the top object file
this will produce the absolute hub address of the labeled location. note: this does not work to locate VARs
this will produce the cog register associated with the label
you can use these to produce an easily readable list in the compiler output, or you can use them directly in your ASM program
this will produce a list in the compiler output window with "HUBr" as the locator word, the 3 longs following it are the addresses.
the data is in little endian, so each long starts with the low byte then moves up towards the high byte
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
Wangster, have you looked at Cliff Biffle's Forth for the Propeller?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.