flat assembler
Message board for the users of flat assembler.

Index > Main > 3 requests/suggestions for FASM

Author
Thread Post new topic Reply to topic
kake_zinger



Joined: 15 Jul 2004
Posts: 59
kake_zinger 30 Jul 2004, 13:53
I'm just a beginner, but have found out I'd like the following, in ascending order of importance:

1) ALIGN with ability to set align byte to what I want. If I need to use align in code sections I'd be a lot happier using 90h than 0!

2) Number local labels. A plain number is not accepted now, and there isn't really any reason why. It cannot be confused with an immediate number, because it will be part of the last global label. Think of jumptables and stuff, lot nicer coding int.0 than int.i0 for an interrupt label.

And numbers are a lot less offensive than letters, if there's .20: somewhere it's just some number, but if it has to be made into .x20: or .l20: at least I immediately wonder what the letter stands for.

The only case where any confusion could arise is if you permit entering floating point numbers in code without leading zero, is .20 refering to a local label or 0.20? In my view a number should always have the leading zero anyway, so no place for confusion in there.

3) DEBUGGING!! As of now debugging anything is pure pain and torture because fasm doesn't offer ANY debugging aids! Just a simple name.out listing with EIP value in the left column would do wonders.

Program crashes at 8:a089 what do I do now? Fire up hex editor, count a089-7c00, find correct address in hex editor, try to guess from machine code where in source listing I might be (with the gracious help of the mnemonic encoding table), then enter db 'HERE' into the source, compile it, see if I am really where I thought I am, try to find the absolute correct location byte by byte praying with the mnemonic table, and finally I will find the offending instruction.

That is A Lot Of Work.

To skip ALL that, all one would need is that with "fasm xyzzy.asm xyzzy.com" it would also output xyzzy.out, an ascii listing of the source with EIP added to each line. That cannot be too hard to do. Which brings me to another subject, it'd be nice to be able to set a default output extension into fasm, even with a hex editor later, so that one could only type "fasm xyzzy" and it would execute "fasm xyzzy.asm xyzzy.com xyzzy.out".

To continue from debugging, I could use a debugger..but what if there is no debugger, like when writing your own system code? And especially if one is the newest clueless beginner kid on the block like I am. I couldn't do it even if I wanted to, not at this point of learning curve.

So I ask you, PLEASE make 3) come real.
Post 30 Jul 2004, 13:53
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8397
Location: Kraków, Poland
Tomasz Grysztar 30 Jul 2004, 14:05
1) Actually the ALIGN directive uses 90h bytes. To fill the alignment area with anything other you can use some of the macros, that were posted here: http://board.flatassembler.net/topic.php?t=1570

2) Since the floating point numbers starting with dot have been disallowed in the recent releases (see http://board.flatassembler.net/topic.php?t=1279&postdays=0&postorder=asc&start=25#8393), you can use such label freely. Please update. Wink

3) Since the addresses for source lines are what you need (as it seems you don't use any disassembler or debugger), the listing add-on is what you could use. It was posted here: http://board.flatassembler.net/topic.php?t=863
Post 30 Jul 2004, 14:05
View user's profile Send private message Visit poster's website Reply with quote
kake_zinger



Joined: 15 Jul 2004
Posts: 59
kake_zinger 09 Aug 2004, 13:30
Thanks for the update, I had just updated to 1.53, time for 1.54 already!

Although I still think that you could make an output listing a fixed feature. Address, encoded instruction, and original mnemonic, that would fill every need. I still sometimes use DEBUG simply for the convenience of seeing the encoding etc right away.
Post 09 Aug 2004, 13:30
View user's profile Send private message Reply with quote
kake_zinger



Joined: 15 Jul 2004
Posts: 59
kake_zinger 09 Aug 2004, 13:38
As a matter of fact, one more suggestion: mov [0b8000h],'A B ' and fasm complains about missing size. Hello fasm, I just specified it there with a 4 byte string, so would that be a dword for you sir under any circumstances?

I really can't see a situation where the string size would NOT describe the size, so this should be a safe upgrade.
Post 09 Aug 2004, 13:38
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 09 Aug 2004, 13:41
you are right, but having checked every such case could result in FASM becoming not so clear, and if you are forced to write that dword you are sure you know what you are doing.
Post 09 Aug 2004, 13:41
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 09 Aug 2004, 13:45
what about unicode strings then? 'AB' can be two bytes long as ANSI string, and 4 bytes as Unicode.
Post 09 Aug 2004, 13:45
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 09 Aug 2004, 19:30
unicode, isn't there the "du" macro?
Post 09 Aug 2004, 19:30
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 09 Aug 2004, 20:43
yes, there is, but it was about instructions like mov [324324],'AB', not about data declaration.
But, after I thought about it, I think that you are right and mov [24532], 'A BCD" should assume that 'ABCD' is 4 byte long and not require size operatror.
Post 09 Aug 2004, 20:43
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 10 Aug 2004, 05:18
by the way - du isn't macro, it's directive.
Post 10 Aug 2004, 05:18
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.