I have a tilemap that is in bits. When I use this code, it works except when I have V=60 and W=50, the bit subroutine always returns 256. When I use any other dimensions, it returns 1 or 0.
W=60
H=50
.W=Width of map, H=Height of map, A=Start of appvar (returned from getcalc)
sub(BIT,Y*W+X^8,Y*W+X/8+A,°U
.Bitnum, Address, Where to store the result of the test
.Code
Lbl BIT
{r2}er1->{r3}
Return
It would probably take up less space putting this code inline, but why isn't this working for a 60x50 map while it works for any other dimensions.
EDIT: I got it with some other sizes like 59x49 and other numbers around that area, but what is causing the bit checking to return 256?