Edit: Answer my own question, look right. -_-
I have a variable defined in the DATA segment:
Rated DW 0100H; The store at Intermediate Value starts at hex fraction 1.00 It is assumed that I want to add or subtract to get my return value.
This code appears for the first time in the section, the following point:
sub [retal], ax; I have used the debugger, and can confirm that at the time of this operation, Ax register is: 0000 h.
However, if I am immediately before the following line code:
mov dx, 0100h; Mov [retVal], 0100H; I get completely different values (also incorrect). Am I astonished, am I basically misusing the variable here? I do not know why the value was started to load, which was originally started (and has not been modified yet) will change the results.
Any thoughts? Do not accept this, will I remind you that how to track the value of a variable through the codewave? (I am using the DOSbox debugger)
If this is the actual 8086 (i.e., the architecture containing the segment) , Is DS set to the point where you subtract? The first thing that remembers the springs is that you are completely changing the different memory space.
On top of that, you should provide:
- The least possible full program that shows the problematic behavior (and when you do this you can solve your problem I often do).
- In both cases, the actual incorrect value that is being set to
retVal
Comments
Post a Comment