flat assembler
Message board for the users of flat assembler.

Index > Main > Wishes to control the code

Author
Thread Post new topic Reply to topic
booter



Joined: 08 Dec 2006
Posts: 67
booter
I've been using FASM for some time, though it's my first post to this forum.
I have some wishes:
- I'd like to be able to control which particular form of instruction would be genrated. Also, some "command-choise" compatibility modes (for ex. "like MASM")
- I'd like to have some support for self-modifying code, particulary being able to change immediate operand regardless of command length.
- It would be nice to have commands "fully expanded" in the listing, with all addressing registers shown and explicit data sizes.
- I'd like to have simple way to raise an error when generated code exceeds predefined limit.
- It may be useful to allow "size prefix" to be specified explicitly, like
Code:
 word push 0  ; = 66 6a 00
 push word 0  ; = 68 00 00     

In general I see a big empty gap between x86 code and "Intel-style"-assembler. Does anybody have any idea how to fill it? Smile
Thanks
Post 08 Dec 2006, 17:15
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
booter wrote:
- I'd like to have some support for self-modifying code, particulary being able to change immediate operand regardless of command length.

Do you mean something like:
Code:
        mov     [imm],8
        add     eax,dword 0
        label imm dword at $-4    
?

booter wrote:
- I'd like to have simple way to raise an error when generated code exceeds predefined limit.

You may try this:
Code:
if $>10000h
 display 'The code size limit has been excedeed.'
 rb -1
end if    

booter wrote:
- It may be useful to allow "size prefix" to be specified explicitly, like

See this discussion: http://board.flatassembler.net/topic.php?t=5381

They may be easily implemented as macros anyway.

booter wrote:
In general I see a big empty gap between x86 code and "Intel-style"-assembler. Does anybody have any idea how to fill it? Smile
Thanks

I see this gap as an advantage - one of the things I expect from assembler is to abstract from the instruction encodings, so that programmer can focus on functionality of the instruction - what exactly he wants to have done - and the assembler may choose the best form for him, so that he doesn't even have to know, that what he percepts as the same instructions, for machine is actually something completely different. Like MOV being in fact either "load" (from memory) or "store" (into memory).
Post 08 Dec 2006, 19:47
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-2020, Tomasz Grysztar.

Powered by rwasa.