flat assembler
Message board for the users of flat assembler.

Index > Main > Two notes about FASM

Author
Thread Post new topic Reply to topic
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
Hi Tomasz!
I wanna discuss two things:
1) I found one bug in FASM:
following instructions don't cause error:
movq xmm1, mm0
movq mm1, xmm0

while only following variants are allowed (see IA-32 Intel® Architecture Software Developer’s Manual Volume 2A: Instruction Set Reference, A-M):
movq mm1, mm0
movq xmm1, xmm0

2) And what do you think about symbolic mnemonics for OS and AS prefixes (66h and 67h) as well as for segment override prefixes (cs:, ds: and etc.)? And the same for branch hints prefixes (2eh and 3eh) that used with Jcc instructions (see IA-32 Intel® Architecture Software Developer’s Manual Volume 2A: Instruction Set Reference, A-M, 2.1.1 Instruction Prefixes, page 2-2).
Post 07 Jun 2006, 13:55
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
1) Thanks for the report, it's fixed now.

2) The mnemonic-like segment override prefixes are present since the very beginning of fasm.
For branch prefixes see http://board.flatassembler.net/topic.php?p=4547#4547
As for NASM-like O16 and O32, I mentioned them here: http://board.flatassembler.net/topic.php?t=5287, but I got no positive feedback.
Post 07 Jun 2006, 17:01
View user's profile Send private message Visit poster's website Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
Maybe is better to use something-like "O16 <instruction>" or "OS <instruction>"? OS - operand size, AS - address size, and for branch prefixes to define mnemonics like "BT" and "BNT", e.i. BT - branch taken, BNT - branch not taken.
Post 07 Jun 2006, 17:25
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
BT is a mnemonic already, it's Bit Test
Post 07 Jun 2006, 17:29
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
I think O16 and O32 are a pretty good idea. However, ut and lt stink. Razz I'd suggest plain ol' YES and NO (or maybe JA, NEIN to avoid typical name collision...plus JA means Jmp if Above anyways).

<EDIT>
Doh, JA would conflict, wouldn't it? Oh well, maybe JES, NE ?
</EDIT>


Last edited by rugxulo on 08 Jun 2006, 21:54; edited 1 time in total
Post 07 Jun 2006, 23:35
View user's profile Send private message Visit poster's website Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
Yes, BT is already used, ok.
I suggest using following mnemonics:
1) O16 and O32
2) A16 and A32
3) maybe including OS and AS, which will depend on current 16-bit or 32-bit code segment.
4) BHT and BHNT for branch hint prefixes.
see http://qc.borland.com/wc/qcmain.aspx?d=15548
Post 08 Jun 2006, 08:10
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
I really don't understand why everyone so dislike the UT/LT Very Happy
Anyway, since those are easily defined with equates, I don't feel it necessary to build them in - unless there comes some naming standard for them.
The notation I actually saw most frequently was HT/HNT.
(BTW: there was also a thread here about this: http://board.flatassembler.net/topic.php?t=5113 and I revived it, as I found another interesting thing about this topic, and that thread seems to be more appropriate to discuss it).

As for the O16/O32 - on one side, it would be nice as another compatibility with NASM; on the other, the fasm's point initially was that those prefixes shouldn't be actually needed, as the combinations of size specifiers should allow to make any variant of the instruction you need. Only recently it appeared (in that mentioned thread) that there are some (thought rare and not of crucial importance) problems with this approach. However I still prefer this over the O16/O32 notation, which is cryptic and may be sometimes misleading.


Last edited by Tomasz Grysztar on 08 Jun 2006, 09:36; edited 1 time in total
Post 08 Jun 2006, 09:02
View user's profile Send private message Visit poster's website Reply with quote
Hunter



Joined: 07 Jun 2006
Posts: 41
Hunter
I like BHT/BHNT more than HT/HNT Smile.
Post 08 Jun 2006, 09:19
View user's profile Send private message Reply with quote
Betov



Joined: 17 Jun 2003
Posts: 98
Betov
There was also a wide discussion in between most of the actual Assemblers Authors, at the time these came out. After some time, i choosed to "align" my choice on the one of one of the NASM developers, who was part of the discussion:

LTJ // UTJ

Unfortunately, the discussion, and my efforts to push to a common decision, so that all actual Assemblers could all share the same mnemonic, have been useless, and this choice has not even been implemented into NASM itself (!!!...).

It was, to me, my very _last_ attempt of ever trying to unicize anything, with guys who do not _want_ to unicize anything, not even for a so costless and un-important detail. Crying or Very sad


Betov.
Post 10 Jun 2006, 08:15
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
I say we should have a vote.

P.S. Betov, you sure took long enough to post: your last post was in '04, almost two years ago! Glad you still occasionally read this forum, though. Smile
Post 11 Jun 2006, 19:09
View user's profile Send private message Visit poster's website Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
offtopic: Betov as author of Rosasm?
Post 12 Jun 2006, 03:24
View user's profile Send private message MSN Messenger Reply with quote
Betov



Joined: 17 Jun 2003
Posts: 98
Betov
Yes, "Betov, as...". I stopped posting anything, here, since Thomasz dishonored himself with compromising with Randall Hide. Nevertheless, on such a general interrest subject as defining a trivial Mnemonic, i keep in the opinion, that it would be of general interrest of having all of the actual Assemblers assuming a so low cost of "compatibility".


Betov.
Post 12 Jun 2006, 13:05
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. Also on YouTube, Twitter.

Website powered by rwasa.