flat assembler
Message board for the users of flat assembler.

Index > Main > flat assembler 1.62

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 12 Jun 2005, 14:45
Since the 1.61.x development line already has all the features I planned for the 1.62, the stable version is going to be released soon. For the purpose of Win64 programming the "MS64 COFF" output format is implemented and tested to work with the Microsoft's linker for Win64. The direct production of PE+ executables for Win64 is planned for the stable 1.64 release on my roadmap - this is why I said once that the 1.64 is going to be the final release for x86-64; however the x86-64 support is in general already finished and stable (there were still some bugs in ELF64 object output, but got fixed during the 1.61.x development).

The biggest changes were applied to preprocessor (see http://board.flatassembler.net/topic.php?t=3592), and the large update of documentation had to be done due to them. Not only the new sections about added features, but also some corrections and additions to other sections, explaining some important details I forgot to document earlier. For example finally the symbol characters recognized by fasm are listed in the section 1.2.1 (and terminology related to tokenization of lines done by preprocessor is explained, these definitions are important to understand many details of the macroinstruction processing).


Last edited by Tomasz Grysztar on 19 Jul 2005, 08:21; edited 4 times in total
Post 12 Jun 2005, 14:45
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 12 Jun 2005, 19:21
Do you consider extending macro library in future versions, for example adding redefined directives such as "db" (as you wrote here)?
After introducing new features, a lot of interesting solution appeared, and some of them could be implemented in official package (not only extended .if macro).
Post 12 Jun 2005, 19:21
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 12 Jun 2005, 19:44
Yes, but some of the new solutions, even though much better, would be incompatible with the older macros. There's a possibility that completely new macro package will be designed, and while distributing this new package and examples based on it, still distribute also the old macro packages for compatibility.
Post 12 Jun 2005, 19:44
View user's profile Send private message Visit poster's website Reply with quote
khanh



Joined: 25 Jul 2003
Posts: 27
khanh 12 Jun 2005, 22:00
I think the compatability issue at the moment is not a problem, isn't it?
The developement of Fasm though goes very far by now but it is still young and not many code for its around (compared to large Tasm and Masm bases).

So I think it would be a good idea to make change by now or otherwise we could step into problem like Masm. It is my personal opinion though.
Post 12 Jun 2005, 22:00
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 13 Jun 2005, 07:23
yeah, rather make new macros. Do we want to end up like all that backward-compatible-overbloated stuff?
Post 13 Jun 2005, 07:23
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
halyavin



Joined: 21 Aug 2004
Posts: 42
halyavin 13 Jun 2005, 09:02
I understand now why MenuetOS kernel source code rarely use macros - there will be no problem when Privalov break backward compatibility. There will be no problems with applications if macro behaviour willn't changed (MenuetOS applications don't use standart .inc files).
Post 13 Jun 2005, 09:02
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 13 Jun 2005, 09:17
The standard includes apply only to Win32 programs currently - there are no official macro packages for DOS or Linux in fasm distributions.
Post 13 Jun 2005, 09:17
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 13 Jun 2005, 15:44
I have 1 more feature request for fasm: couldn't you add support for AMD's extended 3D-Now! instructions? Though this shouldn't be too hard to add, since fasm already supports basic 3DNow-instructions. It's strange, I know more PC's here that support the extended 3D-Now! instructions than SSE2/3, since they are all Athlons/XP+/64 rather than Pentium 4s/Ms.

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 13 Jun 2005, 15:44
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 13 Jun 2005, 16:06
The extended 3DNow! instructions got all already implemented quite a few versions ago, and are documented just among the basic 3DNow! instructions in the fasm's manual.

Oh, it has just reminded me: I've got to document the newly implemented VMX instructions, too.
Post 13 Jun 2005, 16:06
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 14 Jun 2005, 10:45
Privalov wrote:
The extended 3DNow! instructions got all already implemented quite a few versions ago, and are documented just among the basic 3DNow! instructions in the fasm's manual.
Ahhh, maybe I just overread them all, or I didn't distinguished them from the basic 3D-Now! instructions because they don't have an own chapter number in the docs Rolling Eyes
Post 14 Jun 2005, 10:45
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 14 Jun 2005, 20:21
I have released the 1.62 today and updated the documentation and examples on the website aswell.

For anyone wanting to write any macros I highly recommend read the updated chapter about preprocessor in the manual, for instance the new section 2.3.7 contains some important informations about preprocessor which were not really documented till today.
Post 14 Jun 2005, 20:21
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 14 Jun 2005, 21:35
Just wondered if it's necessary with both "repeat ... end repeat" and "rept { ... }"? Or can I accomplish the same with rept as with repeat - if so, I find the old "repeat ... end repeat"-block superfluous... Comments?
Post 14 Jun 2005, 21:35
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 14 Jun 2005, 21:41
Look for example at XOR Crypting macro - generally "repeat" is needed where the repetitions process is depended on some values resolved at assembly time.
Post 14 Jun 2005, 21:41
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 15 Jun 2005, 08:16
I see...
Post 15 Jun 2005, 08:16
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 15 Jun 2005, 10:09
I have decided to release the 1.62 even though I haven't finished all the additions to the manual I planned (the new subsection in 2.1 about the VMX instructions, and also the new subsection in 2.2 about code resolving, the issues which are already mentioned in the Design Principles article, and also about combining the control directives to get interesting results). This is because it's likely that I won't have as much time for fasm in the next few weeks, and I didn't want to delay the new release for this reason - it defines some new standards so the sooner it was released, the better.
Post 15 Jun 2005, 10:09
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 15 Jun 2005, 14:26
I have just got back to my desk after a few days and see that a new version has already been released.

So much of my code has now been broken with the new version Sad

I was able to do a small amount of editing in my standard includes (mostly with 'fix') but I still have one problem that is causing most of my code to be broken:

Code:
include 'MACRO\STRUCT.INC'
include 'MACRO\STDCALL.INC'
include 'EQUATES\USER32.INC'

call bar
call baz

proc bar,.param,.far
.handle dd      ?
        enter
        mov     eax,[.param]
        return
endp

proc baz,.handle,.param
.far    POINT   ;<--- this fails: "error: symbol already defined."
        enter
        lea     eax,[.far.x]
        return
endp
    


At this point I have gone back to 1.61.9 so that I can continue to do some coding without having to make major changes to all my previous code.

Can the new macros be altered to allow the above to assemble? I don't yet understand them so I haven't been able to make a correction yet.


Last edited by revolution on 14 Feb 2010, 07:43; edited 1 time in total
Post 15 Jun 2005, 14:26
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 15 Jun 2005, 14:37
I also have a problem with the new version of the struct macro, the 'times' directive doesn't work correctly. Is there a way to make it work correctly?


Last edited by madmatt on 15 Jun 2005, 17:45; edited 1 time in total
Post 15 Jun 2005, 14:37
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 15 Jun 2005, 14:39
One other thing I forgot to mention.

With the new struct macros I have to be careful when using this:

Code:
x equ dqword

;some code

struct POINT
  x dd ?  ;<--- "error: reserved word used as symbol."
  y dd ?
ends
    



And also one more thing I noticed. When an error is detected in an "included" file, the error shown does not show the "path" to the included file. That is, it does not show the line in the source where the file was included.

I made a mistake once of including the wrong file name and later when the error came up I had trouble finding the original line with the "include" directive.
Post 15 Jun 2005, 14:39
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 15 Jun 2005, 19:31
First of all, this is the place to discuss the new macros:
http://board.flatassembler.net/topic.php?t=3619
(I have just made it sticky so it will be harder to miss it)
It explains how the new macros should be used.

madmatt: instead of times you should use the "dup" operator with standard data directives, only the data directives are allowed inside the "struct" (it was designed to imitate the syntax of TASM/MASM, for the fasm's syntax just go on with the plain "struc").

revolution: making the include traceable like macros are is not possible with current design of preprocessor's data structures, so I'm sorry, adding such feature won't come easy. Until your comment I've never realized that such thing may come useful. Wink

The "x equ dqword" problem you mentioned was actually the bug in fasm itself, I've fixed it now and updated the 1.62 with the fix. Yeah, I knew that there was not enough testing of 1.61.x... :/ The long tradition of hidden fixes is kept.

The attached file contains the old "proc" macros updated to work with fasm 1.62 - you can use them to compile the sources that use the old syntax.

Or even, if you use the old syntax and have placed "enter" in each procedure, you can use such wrappers over the new macros:
Code:
macro proc name,[arg]
{ common proc name arg
  locals }

macro enter { endl }

macro return { ret }    


Description:
Download
Filename: STDCALL.INC
Filesize: 1.44 KB
Downloaded: 336 Time(s)

Post 15 Jun 2005, 19:31
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 16 Jun 2005, 00:13
All Right, thanks.
Post 16 Jun 2005, 00:13
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.