News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

while problem

Started by korte, September 07, 2007, 04:32:11 PM

Previous topic - Next topic

korte

FUNC macro parameters:VARARG
call parameters
exitm <eax>
endm


.while FUNC(read_char)!=0
.
.
.
.endw


read_char proc
.
.
.
mov eax,xxx
ret
read_char endp


The Problem:
read  char called only one time

generated code
1:    call read_char
2:     jmp 5
3:
4:
5:   cmp eax,-1
6:   jnz 5

endw or while not calling read_char



MichaelW

I can't make it work either, but this will, and it's easier to code:

.REPEAT
  invoke read_char
.UNTIL eax == 0
eschew obfuscation

korte