flat assembler
Message board for the users of flat assembler.
Index
> Main > The final product code |
Author |
|
ManOfSteel 25 Feb 2018, 10:51
Mino wrote: What are "passes"? I mean, when we compile, a small dialog box (under the fasm IDE) displays us, for example: "2 passes, 1536 bytes". I would like to know exactly what these passes are. http://flatassembler.net/docs.php?article=manual#1.1 http://flatassembler.net/docs.php?article=design https://en.wikipedia.org/wiki/Multi-pass_compiler Mino wrote: How do I retrieve the final code that was produced by the compiler (if I'm not mistaken, it's x86-64, or directly from "binary"instructions)? Disassemble the output, I guess. |
|||
25 Feb 2018, 10:51 |
|
Tomasz Grysztar 25 Feb 2018, 10:58
ManOfSteel wrote:
|
|||
25 Feb 2018, 10:58 |
|
Mino 25 Feb 2018, 11:59
Thank you very much for your links, I have now understood the principle of multiple pass compilation.
Otherwise, for the disassembler, it doesn't really correspond to my needs, but it's true that I can deal with it. PS: You still don't have any ideas for variable belonging to a label ? |
|||
25 Feb 2018, 11:59 |
|
Furs 25 Feb 2018, 13:20
Mino wrote: PS: You still don't have any ideas for variable belonging to a label ? |
|||
25 Feb 2018, 13:20 |
|
Mino 25 Feb 2018, 14:56
Yes, indeed, after a disassembly of the executable, the label does not exist, as you said, it is only a "marker" of position in the memory. But I'd like to know if there's a trick to make it look like it is.
After that, I could probably do it, but in a pretty "poofy"way. That's why I would like to know if there is a standard, or a better way to achieve a similar result:) |
|||
25 Feb 2018, 14:56 |
|
donn 25 Feb 2018, 15:00
There is also the LISTING.inc tool in the fasm TOOLS dir, may provide some more insight. The README provides a description of LISTING.inc and its usage.
|
|||
25 Feb 2018, 15:00 |
|
fasmnewbie 25 Feb 2018, 17:12
Quote: PS: You still don't have any ideas for variable belonging to a label Code: Label1: .myLabel dq 0 Label2: .myLabel dd 4 mov rax,[Label1.myLabel] mov ebx,[Label2.myLabel] |
|||
25 Feb 2018, 17:12 |
|
Mino 25 Feb 2018, 17:35
When I do this (using a valid code), it tells me that your line 6 is an illegal instruction.
Is that normal? |
|||
25 Feb 2018, 17:35 |
|
CandyMan 25 Feb 2018, 17:52
"rax" is 64-bit register available only in 64-bit mode. you must define bitness of code using directive "use64" (default code bitness in fasm is 16-bit).
Code: use64 ... ;your 64-bit code _________________ smaller is better Last edited by CandyMan on 25 Feb 2018, 17:56; edited 1 time in total |
|||
25 Feb 2018, 17:52 |
|
fasmnewbie 25 Feb 2018, 17:55
Because you're using 32-bit code. Snippet above is for 64-bit. But regardless, that's what you meant by "variable belonging to a label".
|
|||
25 Feb 2018, 17:55 |
|
Mino 26 Feb 2018, 16:30
Thank you very much for all your answers:)
I would like to know one last thing, what changes from 16-bit mode to 64-bit mode? Apart from, of course, the use of some registers or other... |
|||
26 Feb 2018, 16:30 |
|
CandyMan 26 Feb 2018, 17:29
|
|||
26 Feb 2018, 17:29 |
|
Mino 26 Feb 2018, 17:50
Thank you for everything
|
|||
26 Feb 2018, 17:50 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.