what is wrong with my code?the complier said constant expected
at .if eax and _PushForAnalyse,eax
i do not get it

.if eax ;there is a language
mov eax,  (6*row + column)
invoke _PushForAnalyse,eax
invoke _Pop,offset stStack_N_Ter
mov Cmp_N_Terminator,eax
.continue

here is what the _pushforanalyse define
_PushForAnalyse	proc	_sum:dword

mov eax,_sum
.if eax == 0
invoke _Push,'A',offset stStack_N_Ter
invoke _Push,'T',offset stStack_N_Ter
.elseif eax == 3
invoke _Push,'A',offset stStack_N_Ter
invoke _Push,'T',offset stStack_N_Ter
.elseif eax == 7
invoke _Push,'A',offset stStack_N_Ter
invoke _Push,'T',offset stStack_N_Ter
invoke _Push,'+',offset stStack_N_Ter
.elseif eax == 10 || 11 || 22 || 23 || 19
.elseif eax == 12
invoke _Push,'B',offset stStack_N_Ter
invoke _Push,'F',offset stStack_N_Ter
.elseif eax == 15
invoke _Push,'B',offset stStack_N_Ter
invoke _Push,'F',offset stStack_N_Ter
.elseif eax == 20
invoke _Push,'B',offset stStack_N_Ter
invoke _Push,'F',offset stStack_N_Ter
invoke _Push,'*',offset stStack_N_Ter
.elseif eax == 24
invoke _Push,'i',offset stStack_N_Ter
.elseif eax == 27
invoke _Push,')',offset stStack_N_Ter
invoke _Push,'E',offset stStack_N_Ter
invoke _Push,'(',offset stStack_N_Ter
.endif
ret

_PushForAnalyse endp

This is pop define
_Pop		proc	_lpst:dword			;return eax(poped char) 

mov edi,_lpst
assume edi:ptr Stack
.if .dwtop > 0
dec .dwtop
mov ebx,.dwtop
mov eax,dword ptr
mov dword ptr ,0
.else
invoke MessageBox,hWinMain,offset szOutmem,NULL,MB_OK or MB_ICONWARNING
.endif
assume edi:nothing
ret
_Pop endp

the stack define
Stack struct				;define the stack

dwchar dd MAX dup (?)
dwtop dd ?

Stack ends
Posted on 2007-05-07 07:30:06 by ekin
mov eax,  (6*row + column)

are "row" and column here constants, defined with either EQU or "="

row EQU 320
column = 240
?
Only otherwise there would be this problem.
MASM can't do the arithmetic for you automatically
Your code should be:

mov eax,row
imul eax,6
add eax,column
Posted on 2007-05-07 07:41:45 by Ultrano
:DThanks Ultrano!I get it!
Posted on 2007-05-07 08:41:12 by ekin