flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 27 Jan 2010, 11:14
Code: lea eax,[buffer1] push eax |
|||
![]() |
|
pete 27 Jan 2010, 11:51
Thanks revolution but why?
I thought "buffer1" is always replaced with "ebp+0x10", "buffer2" with "ebp+0x10+4" and so on. Why can't "buffer1" be pushed? |
|||
![]() |
|
revolution 27 Jan 2010, 11:57
You can't do this:
Code: push ebp+0x10 |
|||
![]() |
|
pete 27 Jan 2010, 12:03
I can compile "push ebp+0x10" with fasm 1.68 but it produces "push 0x10" without any error or warning.
|
|||
![]() |
|
pete 27 Jan 2010, 12:08
Well, thanks for your help revolution!
|
|||
![]() |
|
revolution 27 Jan 2010, 12:08
Actually it compiles to 'push ebp' and 'push 0x10'. Which is clearly not what you want from the above code.
|
|||
![]() |
|
pete 27 Jan 2010, 12:09
Ah, yep!
|
|||
![]() |
|
Borsuc 27 Jan 2010, 17:12
I always hated that 'feature' to push multiple symbols on one line, it causes confusion sometimes.
![]() |
|||
![]() |
|
MazeGen 27 Jan 2010, 22:28
(vid here) That's weird. If buffer1 was preprocessor symbol that equates to ebp+0x10 (three tokens), then okay. But why does this work that way with label, which should be a single token???
|
|||
![]() |
|
LocoDelAssembly 28 Jan 2010, 00:19
vid, the "push ebp+0x10" was tried literally, "push buffer1" in the first posted code completely fails compilation with "Error: invalid value".
|
|||
![]() |
|
revolution 28 Jan 2010, 02:05
Think of it like "push (ebp+0x10)" And perhaps you see the reason better.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.