I want to compare the user input stored in the register si
with another string.
By the way, I'm using FASM. Here's my code so far after the user input.
If I'm using the repe cmpsb
command, I know that I have to use the extra segment, but I don't know how. And the repe cmpsb
command doesn't work with this code.
.input_done:
cmp si, 0
je no_input
jmp short .compare_input
.compare_input:
mov cx, 20 ;For the repe cmpsb command.
cld
mov di, info ;The string I want to compare.
mov es, di
mov di, info
repe cmpsb
cmp cx, 0
je showinfo
.showinfo:
... ;The output string if both string are the same.
info db "info", 0