Forum > General
assembler
(1/1)
airpas:
why you get (Error: Unknown identifier "X") with this code ?
--- Code: ---{$asmmode intel}
type
t_point = record
x,y : integer;
end;
procedure test(SrcPoint: t_point);
asm
mov ecx , [SrcPoint.x] //error
end;
--- End code ---
marcov:
Afaik you need to pass the type name too, so srcpoint.t_point.x. But I don't use Intel style that much.
Leledumbo:
--- Quote from: marcov on January 19, 2015, 12:07:31 pm ---Afaik you need to pass the type name too, so srcpoint.t_point.x. But I don't use Intel style that much.
--- End quote ---
This also works:
--- Code: ---mov ecx, [SrcPoint + offset t_point.x]
--- End code ---
airpas:
thanks
what about this
--- Code: --- t_int = record
_high,_low : smallint;
end;
t_point = record
x,y : t_int;
end;
procedure test(SrcPoint: t_point);
asm
mov ax , [SrcPoint.t_point.x.t_int._high] //Error: Error building record offset
end;
--- End code ---
airpas:
ok seems working
mov ax , [SrcPoint + offset t_point.x._high]
thanks Leledumbo
Navigation
[0] Message Index