Imagine MemoryEx

MemoryEx is a plugin released by Imagine Programming, allowing more advanced operations from within the Lua
environment you will find in Autoplay Media Studio 8. This plugin has been growing since the first release date,
and now comes with many more features enabling even more advanced programming.

For example, MemoryEx now comes with a built-in flat assembler, allowing you to assemble and execute assembly code
dynamically. This means that writing your own, machine-code, procedures is now possible from within AMS.
As an example, you could write a vey fast CRC32 procedure in assembly and calculate checksums of MemoryEx allocated buffers.

MemoryEx makes several things possible, such as:

Memory allocation, both private and shared buffers.

Memory manipulation by function calls.

Memory manipulation by interpreting as array.

Memory manipulation by using structures, defined by you.

Dynamically loading DLL's and calling them as Lua function, without having to worry about calling convention.

Real-time assembling of assembly code, using the Flat Assembler.

Bitwise operations on integer numbers using the Bitwise functions.

Window Subclassing using your own Lua function!

These features have inspired another feature, the LuaHeader files. These files are pre-compiled Lua and Assembly chunks you
can load in by using MemoryEx.LoadLH. These compiled files have a custom format, and a custom compiler you can download from
this website as well. These, quite strict, LH files are merely for definition and assembling purposes. You can define anything
in these files, however execution of the code should be done from within AMS.

Imagine MemoryEx LH Compiler

A new addition to the MemoryEx package. This compiler allows the programmer to develop definition files that can
be loaded using MemoryEx.LoadLH. These compiled files can contain anything like structure definitions, constants,
global functions and other values, private functions and assembled machine code.

Not only does this allow for re-usable easily implemented code, but it also produces very small output in comparison
to regular Lua scripts or pre-compiled Lua chunks. For example, a 139 KiB LH source code file was compiled to a 30 KiB
product.