i'm a newbie in asm programming. i have read many tutorials, books, and help files over the internet. now i can understand the concept of ASM. but here i have a question (it may sound stupid, but please answer it to me !).

in *\fasm\examples\beer.asm (line 14, 15 and 16) :

stdcall [MessageBox],0,_message,_caption,MB_ICONQUESTION+MB_YESNO
cmp eax,IDYES
jne exit

my question is, why this code compare the eax with IDYES (cmp eax,IDYES) ?

what is the content of the eax in that time ?

your help would be greatly appreciated :alright:
Posted on 2002-07-29 09:08:46 by shazanhar
Afternoon, shazanhar.

eax has the return value from the messagebox.

Because this messagebox is displayed using MB_YESNO, then the possible return value would be either IDYES or IDNO.

Posted on 2002-07-29 09:25:28 by Scronty