Closed Narukara closed 2 years ago
Hey, Thanks for reporting this :+1: Hope you are finding this emulator useful.
This behavior is indeed incorrect. The CF should be set to exactly opposite values. As the 8086 family manual states that
CF will contain value of the last bit shifted out of the destination operand
Thus in first example the last value will be 0, and in second example will be 1. I have figured out where the error lies in the code logic. Also as the code for different shifts is taken after each other (as it is quite similar) maybe this issue also affects other shifts as well. I am a bit busy for few days, so I will fix this few days later.
Let know if you still have doubts or issues.
Thanks for reporting :)
Hey I have updated the core lib, as well as the dependency in this repo. Now this should give the results as expected. Please check once, and if fine, close the issue. Thanks for reporting!
I am not sure if this is a bug since I am an 8086 beginner.
I am using the 8086 emulator on the web page and I found a problem:
When I execute:
Finally CF will be set to 1.
And when I execute:
Finally CF will be set to 0.
I believe this violates the definition of the SHR instruction.