Skip to content

Link14349/myasmjit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myasmjit

A lightweight machine code dynamic executor written in C ++ based on x86 platform

Platform supportability

  • CPU
    • x86 platform
  • OS
    • OSX
    • Linux
    • Windows

Usage

#include <MAsmJit.h>// Import MAsmJit

int main(int argc, char *argv[]) {
// Create a asm executor
    MAsmJit::MAsmJit mAsmJit;
    // Write instructions
    mAsmJit.movq(MAsmJit::RAX, 0x0fedcba987654321);
    mAsmJit.movq(MAsmJit::RBX, 0x123456780abcdef0);
    mAsmJit.movq(MAsmJit::RCX, 0x123456780abcdef0);
    mAsmJit.movq(MAsmJit::RDX, 0x123456780abcdef0);
    // Run the machine code that has been written
    mAsmJit.run();
    // Delete the written machine code
    mAsmJit.clear();
    // Define a sequence of instructions in bytes
    mAsmJit.db({ 0x48, 0x89, 0xd8 });
    mAsmJit.run();
    return 0;
}

About

A lightweight machine code dynamic executor written in C ++ based on x86 platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors