ChunkBake: A Lua 5 Assembler


ChunkBake is a line-oriented assembler for Lua 5 virtual machine instructions. It produces a binary chunk from assembly code, which can then be loaded and run on a Lua 5 virtual machine. ChunkBake is an educational tool; you'd probably won't be writing substantial Lua applications in assembly language form (but if you are, please pass me some of the stuff you're smoking... :-)) The syntax of ChunkBake bears a resemblance to luas assembly code, with differences. The front end was written to accomodate a variety of coding styles, e.g. registers can be written as 0, R0 or $0.

ChunkBake is written in Lua so that it is portable and easy to hack. Binary chunks that are generated can be customized with different data and field sizes and number types, so if you want to produce non-standard chunks from assembly code, this is the tool for you. You can break a lot of rules as well, and do things the Lua 5 code generator won't do. If you want a smaller assembler, a lot of code can be ripped out.

ChunkBake currently works only for Lua 5.0.2 instructions. Processing speed is brisk so there shouldn't be speed issues. For pre-1.0 releases, the syntax is open for fixes or changes. If there are better ways to write some of the assembly syntax, or if there is a defacto standard for such things, the assembler syntax MAY CHANGE for pre-1.0 releases.


Main links: ChunkBake project page on LuaForge | File releases

Latest version: ChunkBake-0.7.0 (90KB zip). Win32 binary (127KB zip) available as well.

What's new?

More Stuff


Thanks to the LuaForge team for hosting this material. This page was written on SeaMonkey. ChunkBake was developed using the SciTE editor.

This page Copyright © 2005-2006 KHMan. See the scripts for license information (MIT-style). Last Revised: 2006-11-04.
Canonical URL: