ARM汇编code在Android项目 [英] ARM Assembly code in an Android project

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

问题描述

我不是特别有经验与大会和胳膊,但我能在它写几个程序,我想看看他们的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 ​​$下我的例子,看看它是如何工作的。当你看到一个正常运作的例子,很容易将其修改您的需求。

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天全站免登陆