I want to compare the user input stored in a register siwith another line.
By the way, I use FASM. Here my code is still after user input.
If I use the command repe cmpsb, I know that I need to use an additional segment, but I do not know how to do it. And the team repe cmpsbdoes not 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
user8495585
source
share