|
|
Forum
|
|
.while loop doesn't stop, .while esi >= 0 dec esi does never stop
|
Junihausen |
|
New Member
Group: Members
Posts: 5
Member No.: 778
Joined: 11-November 04
|
Hi,
I'm using WinAsm with masm32 and wonder why the following code doesn't stop:
mov esi, 2 .while esi >= 0 dec esi .endw
Does anybody has a clue, why?
|
|
|
|
low_coder |
|
New Member
Group: Members
Posts: 15
Member No.: 15247
Joined: 18-November 08
|
you are doing signed comparison... you should add sdword ptr before esi in the .while loop:
CODE | mov esi, 2 .while sdword ptr esi >= 0 dec esi .endw |
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
|
|
|
|
|
|
|
|
|
|
|