New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn HRAM constants into labels #22

merged 3 commits into from Aug 31, 2017
Jump to file or symbol
Failed to load files and symbols.
+1,284 −1,284
Diff settings


Just for now

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...
kemenaran committed Aug 29, 2017
commit a4c0e267198bf6e7895d8bfca74506db70c2d5b4
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.