jj2007
sorry it was supposed to be with comma not with column
like this: .for (eax=5,ecx=0:SDWORD PTR eax GE 0:eax--)
assembles fine now but doesn't do anything ::)
But I got it working in the end:
include \masm32\MasmBasic\
MasmBasic.inc ;
downloadinclude FOR_M.inc
; slightly modified Init PrintLine "MasmBasic For...Next loop:"
mov eax, 5
For_ ecx=0 To eax-1
Print Str$("ecx=%i ", ecx)
Next PrintLine CrLf$, CrLf$, "Now Habran's macro: "
; mov eax, 4
.for (ecx=0 :SDWORD PTR ecx GE 4 : ecx++)
Print Str$("ecx=%i ", ecx)
.endfor
Inkey CrLf$, "ok"
Exitend start
Output:MasmBasic For...Next loop:
ecx=0 ecx=1 ecx=2 ecx=3 ecx=4
Now Habran's macro:
ecx=0 ecx=1 ecx=2 ecx=3 ecx=4Two minor issues: mov eax, 4
.for (ecx=0 : SDWORD PTR ecx GE
eax : ecx++)
; reg32 instead of immediate: endless loop, eax gets trashed somewhere .for (ecx=0
: SDWORD PTR ecx GE 4 : ecx++)
; blank before SDWORD: assembly hangsand I am not from Mars, I am your neighbor fro former Yugoslavia
but I am already 20 years in South Australia
cosmically speaking, Mars is a close neighbour, too

by the way, if I remember well, even a century back that 24-hour activity was already digital ;)