flat assembler
Message board for the users of flat assembler.
Index
> Main > we can't PUSH a byte? |
Author |
|
Teehee 09 Jul 2010, 11:08
Code: push teste push byte[teste] ; Error: invalid size of operand push word[teste] push dword[teste] teste db 0 _________________ Sorry if bad english. |
|||
09 Jul 2010, 11:08 |
|
revolution 09 Jul 2010, 11:09
No. The CPU does not support.
|
|||
09 Jul 2010, 11:09 |
|
Teehee 09 Jul 2010, 11:10
oh.. o.o
|
|||
09 Jul 2010, 11:10 |
|
shoorick 09 Jul 2010, 11:41
looks more as it stores it as dword try it under debugger step-by-step
|
|||
09 Jul 2010, 11:41 |
|
edemko 09 Jul 2010, 11:42
push dword 10: $68'0000000a
|
|||
09 Jul 2010, 11:42 |
|
edemko 09 Jul 2010, 11:45
ie. fasm tries to optimize it to make code a less as possible until you specify explicit
|
|||
09 Jul 2010, 11:45 |
|
revolution 09 Jul 2010, 12:28
Teehee wrote:
Values up to 0x7f for positive, and down to 0x80 for negative. |0x6a,0x80| will push 0xffffff80 to the stack. It is just a short form to save bytes in the code stream. |
|||
09 Jul 2010, 12:28 |
|
Teehee 09 Jul 2010, 12:35
nice.. thank you.
|
|||
09 Jul 2010, 12:35 |
|
baldr 11 Jul 2010, 02:15
Teehee,
If you, for any reason, need to push exactly a byte, lea esp, [esp-1] / mov byte[esp], something may be useful. |
|||
11 Jul 2010, 02:15 |
|
sinsi 11 Jul 2010, 02:21
Don't push a word onto the stack in windows if you are going to call an API, the stack is supposed to be dword aligned
|
|||
11 Jul 2010, 02:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.