Chapter 13. Modifiers

With modifiers, you can modify assembled bytes before they are stored to the target file. It could be you want to encrypt, pack or crunch the bytes. Currently, the only way to create a modifier is to implement a java plugin (See the plugin chapter).

13.1. Modify Directives

You can modify the assembled bytes of a limited block or of the whole source file. To modify the whole source file use the .filemodify directive at the top of the file. The following modifies the whole file with the modifier ‘MyModifier’ called with the parameter 25.

.filemodify MyModifier(25)

To modify a limited block you use the .modify directive:

.modify MyModifier() {
    inc $d020
    dec $d021
    jmp main

    .fill $100, i