lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi All,
First time poster.  I've been reading the threads a lot while developing
in Lua, and a common thread is a need for integrated bitwise operators.  I
recently found myself needing them, too, while writing a Lua-based
disassembler for PowerPC code (soon to be announced).  Instead of using a
library or some of the other choices, I decided to write them in Lua. 
Perhaps this is redundant, but with the recent thread on forking bringing
this up again, I thought I'd post the code.

http://www.dialectronics.com/Lua

has the link to the code plus documentation (in addition to the basic
documentation within the code).  The code is MIT licensed.  The code has
been tested pretty thoroughly on PowerPC (MacOS 9 and OS X), but I suspect
there may be unexpected results on little-endian CPUs, and most likely the
code could be tweaked some.  One advantage to doing it in Lua is that if
the function calls are too long, they can be changed.  I agree that
perhaps there should be some inherent Lua operators, but a nice compromise
would be Lua code via those operators.

Feedback always welcome :-)

tim


Gregory T. (tim) Kelly
Owner
Dialectronics.com


"Anything war can do, peace can do better."  -- Bishop Desmond Tutu