如何使用ARM汇编code在Android项目? [英] How to use ARM Assembly code in an Android project?

查看:221
本文介绍了如何使用ARM汇编code在Android项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是特别大会和ARM的经验,但我可以在这上面写几个程序,我想看看他们的ARM-搭载了Android设备(的Nexus S)上的运行方式。什么是包括大会code文件到Android项目的程序?我只能从本地code调用它,或者从Java也?

I'm not particularly experienced with Assembly and ARM, but I was able to write a few routines in it and I'd like to see how they run on an ARM-equipped Android device (Nexus S). What is the procedure for including an Assembly code file into an Android project? Can I only call it from native code, or from Java also?

推荐答案

您可以在Android使用Java本地接口和Android NDK调用组件。

You can call assembly from Android using the Java Native Interface and the Android NDK.

塞德里克提到使用 ASM 关键字,而我preFER包括汇编源$ C ​​$ C。我已经发布的教程在我的网站做到这一点:
<一href=\"http://www.eggwall.com/2011/09/android-arm-assembly-calling-assembly.html\">http://www.eggwall.com/2011/09/android-arm-assembly-calling-assembly.html

Cedric mentions using the asm keyword, while I prefer to include assembly source code. I have posted a tutorial to do this at my site: http://www.eggwall.com/2011/09/android-arm-assembly-calling-assembly.html

您可以下载源$ C ​​$ c代表我的例子,看看它是如何工作的。当你看到一个正常运作的例子,很容易把它修改您的需求。

You can download the source code for my example and see how it works. Once you see a functioning example, it is easy to modify it to your needs.

这篇关于如何使用ARM汇编code在Android项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆