View Single Post
Old Apr 8th, 2006, 12:50 PM   #3
eax
Newbie
 
eax's Avatar
 
Join Date: Mar 2006
Posts: 17
Rep Power: 0 eax is on a distinguished road
old BYTE 32 DUP(?)
new BYTE 32 DUP(?)


When i run program using code suggested by you ,
it give error: invalid instruction operands

for code line : mov esi,line



Quote:
Originally Posted by Narue
>lea edi,new
What's new?

>je dojob
>jne message ;message ,string is not palindrome
There's no need for je dojob, just drop down past the jne test.
	mov	esi,line
	lea	edi,[line+eax]
.again:
	cmp	edi,esi
	jbe	.success
	mov	al,byte [edi]
	cmp	al,byte [esi]
	jne	.failure
	inc	esi
	dec	edi
	jmp	.again
.failure:
	output	failure
	jmp	.done
.success:
	output	success
.done:
eax is offline   Reply With Quote