项目作者: xfoxfu

项目描述 :
Lua Bytecode Assembler
高级语言: Rust
项目地址: git://github.com/xfoxfu/luaasm.git
创建时间: 2018-12-09T14:53:14Z
项目社区:https://github.com/xfoxfu/luaasm

开源协议:

下载


luaasm

Assembler for Lua Bytecode

Example

  1. .fn(R0)
  2. .instruction
  3. GETTABUP R1 U0 K1
  4. GETTABLE R1 R1 K2
  5. GETTABLE R2 R0 K3
  6. CALL R1 2 2
  7. SETTABLE R0 K0 R1
  8. RETURN R0 1
  9. .const
  10. K0 = "accuracy_flash"
  11. K1 = "Accuracy"
  12. K2 = "create"
  13. K3 = "task_form"
  14. .upvalue
  15. U0 = L1 R23
  16. .endfn
  • function with variable arguments should be declared like .fn(R0, __va_args__)
  • nested function should be placed between end of .upvalue and .endfn
  • you may produce luaasm samples with PyLuaDec python3 dis.py <LUA_BYTECODE_FILE> luaasm