Lazarus
Programming => Widgetset => WinCE => Topic started by: dorry on February 28, 2015, 12:24:32 pm
-
anyone can help me test?compile wince program but the funvtion failure? does not wince support Embedded assembler?
function add(x, y: Integer): Integer;
thanks!
var count: Integer;
begin
asm
MOV EAX, x
MOV ECX, y
ADD EAX, ECX
MOV count, EAX
end;
Result := count;
end;
-
What target processor do you use? If you compile for arm-wince you should use
ARM assembler instruction (in at&t syntax).
-
@A.S. ,yes ,it is ARM CPU, can you write above function example code?
thanks!
-
@A.S. ,yes ,it is ARM CPU, can you write above function example code?
No, that is intel assember, ARM works differently, and worse, is fragmented over multiple generations.
Best to work through a book or tutorial first. (google arm assembly tutorial or so).
Then you can start looking at the assembler FPC generates (using -al) and then try to optimize it