flat assembler
Message board for the users of flat assembler.
Index
> Main > Looking forward fasm 1.67.27 released |
Author |
|
revolution 05 Mar 2008, 14:44
lovefasm wrote: 1,Looking forward fasm 1.67.27 released! 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 |
|||
05 Mar 2008, 14:44 |
|
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? |
|||
05 Mar 2008, 21:55 |
|
lovefasm 06 Mar 2008, 04:01
to Alexp:
This is the meaning |
|||
06 Mar 2008, 04:01 |
|
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? |
|||
06 Mar 2008, 04:08 |
|
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. |
|||
06 Mar 2008, 04:22 |
|
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. |
|||
06 Mar 2008, 20:13 |
|
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.
|
|||
07 Mar 2008, 02:43 |
|
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] |
|||
07 Mar 2008, 03:37 |
|
revolution 07 Mar 2008, 03:59
r22 wrote: A point 1,2 == A dd 1,2 |
|||
07 Mar 2008, 03:59 |
|
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 |
|||
08 Mar 2008, 01:18 |
|
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? |
|||
08 Mar 2008, 01:28 |
|
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 /* 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] |
|||
16 Mar 2008, 00:52 |
|
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. |
|||
16 Mar 2008, 09:12 |
|
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).
|
|||
17 Mar 2008, 18:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.