I'm not sure if I'm doing something wrong but I was trying to run a program with the 2 following op codes and I'm getting the wrong address.
0838 0004 fa01 BTST #4,$0000fa01
08b8 0006 fa11 BCLR #6,$0000fa11
The address is a 16 bit word immediate constant.
I'm getting an 8 bit read from $fffa01 and $fffa11 instead of $00fa01 and $00fa11
After looking through the Musashi code I noticed that its using a function called:
EA_AW_8()
which in turn calls:
MAKE_INT_16()
This routine is changing the address into a signed number when I'm sure is should be unsigned.
This is causing it to change the upper part of the address from 00 to ff.