I am trying to write a DOS clone in 16-bit real mode, although once I am done with the current issue, I may just learn 32-bit assembly instead. My questions have been negatively recieved in the past, but this one last time, I'm afraid I do need to consult this site. Improving upon my previous question, I have made a bit more effort to learn more about pointers and the stack in my assembly code.
Apparently, the instruction cmpsb compares two strings, located in ES and DS respectively. I am trying to move the value of INPUT_STRING to DS and my value for shutmsg to ES, which seem like the correct registers (these are variables declared before). My instructions seem OK and they compile fine, but it doesn't work when I type shutdown, and when I run it through GDB, all it shows is
0x0000fff0 in ?? ()
I don't know what's wrong. I really don't. Here is my code:
prompts:
mov si, prompt
call prints
call scans
push ds
mov ds, [INPUT_STRING]
mov es, [shutmsg]
mov cx, 0xFFFF
cld
repe cmpsb
pop ds
je shutdown
mov si, newline
call prints
mov si, INPUT_STRING
call prints
mov si, newline
call prints
jmp prompts
Thanks in advance and sorry if this is once again a bad question.