How would I get user input in Assembly?

Programming, for all ages and all languages.
Post Reply
TheDev100
Member
Member
Posts: 27
Joined: Wed Jan 11, 2017 3:29 pm

How would I get user input in Assembly?

Post 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
alexfru
Member
Member
Posts: 1111
Joined: Tue Mar 04, 2014 5:27 am

Re: How would I get user input in Assembly?

Post by alexfru »

Duplicate post?
Octocontrabass
Member
Member
Posts: 5513
Joined: Mon Mar 25, 2013 7:01 pm

Re: How would I get user input in Assembly?

Post 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.
Post Reply