Please, does anybody know how to code string input in assembly language? I’m using int 21 to display and input characters.
Please, does anybody know how to code string input in assembly language? I’m using
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use function
0Ahto read buffered input. Given a string buffer inds:dxit reads a string of up to length 255. The buffer layout is:An example of a small COM file that reads a string and then echos it back to the user:
Note that it will overwrite the input line (and it thus might not look the program is doing anything!)
Alternatively you can use function
01hand read the characters yourself in a loop. Something like this (note it will overflow later buffers if more than 255 characters are entered):