Please help me for my learning case.
I want my assembler program to: first read text from console user input, compare it for a string and goes to OK, or BAD depends on the string user type.
My code now looks something like this:
----------------------------
section .data
pass: db "pass"
yeah: db "GREAT",10
yeahl: equ $-yeah
section .bss
type: resb 255
typel: equ $-type
_start:
xor eax, eax ;clear eax
mov eax, 3 ; read input
mov ebx, 1
mov ecx, type
mov edx, typel
int 0x80
cmp eax, pass
je success
int 0x80
leave:
mov eax, 1
mov ebx, 0
int 0x80
success:
mov eax, 4
mov ebx, 1
mov ecx, yeah
mov edx, yeahl
int 0x80
jmp leave
---------
What ever I change things here, it wont make any compare on between the user inputs and my "pass" string. Could anyone advice?