flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > [fasm2] How to "know" within code in which format code is?

Author
Thread Post new topic Reply to topic
Jessé



Joined: 03 May 2025
Posts: 119
Location: Brazil
Jessé 08 Jun 2026, 08:22
Hello there,

Is there any way, considering fasm2 headers, to detect which statement is defined with format directive?

Teoretic example:
Code:
format ELF64

; some code that extract what was passed to format directive
; and outputs it to a 'c_format' variable

display "Current format is: ", `c_format, 10

    

Expected output: ELF64

Code:
format ELF64 executable 3

; same as above

display "Current format is: ", `c_format, 10

    

Expected output: ELF64 executable 3

Or something similar.

The main idea is to recognize format and its parameters in any form that can be used to control conditional code.

Thanks in advance.

_________________
jesse6
Post 08 Jun 2026, 08:22
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.