mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Suggest ld and call when failing to link ldh and rst
This commit is contained in:
@@ -377,7 +377,11 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
|
|||||||
case RPN_HRAM:
|
case RPN_HRAM:
|
||||||
value = popRPN(patch);
|
value = popRPN(patch);
|
||||||
if (value < 0xFF00 || value > 0xFFFF) {
|
if (value < 0xFF00 || value > 0xFFFF) {
|
||||||
firstErrorAt(patch, "Address $%" PRIx32 " for LDH is not in HRAM range", value);
|
firstErrorAt(
|
||||||
|
patch,
|
||||||
|
"Address $%" PRIx32 " for LDH is not in HRAM range; use LD instead",
|
||||||
|
value
|
||||||
|
);
|
||||||
value = 0;
|
value = 0;
|
||||||
}
|
}
|
||||||
value &= 0xFF;
|
value &= 0xFF;
|
||||||
@@ -387,7 +391,9 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
|
|||||||
value = popRPN(patch);
|
value = popRPN(patch);
|
||||||
// Acceptable values are 0x00, 0x08, 0x10, ..., 0x38
|
// Acceptable values are 0x00, 0x08, 0x10, ..., 0x38
|
||||||
if (value & ~0x38) {
|
if (value & ~0x38) {
|
||||||
firstErrorAt(patch, "Value $%" PRIx32 " is not a RST vector", value);
|
firstErrorAt(
|
||||||
|
patch, "Value $%" PRIx32 " is not a RST vector; use CALL instead", value
|
||||||
|
);
|
||||||
value = 0;
|
value = 0;
|
||||||
}
|
}
|
||||||
value |= 0xC7;
|
value |= 0xC7;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
error: JR target must be between -128 and 127 bytes away, not 190; use JP instead
|
error: JR target must be between -128 and 127 bytes away, not 190; use JP instead
|
||||||
at invalid-patches.asm(10)
|
at invalid-patches.asm(10)
|
||||||
error: Address $0 for LDH is not in HRAM range
|
error: Address $0 for LDH is not in HRAM range; use LD instead
|
||||||
at invalid-patches.asm(9)
|
at invalid-patches.asm(9)
|
||||||
error: Requested SIZEOF() of undefined section "NonexistentSection"
|
error: Requested SIZEOF() of undefined section "NonexistentSection"
|
||||||
at invalid-patches.asm(8)
|
at invalid-patches.asm(8)
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
error: Address $1234 for LDH is not in HRAM range
|
error: Address $1234 for LDH is not in HRAM range; use LD instead
|
||||||
at ldh-bad.asm(2)
|
at ldh-bad.asm(2)
|
||||||
Linking failed with 1 error
|
Linking failed with 1 error
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
error: Value $1 is not a RST vector
|
error: Value $1 is not a RST vector; use CALL instead
|
||||||
at rst-bad.asm(2)
|
at rst-bad.asm(2)
|
||||||
Linking failed with 1 error
|
Linking failed with 1 error
|
||||||
|
|||||||
Reference in New Issue
Block a user