Page 1 of 1

How would I get user input in Assembly?

Posted: Thu Jan 12, 2017 3:53 am
by TheDev100
Hey guys. I want to get user input from Assembly so I can compare the string.

What function and interrupt would I use?

I know the CMP instruction but how would I compare the string for the function and interrupt I would use?

Can you tell me what instructions I may need? I want more than 5 characters as well if that's possible please. I am trying to make a shell.

Thanks
John

Re: How would I get user input in Assembly?

Posted: Thu Jan 12, 2017 4:06 am
by alexfru
Duplicate post?

Re: How would I get user input in Assembly?

Posted: Thu Jan 12, 2017 4:06 am
by Octocontrabass
TheDev100 wrote:What function and interrupt would I use?
If you want BIOS functions, check RBIL. You probably want INT 0x16 AH=0x00.
TheDev100 wrote:I know the CMP instruction but how would I compare the string for the function and interrupt I would use?
There are no BIOS functions for string comparisons. You'll have to write that yourself.
TheDev100 wrote:Can you tell me what instructions I may need?
Probably things like MOV, CMP, and maybe REP CMPSB.