Turn HRAM constants into labels #22
Viewing a subset of changes. View all
hram: use `ldh` instead of `ld` for all HRAM constants
This works around a know limitation of the rgbds toolchain: > If you use this method [i.e. a custom section] of allocating HRAM > the assembler will NOT choose the short addressing mode in the LD > instructions `LD [$FF00+n8],A` and `LD A,[$FF00+n8]` because the > actual address calculation is done by the linker. > > If you find this undesirable you can use the `LDH [$FF00+n8],A` and > `LDH A,[$FF00+n8]` syntax instead. This forces the assembler to emit > the correct instruction and the linker to check if the value is in the > correct range.
- Loading branch information...
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.