This code assembles fine but there is no macro name, just the endm?
I also cannot see what is being repeated 8 times here either.
.startup
invoke sleep, 50
REPEAT 8
ctr_begin 100
ctr_end
print dword$(eax)," cycles, empty",13,10
ctr_begin 100
invoke CtBits, 123
ctr_end
print dword$(eax)," cycles, CtBits",13,10
ctr_begin 100
mov dx, 123
call CBits
ctr_end
print dword$(eax)," cycles, CBits",13,10
ENDM
the macro loops are also finalized by ENDM:
REPEAT count
...
ENDM
WHILE cond
...
ENDM
FOR arg,<args>
...
ENDM
in other words, the ENDM directive is paired with the REPEAT directive in this case
Quote from: dedndave on May 29, 2010, 07:47:52 PM
in other words, the ENDM directive is paired with the REPEAT directive in this case
Thanks. I thought endm was only used with macros.
Quote from: Magnum on May 29, 2010, 09:06:02 PM
...
Thanks. I thought endm was only used with macros.
REPEAT, WHILE and FOR directives are in fact MACROS that do not need a name and have predefined arguments... and because of this they are paired / ended with ENDM like any other macro does.