Page 1 of 1

Label File display utility for XA

Posted: Tue Dec 23, 2008 4:24 pm
by Twilighte
I recently found a need to display the label file in a better way than just looking at xa's generated file, so i wrote my own handy utility and called it Symbolmon.

It simply displays the contents of the label file in various different ways and also allows you to instantly see the location of a unique label (useful for keeping tabs on the highest location). :)

It has proved invaluable to me, and may be useful to others. :idea: ...

Instructions included in readme.txt in the zip file
Sorry for crappy icon. :P

Posted: Fri Dec 26, 2008 10:42 pm
by Dbug
I did not have time to check it out, but I wanted to add that there is also a small symbol viewer program in the osdk, the "showmap.bat". It is not very advanced, all it does it to generate a html page from the symbol file, and call a web browser to show the content

Posted: Sat Dec 27, 2008 7:00 pm
by Twilighte
That actually sounds alot better than mine, because it is not tied to windows. However i would like very much to expand mine to detect file date and time so that it will automatically update the list. Not done yet tho.

Posted: Thu Sep 03, 2009 10:51 pm
by Twilighte
Updated symbolmon so now it can track through your complete source code picking up #includes (so long as they exist in the main source file (which is assumed to be the same name as the symbol file but with the extension .s)) and display the occurrences of each label.

A progress bar is provided for bigger projects because it can take some time. It can also generate a quick report on all labels that occurred once in the source files.
Its not perfect yet as it was lashed together last night in a couple of hours and will erase the count if you refresh the label list but its already saved me about 1K bytes in my other project Impossible Mission. ... bolmon.exe

Posted: Fri Sep 04, 2009 8:48 am
by Chema
mmm I think I don't get the picture here. You mean you can waste some bytes by #including the same code twice?

Strange as all the labels will be duplicated, or am I wrong? Also the usual way of merging different .s file together is using the osdk_config file, where you will surely include each file only once, and keep #includes for setting #defines and such things...

And also it is allways a good idea to do this in all your include files (changing MYINCLUDE_H with the name of the included file):

Code: Select all


<file contents>

I suspect I am not understanding the issue, but anything that could help to reduce redundant code is interesting to me :)

Posted: Fri Sep 04, 2009 9:39 am
by Twilighte
Yes, i think you have misunderstood or i have just not explained this right..

Take a project. It consists of a root source file which then links (through #includes) to all the other areas of the project.
Symbolmon's new feature will compile a new file called "Massive.txt" containing this root source file. When symbolmon finds a #include it will add the contents of that file to massive.txt instead of the #include so creating a single file containing all parts of the project.
However if a 'child' source file contains #include's the current version of symbolmon won't include these.

Anyway, once the massive.txt file has been created, it then scans this file and displays (in square brackets) the number of times it found each label in the labels list.

Clear as mud or clear as crystal?

Posted: Fri Sep 04, 2009 9:39 am
by Dbug
I think his issue was to locate routines or tables that are not actually used at all. And you can locate them because nothing in the code is refering to the label.

Posted: Fri Sep 04, 2009 9:41 am
by Twilighte
Exactly, thanks Dbug for that more abridged version :)

Posted: Fri Sep 04, 2009 10:37 am
by Chema
Twilighte wrote:Exactly, thanks Dbug for that more abridged version :)
LOL I understood now. Sorry for the confusion.