KHScript allows you to write assembler code at different locations using a script.
 

KHScript Commands
Command Description
AOBSCAN(name, xx xx xx xx xx) Scans the memory for the given array of byte and sets the value of the symbol named name to the address of the memory location of the first match of the array
READMEM(address,size) Returns an array of size size containing the data stored in memory at address
Basic Example
[ENABLE]
//this is a single line comment

{this
is a
multiline
comment}


aobscan(_delay,   96 12 ?? 00 00 60 ?? 60 ?? ?? ?? d0 66 ?? ?? ?? 4f ?? ?? ?? 02 5e)
aobscan(_next,    d0 30 d0 24 ff 68 ?? ?? ?? d0 4f ?? ?? ?? 00 47)
aobscan(_wave,    d0 30 d0 66 ?? ?? ?? 60 ?? ?? ?? 14 ?? 00 00 d0 66 ?? ?? ?? 24 00 0e ?? 00 00 60 ?? ?? ?? 60)

_wave+1a://write the following bytes to memory at address _wave+1a
db 60 00 24 01 d0 66 00 00 00 4f 00 00 00 02 24 01 48
_wave+1b:
readmem(_delay+06,01)//write the byte at _delay+06 to memory at address _wave+1b
_wave+24:
readmem(_delay+11,03)//write the 3 bytes at _delay+11 to
memory at address _wave+24
_wave+20:
readmem(_next+0b,03)

[DISABLE]