Skip to content

💾 Calling Assembly from Java: simple example using the JNI and NASM.

License

Notifications You must be signed in to change notification settings

PyvesB/javassembly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavAssembly

A simple example showing how assembly language can be called from Java using the Java Native Interface (JNI). The native function sums the elements of an array of integers and returns the result as a long.

Getting started

✔️ Requirements

To compile and run this project, you will need:

  • the JDK
  • an assembler such as NASM or Yasm
  • a compiler such as GCC, Clang or MinGW-w64

The example and build scripts can easily be modified to accommodate other assembler or compiler requirements.

💿 Running the code

Simply use the following commands:

git clone https://github.com/PyvesB/javassembly.git
cd JavAssembly
#Linux or macOS
./build nasm
#Windows
build nasm
java JNIArraySum

🌎 Useful links

The following pages may be of interest:

Contributing

$ code

Want to make JavAssembly better, faster, stronger? Contributions are more than welcome, open a pull request and share your code! Simply fork the repository by clicking on the icon on the top right of this page and you're ready to go!

💬 Support

Thought of a cool idea? Found a problem or need some help? Simply open an issue!

⭐ Thanks

Find the project useful, fun or interesting? Star the repository by clicking on the icon on the top right of this page!

License

MIT License

About

💾 Calling Assembly from Java: simple example using the JNI and NASM.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published