Hi Mark,
Hey, thanks for making me feel like a youngster! I'm not (quite) 65 yet!
As I read Nasm64developer's macro, UNTIL takes only one parameter - the condition-code to be pasted after "j". I'm looking at "j%+1" - I'm thinking that should be "j%1" or perhaps "j%+%1"... seems to work, as is. Anyway, there's no "cmp" being done that I can see. I think your code is going to have to look like:
%include "/home/fbk/control_flow.asm"
global _start
section .text
_start:
xor ecx, ecx
REPEAT
inc ecx
cmp ecx, 1000000000 ; delay long enough to detect :)
UNTIL a
mov eax, 1
int 80h
Well... you won't need the Linux cruft, of course... just wanted to post something "known working"...
I think that to handle "UNTIL ecx, >, 10", you're going to need macro code to do something like "%ifidni %2, '>'", generate the code, "%elifidni %2, '<'", generate the code, etc... "%endif". "%1" and "%3" will have to be valid operands to "cmp", or the "user" of the macro will get a "cryptic error". To handle "UNTIL ecx, &, 80h", you'll have to generate "test" instead of "cmp"... ad nauseum...
Something to think about... "ja" would be correct for an unsigned comparison, but "jg" if your operands are to be taken as signed. How will you distinguish between an unsigned '>' and a signed '>'? I understand Masm has a way to do this, but I don't know how. "s>" vs "u>"? If you're just going to accept 'a' and such condition codes, it's up to the programmer to chose the right one (as it should be, in asm!).
Funny how those hurricanes make us all confused. The effect could last for *months*, too! :)
Best,
Frank