Skip to content
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

BTST and BCLR with immediate word address gives wrong address #97

Open
Willyarma opened this issue Aug 24, 2023 · 0 comments
Open

BTST and BCLR with immediate word address gives wrong address #97

Willyarma opened this issue Aug 24, 2023 · 0 comments

Comments

@Willyarma
Copy link

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

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, unless I have done something wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant