Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How and where can I write ARM Assembly codes in Embarcadero Delphi XE5 with Android?

How and where can I write ARM Assembly codes in Embarcadero Delphi XE5 with Android? That would be the best, if I can write it inline.

like image 982
Szilvia Lázár Avatar asked Dec 19 '22 21:12

Szilvia Lázár


1 Answers

Delphi mobile compiler do not support the asm ... end blocks.

But the "old good way" is still available, since we are talking about a Native compiler.

What you can do is compile your own module with an external assembler (e.g. GNU AS), then link it to your Delphi XE* application.

For instance, System.RTTI uses low-level asm tricks via external statically linked files:

procedure RawInvoke(CodeAddress: Pointer; ParamBlock: PParamBlock);
  external 'librtlhelper.a' name 'rtti_raw_invoke';

procedure RawIntercept;
  external 'librtlhelper.a' name 'rtti_raw_intercept';

Take a look at this Japanese article - Google translate is your friend!

like image 114
Arnaud Bouchez Avatar answered Dec 24 '22 00:12

Arnaud Bouchez