FANDOM


Operation

The Load Image High instruction allows the specification of an address outside of the normal Chip8 memory range.

This instruction has been introduced to allow for much larger graphic and sound media objects to be used in a MegaChip program than what would normally be addressable with the LD I instruction.

Format

01NN NNNN - The Load Image High instruction.

NN NN NN is a 24 bit memory address.

The original LD I instruction could only reference a 12 bit address of size N NN.

Use

When used with the MegaChip assembler, a following place holder instruction is required.

This is due to how the assembler generates instruction bytes.

LDHI I, #NNNNNN
NOP

The NOP instruction is replaced by the lower two bytes of the #NNNNNN address.

LDHI I #112233
NOP

This will generate these bytes to be processed by the MegaChip emulator:

#0111
#2233

Emulator Notes

See also