flat assembler
Message board for the users of flat assembler.
Index
> Main > Segments & Labels |
Author |
|
rugxulo 22 Dec 2006, 04:32
check here: listing for fasm 1.63 and higher (easiest to just download/use llaurrentt's package)
Usage: fasm myfile.asm myfile.exe myfile.lst |
|||
22 Dec 2006, 04:32 |
|
Tomasz Grysztar 22 Dec 2006, 09:27
rugxulo: For the values of labels much better is this one (also listed in Advanced Fasm Topics in Important/Interesting Threads - we really did something to make those things easier to find). The listing extension in its current form has been abandoned by me, I'm working on changes to fasm's core that may become a base for new better version.
As for the main question here: the segment labels in MZ format are an example of what is called relocatable symbol - their values are not known at the assembly time, and in case of segments the only value you can know from the assembler is the value of segment relative to some other segment. So you can know "text-main" or "extra-main" value, however what value will "main" have you won't know until your program is run, and DOS may load your program with a different "main" base each time. |
|||
22 Dec 2006, 09:27 |
|
DOS386 22 Dec 2006, 16:46
rugxulo wrote:
Quote: listing for fasm 1.63 and higher (easiest to just download/use llaurrentt's package) Thanks. That is exactly what I needed. Tomasz wrote: Quote:
Does not work for me - need to include into an obsolete source version no longer available. Quote:
Thanks. Judging from this text, listing from "llaurrentt's package", and some additional experiments: - "main" becomes 0. - If a segment is for ex. 50 bytes, it rounds up to 64, and the label difference becomes 4. - Every segment access will generate a reloc in the MZ header, and DOS will patch all those values when loading the EXE. - Failure of the "hack" on segment labels is NOT considered as bug All ^^^ correct ? Finally, I have to second the requests in the linked threads: It would be nice to have the label listing feature in main FASM release, rather than a patch usable with obsolete sources only. _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
22 Dec 2006, 16:46 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.