i have this assembly code in the .text segment, is it possible that i can’t inc a dword that seats in the .text area. if i put some dword that seats in the .data section it works fine, i mean when i switch the line:
01004A72 > 813D 664A0001 >CMP DWORD PTR DS:[1004A66],3E7
with the line
01004A72 > 813D 664A0001 >CMP DWORD PTR DS:[.data:0100579C],3E7
01004A66 0000 ADD BYTE PTR DS:[EAX],AL
01004A68 0000 ADD BYTE PTR DS:[EAX],AL
01004A6A 00 DB 00
01004A6B 00 DB 00
01004A6C 00 DB 00
01004A6D 00 DB 00
01004A6E 00 DB 00
01004A6F 00 DB 00
01004A70 00 DB 00
01004A71 00 DB 00
01004A72 > 813D 664A0001 >CMP DWORD PTR DS:[1004A66],3E7
01004A7C . 74 06 JE SHORT winmine3.01004A84
01004A7E FF05 9C570001 INC DWORD PTR DS:[1004A66]
01004A84 ^E9 CDD5FFFF JMP winmine3.01002056
01004A89 0000 ADD BYTE PTR DS:[EAX],AL
01004A8B 0000 ADD BYTE PTR DS:[EAX],AL
01004A8D 0000 ADD BYTE PTR DS:[EAX],AL
01004A8F 00 DB 00
01004A90 00 DB 00
The
.textsegment is a read only section. You should use.bss.dataor thestackfor modifiable variables.http://en.wikipedia.org/wiki/Code_segment