3

I'm attempting to write a Lua 5.3 VM in another language (this is for experimentations only).

The resources I've found for the moment are :

As Lua breaks compatibility between each version, it's really difficult to find out how 5.3 bytecode works.

Do you have another source to share please ?

dawi
  • 628
  • 6
  • 18
  • Possible duplicate of http://stackoverflow.com/questions/1480678/luas-bytecode-specification. – lhf Dec 23 '16 at 18:33
  • 1
    At least [8 SO users](https://stackoverflow.com/documentation/lua/topic-requests/4551) are wanting Lua bytecode reference manual – Egor Skriptunoff Dec 23 '16 at 18:42

2 Answers2

3

The official definition of the instructions of the Lua VM is in lopcodes.h, starting at OP_MOVE.

lhf
  • 70,581
  • 9
  • 108
  • 149
  • 1
    See also [Lua 5.3 bytecode reference updated](http://lua-users.org/lists/lua-l/2016-12/msg00062.html). – lhf Dec 23 '16 at 18:38
0

There's also the Lua 5.3 Bytecode Reference provided by the documentation for the Ravi language
(a language that uses a modified Lua 5.3 VM).

That can be found here

Pharap
  • 3,826
  • 5
  • 37
  • 51