Label File display utility for XA

Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

Post Reply
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Label File display utility for XA

Post by Twilighte » Tue Dec 23, 2008 4:24 pm

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:

http://www.defence-force.org//ftp/forum ... bolmon.zip

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

User avatar
Dbug
Site Admin
Posts: 2738
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Fri Dec 26, 2008 10:42 pm

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

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Sat Dec 27, 2008 7:00 pm

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.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Thu Sep 03, 2009 10:51 pm

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.

http://www.defence-force.org//ftp/forum ... bolmon.exe

User avatar
Chema
Game master
Posts: 2302
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema » Fri Sep 04, 2009 8:48 am

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

#ifndef MYINCLUDE_H
#define MYINCLUDE_H

<file contents>

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

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Fri Sep 04, 2009 9:39 am

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?

User avatar
Dbug
Site Admin
Posts: 2738
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Fri Sep 04, 2009 9:39 am

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.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte » Fri Sep 04, 2009 9:41 am

Exactly, thanks Dbug for that more abridged version :)

User avatar
Chema
Game master
Posts: 2302
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema » Fri Sep 04, 2009 10:37 am

Twilighte wrote:Exactly, thanks Dbug for that more abridged version :)
LOL I understood now. Sorry for the confusion.

Post Reply