Re: Question about jumps
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Sun, 27 Aug 2006 05:56:57 -0400
Markus Pitha wrote:
Hello,
I tried to program a simple if...else, but when the expression is TRUE,
the program executes both the if branch and the else branch, so it jumps
back to the jz call and executes the else branch too? Why is this so and
how can I solve this?
segment .data
successmsg db "eax is set to 1.", 0, 10
errmsg db "eax is not 1.", 0, 10
succlen equ $-successmsg
errlen equ $-errmsg
"suclen" includes both strings. Try it like this:
successmsg db "eax is set to 1.", 0, 10
succlen equ $-successmsg
errmsg db "eax is not 1.", 0, 10
errlen equ $-errmsg
Best,
Frank
.
- Follow-Ups:
- Re: Question about jumps
- From: Markus Pitha
- Re: Question about jumps
- References:
- Question about jumps
- From: Markus Pitha
- Question about jumps
- Prev by Date: Question about jumps
- Next by Date: Re: Question about jumps
- Previous by thread: Question about jumps
- Next by thread: Re: Question about jumps
- Index(es):
Relevant Pages
|