means the contents of
X
plus 4, while to the built-in assembler it means the contents of the word at the address four
bytes higher than the address of
X
. So, even though you are allowed to write
asm
MOV EAX,X+4
end;
this code doesn't
load the value of
X
plus 4 into AX; instead, it loads the value of a word stored four bytes beyond
X
. The correct way to add 4 to the contents of X is
asm
MOV EAX,X
ADD EAX,4
end;
Dostları ilə paylaş: