sorry i examined this a little further and found the problem. in address calculations you can only multiply the size by 2, 4 or 8.
So "(sizeof.COORD *(esi))" only works when "sizeof.COORD" evaluates to 2, 4 or 8. otherwise i would recommend doing this multiply outside this address calculation.
sorry bout my earlier post but didn't really have time to fully examine this issue.
Edit: I thought i would elaborate this a little more so that you could fully understand. for address calculations on intell based processors. the syntax is.
const + reg + reg * const(must be power of 2 no higher than 8)
of course not all instructions support this elongated form some limit you to some combination there of such as
const + reg
or
const + reg * const(must be power of 2 no higher than 8)
to give an example your
mov [pt + (sizeof.COORD*(edi)) + COORD.X],eax
evaluates to
mov [const + (const*(reg)) + const], reg
if you combine all constants you get
mov [const + const*reg], reg
btw, this is a restriction intell placed into the language to help processors it's not meant to help humans. so it's not a flaw with the language.
Just remember these restrictions when calculating address or debugging addressing problems. hope all of this helps.