Hi ! :)
With .while .endw condition is tested at the beginning with buckle.
With .repeat .until condition is tested at the end of buckle.

With .do .loop .exitdo condition is tested in the place which you want in the buckle.


macro .do
{
local ..do
__DO equ ..do
local ..loop
__LOOP equ ..loop
__DO:
}

macro .loop
{
jmp __DO
__LOOP:
restore __LOOP
restore __DO
}

macro .exitdo v1,c,v2
{
cmp v1,v2
j#c __LOOP
}

Example


.do
invoke GetMessage,msg,NULL,0,0;
.exitdo eax,e,NULL

invoke TranslateMessage,msg
invoke DispatchMessage,msg
.loop

invoke ExitProcess,[msg.wParam]

Friendly....Gges
Posted on 2003-01-16 07:50:35 by Asmgges