flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Fresh update: version 1.1.4 added to the web site.

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 07 Jul 2004, 22:52
Hi all.
"Fresh1.1.4 work" is uploaded to the Fresh website. There is no new features in the program itself, but there are big changes in the macro library: New stdcallEx (almost compatible with old one, but more powerfull with new options and a little bit "downgraded" Smile )
Also, added "turbo.inc" for high speed compilation without branch optimization - very useful for developement on slow computers.

Read history.txt for details.

As always, any opinions and sugesstions are welcome.

Regards.


Last edited by JohnFound on 16 Jul 2004, 09:58; edited 1 time in total
Post 07 Jul 2004, 22:52
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 10 Jul 2004, 13:08
Very nice John! Smile This is getting very good! One problem though... When I compile my projects more than once in the same session, Fresh crashes... I will try to make a more detailed report when I get home from my vacation next week...

Regards,
Tommy
Post 10 Jul 2004, 13:08
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 10 Jul 2004, 16:28
Hi Tommy,
you're using XP, right? On my 98SE I didn't noticed this problem. But 98 seems to be just more "tolerant" system Wink

Hi John,
I like new macros (as almost everything that you had developed Very Happy ), but I can't use your window proc routines in ordinary window proc (without Forms library)... Sad
Do you want to leave it like this or will you try to make winproc macros useful without Forms too?
Post 10 Jul 2004, 16:28
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 10 Jul 2004, 16:36
Yes, that's right decard... Smile
Post 10 Jul 2004, 16:36
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 10 Jul 2004, 16:39
decard wrote:
Do you want to leave it like this or will you try to make winproc macros useful without Forms too?


There is one "mov ebx, [wmsg]" missing before "call JumpTo". (because TForm windows get ebx already loaded with the message). For now I wrote these macroses only to serve the visual code generation of Fresh to let me continue developement, but they can be improved of course.
There are several solutions and I simply don't know which ot them to choose. Smile

1. Include this mov regardless of the fact that is is already loaded...
2. Make more complex macroses with some argumetns that to set the type of the macro - normal window/TForm
3. Write one variant for TForm and another for simple windows...

What is your opinion?
Post 10 Jul 2004, 16:39
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 10 Jul 2004, 16:49
Well.. (if I'm not wrong) there's also "push esi edi ebx" (and corresponding pop) missing (macro in variant #1 should include them too, so it would be wasteful).
I think that the best way would be to use variant #3 (eg winproc and formproc), but, OTOH, I don't like that so many code would be repeated... variant #2 would make whole thing more complicatd... so I dont know Question?Confused

[edit]
just btw, you should rather use "mov ebx,[ebp+12]" instead of "mov ebx,[wmsg]", just because some people like "wMsg", "uMsg" or so...
[/edit]
Post 10 Jul 2004, 16:49
View user's profile Send private message Visit poster's website Reply with quote
S.T.A.S.



Joined: 09 Jan 2004
Posts: 173
Location: Ru#27
S.T.A.S. 16 Jul 2004, 18:34
Hi, JohnFound

Please take a look at some lines from FASM's STDCALL.INC file
Code:
macro proc name,[arg]                       ; define procedure
......
    all@args fix arg
.......

macro rstargs [arg]
 { restore arg }

macro endp                              ; end procedure definition
......
   macro rstargs#first@args _% %_
   rstargs all@args
   purge rstargs#first@args
......    

They are missed in Fresh macro library now, though something like that was used before.
In some cases this can give unpredictable results, because names of PROC's arguments are accessible from outside PROC.
(They aren't local anymore.)
Once I had some bad experience with this situation - that's why IMHO it's good idea to return things back..
Or may be I missed something annd this is done in some different way Embarassed
Post 16 Jul 2004, 18:34
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 16 Jul 2004, 21:09
S.T.A.S. wrote:
They are missed in Fresh macro library now, though something like that was used before.
(They aren't local anymore.)
Or may be I missed something annd this is done in some different way Embarassed


There are changes in these macroses, because I wanted to make them more "clear". The arguments are not global in any way, but they are local in the meaning of procedure local variables - as local labels with parent the name of the procedure.
(actually both local vars and arguments are the same thing - offsets in the stack frame - why we should define them different ways?)

The arguments are defined following way:
Code:
proc MyProc, arg1, arg2, arg3    


but you have to use them as local labels with parent - the name of the procedure:
Code:
mov  eax, [.arg1]
mov  ebx, [.arg2]
add   ecx, [.arg3]
    


Actually the definition of these labels inside macroses is:
Code:
.#arg1 dd ?    


Maybe this macro library will go through another editions in the future.
I am thinking about some common macroses to be used in all FASM generated applications - DOS 16, Linux, arguments with free size - byte, word, dword - even structures - the same way this is possible with the local variables.

Regards.
Post 16 Jul 2004, 21:09
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
S.T.A.S.



Joined: 09 Jan 2004
Posts: 173
Location: Ru#27
S.T.A.S. 17 Jul 2004, 06:08
JohnFound wrote:
actually both local vars and arguments are the same thing - offsets in the stack frame - why we should define them different ways?
Yeah.. Good point.
Old (common) way is a bit confising IMHO, so you've eliminated that problem Smile

Of cource, I should see the line with dot Embarassed


Quote:
I am thinking about some common macroses to be used in all FASM generated applications - DOS 16, Linux, arguments with free size - byte, word, dword - even structures - the same way this is possible with the local variables.

Yes, indeed!
I guess you're thinking about something like this quick example (just to give an idea, may be it won't work)
Code:
struc  u32 {  dd ?  }

;; a bit of proc macro:
          .#arg
......

proc   MyProc, arg1 u32, arg2 u32, arg3 MyStruct    

Too bad for me, I like ESP-based stackframes very much, so there are some problems with local structures definitions in my case ;(
Post 17 Jul 2004, 06:08
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.