OSDev.org
https://forum.osdev.org/

How would I get user input in Assembly?
https://forum.osdev.org/viewtopic.php?f=13&t=31209
Page 1 of 1

Author:  TheDev100 [ Thu Jan 12, 2017 3:53 am ]
Post subject:  How would I get user input in Assembly?

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

Author:  alexfru [ Thu Jan 12, 2017 4:06 am ]
Post subject:  Re: How would I get user input in Assembly?

Duplicate post?

Author:  Octocontrabass [ Thu Jan 12, 2017 4:06 am ]
Post subject:  Re: How would I get user input in Assembly?

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/