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

MSP430_OP_RLAM gives bad MSP430_SR_Z bit #107

Open
zhaoleicpp opened this issue Aug 14, 2021 · 1 comment
Open

MSP430_OP_RLAM gives bad MSP430_SR_Z bit #107

zhaoleicpp opened this issue Aug 14, 2021 · 1 comment

Comments

@zhaoleicpp
Copy link

code:
dev->regs[dreg] = res_data & mask;
if (!res_data)
dev->regs[MSP430_REG_SR] |= MSP430_SR_Z;
in function step_RxxM in sim.c
if res_data is 0x10000 and mask is 0xffff
the dev->regs[dreg] is correctly set to 0;
but res_data remains 0x10000 the MSP430_SR_Z bit is bad.
Furtherly if res_data is 1 the MSP430_SR_Z bit should be cleared.
dev->regs[MSP430_REG_SR] &= ~MSP430_SR_Z;

@zhaoleicpp
Copy link
Author

dev->regs[MSP430_REG_SR] MSP430_SR_Z is cleared already. :-)

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