Lazarus

Programming => Widgetset => WinCE => Topic started by: dorry on February 28, 2015, 12:24:32 pm

Title: Does not wince support Embedded assembler?compile wince program but the funvtion
Post 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;
Title: Re: Does not wince support Embedded assembler?compile wince program but the funvtion
Post by: A.S. on February 28, 2015, 12:42:30 pm
What target processor do you use? If you compile for arm-wince you should use
ARM assembler instruction (in at&t syntax).
Title: Re: Does not wince support Embedded assembler?compile wince program but the funvtion
Post by: dorry on February 28, 2015, 02:55:40 pm
@A.S. ,yes ,it is ARM CPU, can you write above function example code?
thanks!
Title: Re: Does not wince support Embedded assembler?compile wince program but the funvtion
Post by: marcov on February 28, 2015, 04:21:35 pm
@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
TinyPortal © 2005-2018