yohanes / online-assembler

Browser assembler based on Keystone using WASM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Online assembler and disassembler

Requires web browser with WASM support. Tested on latest Firefox, Google Chrome, and Safari (both Desktop and Mobile).

Demos are split because on some version of Google Chrome on Windows, the version with both the assembler and disassembler causes the browser to hang.

Build instruction

  • Install and configure Emscripten SDK (EMSDK)
  • Download latest Keystone
  • Download latest Capstone
  • Compile and install Keystone using EMSDK
  • Compile and install Capstone using EMSDK
  • type make to build
  • To run locally, type emrun .

To compile keystone/capstone (I am using /usr/local/wasm for the prefix, you can use any path, adjust Makefile if you use another path):

 mkdir build
 cd build
 emcmake cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/wasm ..
 make && make install

Optional: to optimize the size, use binaryen

wasm-opt -Oz casm.wasm  -o casm2.wasm
mv casm2.wasm casm.wasm
wasm-opt -Oz cdisasm.wasm  -o cdisasm2.wasm
mv cdisasm.2wasm cdisasm.wasm

License

Version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.).

About

Browser assembler based on Keystone using WASM

License:GNU General Public License v2.0


Languages

Language:HTML 44.3%Language:JavaScript 31.8%Language:C++ 22.5%Language:Makefile 1.4%