flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > listing, target address and labels |
Author |
|
Tomasz Grysztar 03 Apr 2012, 23:09
The address is listed only when it differs from the previous one - so the lines that do not change the $ value in any way are "grouped" with the origin address listed just once.
Of course you can write a different listing generator that will make output more suitable to you needs - as I already wrote elsewhere the tools that come with fasm's package are just a simple examples of how the .fas output can be processed. |
|||
03 Apr 2012, 23:09 |
|
shutdownall 03 Apr 2012, 23:21
Thanks for replying.
Ofcourse I could correct the behaviour myself for my purpose. But I think the difference handling between address in output file and target address is - lets say - not corresponding. So if you don't repeat the target address why is it handled different to the physical address ? This is not repeated same way but is in the same line as code. Look as example at physical address 000010FB: It's followed by only spaces. In the line above the physical address is not printed (only space) but followed by target address. And even if it is only an example, examples could be made nicer if delivered with source. So if I change it to a better looking way and I post it here at the board, you maybe could change the file for future release ? Just a proposal. Anyway it's just an example and no critical file, I think. PS: I could add parameters for reducing unneccessary zeros in addresses to strip them to smaller values (word/dword instead of dword/qword) and a switch for listing on/off which was discussed in earlier discussions. |
|||
03 Apr 2012, 23:21 |
|
Tomasz Grysztar 04 Apr 2012, 09:02
shutdownall wrote: Look as example at physical address 000010FB: At the same time "wmkillfocus:" is the first line in block of two lines that were assembled at "40C6FB" address, and so address is listed with first of them, but applies to the whole block. To me it looks much more clear when the blocks of instructions that were assembled at the same address and did not move $ value are grouped this way. And the difference in handling of file offsets and $ addresses is there because offsets in file are linked to the data, they really are the offsets of some code/data bytes, and so when some new bytes are generated, it is shown at what offset in file they are put. While the single $ address may apply to a whole range of instructions that do not generate any data, but where $ value is nonetheless important - as in case of label definition. |
|||
04 Apr 2012, 09:02 |
|
shutdownall 04 Apr 2012, 11:52
It's okay for me and I understand how it works and how you think.
I will treat it other way and think this version below looks much better. The effect is, that symbols or labels will not be printed with target address but can be found out watching the line above. In most cases labels are just needed for jumps and have no other really function in the program. And if you really need a list with all labels, you could use the symbols "tool". Anyway this symbol list would be more nice to be sorted alphabetically and not in the order of definition but this is definetely another part. I know your point of view, its just an example. So this is same just a proposal. Code: 000010F6: [000000000040C6F6] E9 52 14 00 00 jmp moved_window wm_killfocus: 000010FB: [000000000040C6FB] C6 85 38 FE FF FF 00 mov [focus],0 I will post a new listing source code in the next days here which can be used from whom it may concern. |
|||
04 Apr 2012, 11:52 |
|
Tomasz Grysztar 04 Apr 2012, 13:26
shutdownall wrote: The effect is, that symbols or labels will not be printed with target address but can be found out watching the line above. |
|||
04 Apr 2012, 13:26 |
|
shutdownall 04 Apr 2012, 19:38
Tomasz Grysztar wrote:
No - I mean above. [000000000040C6FB] belongs to label wm_killfocus which is the line above. |
|||
04 Apr 2012, 19:38 |
|
Tomasz Grysztar 04 Apr 2012, 19:49
Oh, I misunderstood you - I thought you mean that to find out what is the value of label, you have to look at the other line. And you did mean the other way around.
|
|||
04 Apr 2012, 19:49 |
|
shutdownall 04 Apr 2012, 21:38
Here I have changed version of LISTING.INC which has following options and changes:
-a will include target address (default no) -b <number> will change the number of bytes per line (default 16) Changed is the behaviour talked above, so target address will only be printed together with byte address ($) if choosen in general by -a option. I changed size of target address to 32 bit by default and will change to 64 bit automatically when first address with more than 32 bit is detected. Many programs do not use target addresses with more than 32 bit and this is a waste of space to just print 8 more zeroes in front of every address. And I integrated a switch for listing on and off. You can put at any time in source ;LISTON or ;LISTOFF to activate/deactivate listing for those parts where the listing is desired (the part of program you are maybe working on). The comment has to start at the beginning of a line and only uppercase is tested. Just an easy implementation but hopefully useful. For me it's very useful to skip listing for all include files for example. Have fun.
|
|||||||||||
04 Apr 2012, 21:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.