flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Compiler Internals > push eax+5 | 
| Author | 
 | 
| Mr_Silent 04 Feb 2007, 14:12 ...compiles into
 Code: 
push eax
push 5
    Is this normal? (I couldn't find this behavour in manual) | |||
|  04 Feb 2007, 14:12 | 
 | 
| vid 04 Feb 2007, 16:51 Mr_Silent: this is because of "hack" to syntax, to allow commands like this:     Code: push eax ebx ecx Drawback is that "push eax+5" is then same as "push eax +5", and "+" is both unary and binary operator. | |||
|  04 Feb 2007, 16:51 | 
 | 
| IceStudent 17 Feb 2007, 09:43 Dangerous feature..
 Code: push edx+5 ; push edx, push 5 push dword[edx+5] ; push [edx+5] push buf+5 ; push buf+5 1st push - an exception from the common syntax and we must remember it (hello, C language). But in the macro it can be hidden from eyes and became a potentially error. | |||
|  17 Feb 2007, 09:43 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.