I want to write a small assembly code and call it from Perl :
I look at cpan and find those 2 Perl modules
any idea how to use FFI::Platypus::Lang::ASM with Perl , an example will be appreciated
any idea how to use FFI::Platypus::Lang::ASM with Perl , an example will be appreciated
The author of that module hasn't provided any examples for that code themselves. It looks like it may be an unfinished project.
Anyways, this is a pretty odd thing to want to do. Perl operates a couple levels of abstraction away from assembly -- interoperation between them is awkward at best.
A more practical solution will be to write C code which calls into your assembly code (or embeds it as inline assembly), then adapt that code to Perl using XS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With