quick question about BANK() #1261
-
so BANK(x) returns the bank of x, correct? what if MBC5 is used and x is in bank $100-$1ff, and the code used is edit: tried it; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
BANK(xxx)
is returning the value, which is $1FE in your case. There is nothing special about that.The rest is the error you'd normally get for trying to write that instruction:
ld a, $1fe
directly will give you the same error. If you actually do this, the value will be truncated (it's equivalent told a, $fe
) and it won't do what you want.