Expose functions to read and write any register and memory to lua.