Monday, 15 March 2010

assembly - Check if there are 3 same characters in a row in the string -



assembly - Check if there are 3 same characters in a row in the string -

my code doesn't work. problem lea (line 6). netbeanside says "invalid combination of opcode , operands". there workarounds working? help appreciated

global _main section .data text: db "fdkvemdfderft", 0 section .text _main: lea si, text no: lodsb or al,al jz exit cmp al,[si] jnz no cmp al,[si+1] jnz no ;code exit: ;code mov eax, 4c00h ret

.

-f win32

try:

lea si, [text]

lea loads address resulting addressing mode address calculation. therefore, express label address this.

many just

mov si, text

assembly nasm

No comments:

Post a Comment