So, since dividing in assembly is a very hard topic i wanted to try it out.
1. mov eax, Winmine__XP.exe+579C // address of time elapsed
2. cmp [eax], 0x2 // compare time with 2
3. jge decrease // jump to decrease if time greater or equal 2
4. inc [eax] // increase deref eax
5. jmp exit // exit
6. decrease:
7. mov eax, [eax] // deref eax into eax as dividend
8. mov ecx, 0x2 // move 2 into ecx as divisor
9. div ecx // divide eax by ecx
// CRASH
Now i was wondering if my instruction of moving the dereferenced eax into eax crashes my program or if i was doing something wrong using division.