flat assembler
Message board for the users of flat assembler.
Index
> Windows > Problem with inc instruction. |
Author |
|
madmatt 13 Apr 2006, 09:21
I think you need to do something like swap the inc esi and xor ch, 0.
Code: .NotMatch mov ch, [esi] inc esi xor ch, 0 jnz .NotMatch |
|||
13 Apr 2006, 09:21 |
|
Barf 13 Apr 2006, 09:53
it still doesn't work...
|
|||
13 Apr 2006, 09:53 |
|
shoorick 13 Apr 2006, 10:15
not clear what are you doing with "xor ch,0"? it will not change ch. ZF will on when ch=0 only, but it is not usual kind of comparing with zero. please, give examples when it should loop, and when it should not.
regards! |
|||
13 Apr 2006, 10:15 |
|
Kermil 13 Apr 2006, 10:34
Incrementation of esi register change ZF flag. In the end of loop try to check up ch register using the "or" command.
Not clear what do you want in this example, but I try to assume, that you want get length of ascii string. Try to use following code: Code: .NotMatch: mov ch, [esi] or ch, ch jz .Match inc esi jmp .NotMatch .Match: |
|||
13 Apr 2006, 10:34 |
|
Barf 13 Apr 2006, 11:25
ok thanks.
|
|||
13 Apr 2006, 11:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.