FacebookTwitter

Imagine MemoryEx LH Compiler Overview

Only €20!

The Imagine MemoryEx LH Compiler is an editor and compiler producing Lua Header files compatible with the MemoryEx Action Plugin, version 2 or higher. IMXLH takes strict Lua and one or more chunks of assembly script, and produces a small file that can be loaded by MemoryEx.

Imagine MemoryEx compiler is now also available for free. This is the original donationware version with the original changelog, however the free version is identical. It is your choice to purchase IMXLH to support Imagine Programming in future projects, however feel free to fetch the completely free version with the same features

The Lua is compiled and obfuscated, and the assemblies are assembled and ready for execution. An LH's source-code can define constants, functions, structures, tables and assemblies in various scopes. The assemblies and functions sections will register the assembled ASM code and the functions to the value MemoryEx.LoadLH returns. Both assemblies and functions can be called immediately.

Each value in the registered sections will also be verified. For regular Lua the syntax will be checked, the structures in the structures section will be verified and checked if they are correct and the assembly's syntax will be checked.

MemoryEx and IMXLH also support a two-way verification process to ensure that you know for sure what LH file you load, and to prevent other applications from loading LH files you only want to be loaded by your software. In MemoryEx.LoadLH, you can specify a CRC32 checksum the to be loaded file should produce, if this checksum doesn't match, the LH file won't load. IMXLH supports a verification directive, allowing you to specify information the loading application should contain. If this information does not match, the LH file won't load. The verification process is optional, but recommended for project code.

Features

FeatureDescription
Create re-usable compiled codeUsing IMXLH, you can compile functions, structures, constants and assemblies for a single project, or create libraries you can use over and over again. These LuaHeader files, are basically definition files and function libraries for MemoryEx and Lua.
Compile and obfuscateIMXLH is using a customized compilation process for Lua code, the Lua source code is compiled and each chunk is compressed. None of the original source code is stored in the LH file. This means when MemoryEx.LoadLH loads an LH file, there won't be any source code in the memory buffers, which isn't the case with regular usage of AMS.
A smaller footprintThe MemoryEx plugin and all the Lua in AMS projects may consume some drive space, especially if you have much code calling Windows API functions. That's why a compiled LH file shouldn't be a large one, IMXLH produces very small output containing all the information you have put in it. For example, a 412 KiB Lua file has been reported to compile to a 72 KiB product.
PortabilityEven though the code you may use in your LH file may be OS dependant, the LH system and MemoryEx is not. Every LH file will load on operating systems equal to or greater than Windows 2000. The assembled assemblies are also very portable, considering they are just instructions and memory operations. If you use dependencies, an assembly may be OS dependant.
Lightweight editorIMXLH comes with an editor, this editor is using the Scintilla control and a custom tab system to allow multiple opened scripts. The IMXLH Editor immediately reports back to you at compilation / syntax check moments.
Customizable script editorIn the settings window of the editor, you can specify a custom font, tab size / tab method and colors for the Lua syntax highlighting. IMXLH comes with a few predefined syntax configurations, including the AMS default colors.
Smart auto-complete systemAs you type, the IMXLH editor will automatically suggest possibilities for the rest of your word or sentence. This auto-completion system is filled with functions and constants. If AMS is installed and the settings for this are not changes, IMXLH will automatically index all actions from Action Plugins and AMS action files.
Smart help systemIf AMS is installed, the IMXLH editor will index all Action Plugin help files and AMS documentation. If you press F1, IMXLH will check what word is at your current working position. If this is an action from a plugin, it will open the documentation for it (if it has any). If it is an action from AMS, it will open the AMS Help Topic on that action.

It will open the IMXLH documentation by default, if no other documentation reference was found.
Clever debugger and compilerThe compiler in IMXLH checks all sections for valid values, it will check the structures, functions, globals and assemblies. It will check if the syntax is correct and report back if it is not, describing in detail what syntax error occurred.

It will also check the syntax for each assembly chunk in the source, once again reporting back on syntax errors or invalid symbols/instructions. It will also try to load the specified dependencies and report back if a dependency could not be found, or a function in a library could not be found.
Quick template codeUsing the edit menu, or Control + I, you can quickly insert a default temlate code using all sections of the LH format. This way, you can always be sure about correct syntax and what you can implement.

In the edit menu, there is also an entry for a verification section template.
Verification sectionsIMXLH supports a verification section in each script. This section can be filled with certain data, when the application loading the LH file does not meet these verification fields, the LH file will not load.

This verify section can verify version information, global variables that have to exist, their values and types, the main window title, the name of the current page and objects that have to exist on the current page.

None of these values will be stored in the LH file!
Public info and the finfo sectionIMXLH also supports a field specifying which entries in the LH file are public. This means that, in a future LH viewer, only these entries will show up with additional information you provide.
Flat-assemblerThere is also a flat assembler implemented in IMXLH, however this assembler assembles the code and inserts the machine-code in the compiled LH file. This means that after the LH file is loaded, you can call that block of instructions immediately.
Commandline CompilerIt is possible to compile Lua files to LH files using the new CLI compiler. By typing the command imxlh-cli in cmd or a batch file, you can compile a file easily without having to specify many parameters specifying how to compile the file.
LHMakePart of the commandline compiler; create a makefile specifying each step of the compilation process. This way, you can compile a whole project of Lua files to LH files and run tools initializing and finalizing the compilation process. This repository includes an example of the implementation of the lhmake tool.

Screenshots

Downloads

Only €20!

If you have already purchased Imagine MemoryEx LH Compiler, then please to your account and go back to this download page. If you have no account or you have not yet purchased this package, please click the PayPal button on the right to purchase this product for €20. An account will be automatically created for you when you complete the payment, you will receive an email with your account information. If you do not receive the email within 24 hours, please check your spam box or contact us here.

Additional Information

Before trying things out yourself, it would be wise to read the documentation regarding this compiler as some operations can cause unwanted behaviour if not executed well. Also read the fASM documentation, before using the assembler.

At the moment, custom settings for the editor are not yet implemented. A future version will contain a settings dialog so you can customize the editor.

Compatibility Information

  • This software requires a Windows operating system equal to or greater than Windows 2000.
  • The LH files compiled with the IMXLH compiler can only be loaded with the MemoryEx Action Plugin, version 2 or greater.

Special credits

Special credits go to these friends:

  • MadDogDean - For helping me test the product and being the original inspiration for developing this work. Also for his time and thoughts on the editor and endless useful feedback!