flat assembler
Message board for the users of flat assembler.

Index > Main > Looking forward fasm 1.67.27 released

Author
Thread Post new topic Reply to topic
lovefasm



Joined: 17 Jun 2007
Posts: 22
lovefasm 05 Mar 2008, 10:48
1,Looking forward fasm 1.67.27 released!

2,If fasm provide add other directives like the interface, such as SSE5

3,
Code:
struct point a,b
{
    x  dd a
    y  dd b
}
proc distance, a:point, b:point
....code
endp
stdcall distance,[a],[b]
A point 1,2
B point 3,4

    
Post 05 Mar 2008, 10:48
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 05 Mar 2008, 14:44
lovefasm wrote:
1,Looking forward fasm 1.67.27 released!

2,If fasm provide add other directives like the interface, such as SSE5

3,
Code:
struct point a,b
{
    x  dd a
    y  dd b
}
proc distance, a:point, b:point
....code
endp
stdcall distance,[a],[b]
A point 1,2
B point 3,4

    
1. Good
2. There is not even any silicon with SSE4.2 and already you want SSE5?
3. How does that work? What are you intending to do? See comments in the code below.
Code:
struc point a,b
{
    x  dd a
    y  dd b
}

A point <1,2>
B point <3,4>

stdcall distance,[A],[B]     ;??? what does this do ???

proc distance, a:point, b:point

       ;do you access like this???
 mov     eax,[a.x]
   mov     ecx,[a.y]
...

        ;or do you access like this???
      mov     ecx,[a]
     mov     eax,[ecx+point.x]
   mov     ecx,[ecx+point.y]
...

endp    
Post 05 Mar 2008, 14:44
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 05 Mar 2008, 21:55
with
Code:
stdcall distance,[A],[B]
    

He is obviously passing the values of two structures (here, two dwords) into a process, and:
Code:
A point 1,2 
B point 3,4 
    

is apparently creating the two structures. resembles some c-style with the parameters, am I right?
Post 05 Mar 2008, 21:55
View user's profile Send private message Visit poster's website Reply with quote
lovefasm



Joined: 17 Jun 2007
Posts: 22
lovefasm 06 Mar 2008, 04:01
to Alexp:

This is the meaning
Post 06 Mar 2008, 04:01
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 06 Mar 2008, 04:08
It is still not clear.

Does "stdcall distance,[A],[B]" push four values to the stack or two values?
Post 06 Mar 2008, 04:08
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 06 Mar 2008, 04:22
Quote:
Does "stdcall distance,[A],[B]" push four values to the stack or two values?

lol I'm not quite sure, I do believe he means to combine the two variables of each structure into the entities of [A] and [B]

[EDIT] I believe I saw this same thing (same struct too) when you use the API of SetConsoleCursorPosition. You can either push both values representing the points (hopefully in right order), or you can create an easy-to-use structure much like the one above, and pass [A] to the API.
Post 06 Mar 2008, 04:22
View user's profile Send private message Visit poster's website Reply with quote
Patrick_



Joined: 11 Mar 2006
Posts: 53
Location: 127.0.0.1
Patrick_ 06 Mar 2008, 20:13
It looks like he's trying to initialize the structure's data with values, much like in C:

Code:
struct point {
   int a;
   int b;
} point[] = {
   { 0, 1 },
   { 2, 3 }
};    


This creates a structure array of 2 elements. point[0] has a as 0; point[1] has a as 2.
Post 06 Mar 2008, 20:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 07 Mar 2008, 02:43
It's not the structure initialisation that is the problem, that part is easy to understand. It is the call that has not been defined.
Post 07 Mar 2008, 02:43
View user's profile Send private message Visit poster's website Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 07 Mar 2008, 03:37
A point 1,2 == A dd 1,2
so [A] = 1

you'd have to use
stdcall foo, A, B

then inside the proc
mov ecx,[A.y] == mov ecx,[A+4]
Post 07 Mar 2008, 03:37
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 07 Mar 2008, 03:59
r22 wrote:
A point 1,2 == A dd 1,2
so [A] = 1

you'd have to use
stdcall foo, A, B

then inside the proc
mov ecx,[A.y] == mov ecx,[A+4]
That is what currently happens. But the OP wrote "stdcall distance,[A],[B]", with the square brackets, which is where the confusion has come from.
Post 07 Mar 2008, 03:59
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 08 Mar 2008, 01:18
> Looking forward fasm 1.67.27 released

My wishlist:

1. -Q switch
2. Add the listing feature and the -L switch
3. /* blah */
4. Write more about the "match" directive

So following 5 commandline options should be final : MPDQL Shocked
Post 08 Mar 2008, 01:18
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 08 Mar 2008, 01:28
1. What is Q for? Example please.
3. Why do you want the ugly c sytle comments? Where is this needed?
Post 08 Mar 2008, 01:28
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 16 Mar 2008, 00:52
.

> 1. What is Q for? Example please.

Shut-Up = Quiet + "mirroring"

> 3. Why do you want the ugly c sytle comments? Where is this needed?

They are NOT ugly ... and needed:

This won't compile:

Code:
00000377  81F800040000      cmp eax,0x400
0000037D  0F8505000000      jnz near 0x388
00000383  E895FFFFFF        call 0x31d
00000388  C9                leave
00000389  C3                ret
0000038A  55                push ebp
0000038B  89E5              mov ebp,esp
0000038D  81EC00000000      sub esp,0x0
00000393  90                nop
00000394  8B4508            mov eax,[ebp+0x8]
00000397  85C0              test eax,eax
00000399  0F8517000000      jnz near 0x3b6
0000039F  8B0530304000      mov eax,[0x3030]
000003A5  81F800000200      cmp eax,0x20000
000003AB  0F8D05000000      jnl near 0x3b6
000003B1  E972000000        jmp 0x428
000003B6  8B0530304000      mov eax,[0x3030]
    


But this could:

Code:
/* 00000377  81F800040000 */     cmp eax,0x400
/* 0000037D  0F8505000000 */     jnz near 0x388
/* 00000383  E895FFFFFF */       call 0x31d
/* 00000388  C9 */               leave
/* 00000389  C3 */               ret
/* 0000038A  55  */              push ebp
/* 0000038B  89E5 */             mov ebp,esp
/* 0000038D  81EC00000000 */     sub esp,0x0  ; Very efficient compiler Very Happy
/* 00000393  90 */               nop
/* 00000394  8B4508 */           mov eax,[ebp+0x8]
/* 00000397  85C0 */             test eax,eax
/* 00000399  0F8517000000 */     jnz near 0x3b6
/* 0000039F  8B0530304000 */     mov eax,[0x3030]
/* 000003A5  81F800000200 */     cmp eax,0x20000
/* 000003AB  0F8D05000000 */     jnl near 0x3b6
/* 000003B1  E972000000 */       jmp 0x428
/* 000003B6  8B0530304000 */     mov eax,[0x3030]
    
Post 16 Mar 2008, 00:52
View user's profile Send private message Reply with quote
Grom PE



Joined: 13 Mar 2008
Posts: 114
Location: i@grompe.org.ru
Grom PE 16 Mar 2008, 09:12
Why do you need "-q" switch? You could use
fasm.exe smth.asm >nul
to hide compiling info, and
fasm.exe smth.asm >nul 2>&1
to hide everything, including errors.
Post 16 Mar 2008, 09:12
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 17 Mar 2008, 18:02
Grom PE, someone (e.g. Japheth) claimed that running FASM a ton (!) of times in a row is slower than it would be if -Q was used (even >NUL was too slow).
Post 17 Mar 2008, 18:02
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.