flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 24 Feb 2010, 07:10
1) No. You can't overload : operator
2) Yes. Just change the macro to create the symbolic aliases with [] surrounding. |
|||
![]() |
|
baldr 27 Feb 2010, 20:14
revolution wrote: 2) Yes. Just change the macro to create the symbolic aliases with [] surrounding. |
|||
![]() |
|
alorent 25 May 2010, 13:26
Hello,
I have come back to this topic. revolution, could you let me know how I can modify the macro to be able to access to the local variable content withouth the brackets? Or maybe to define something like "local2" which allow those variables to be access without brackets. Example: Code: Myproc proc local i1:DWORD, i2:DWORD local2 j1:DWORD, j2:DWORD ... baldr, you say that there are problems with invoke. What if I don't use invoke? What about global variables that are defined as: Code: MyVar dd 0 Is it possible to create a macro or something to access to that global variable withouth the brackets?. Example: Code: mov eax, MyVar ; it would do "mov eax, [MyVar]" Thanks! |
|||
![]() |
|
revolution 25 May 2010, 13:53
alorent: Doing what you suggest above creates many problems, not just with invoke.
If we do this: Code: AVar equ [ebp+8] ;first parameter Code: mov eax,AVar But what happens for arrays (or any indexing or offsets)? Code: mov eax,AVar+ecx*4 Code: mov eax,[ebp+8]+ecx*4 ;error |
|||
![]() |
|
Tomasz Grysztar 25 May 2010, 15:01
revolution wrote: alorent: Doing what you suggest above creates many problems, not just with invoke. Code: AVar equ ptr ebp+8 Then Code: mov eax,AVar+ecx*4 Code: mov eax,ptr ebp+8+ecx*4 |
|||
![]() |
|
revolution 25 May 2010, 15:08
Oh, ptr is new to me. I've not seen that in fasm before.
|
|||
![]() |
|
Tomasz Grysztar 25 May 2010, 15:13
It was introduced in version 1.36 (released in May 2002). Documented in section 1.2.1 since the release of the new documentation with 1.41.
![]() |
|||
![]() |
|
revolution 25 May 2010, 18:43
Tomasz Grysztar wrote: It was introduced in version 1.36 (released in May 2002). Documented in section 1.2.1 since the release of the new documentation with 1.41. ![]() |
|||
![]() |
|
ouadji 25 May 2010, 19:08
I didn't know that either !
![]() but I prefer "[x]", it's more explicit than "ptr x" ! |
|||
![]() |
|
alorent 26 May 2010, 15:53
Thanks again guys!
Well, I better stay with the FASM basics and use the brackets even if MASM has been on my bones for such a long time ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.