That is exactly how I used it in my program,
call readstring
mov _user, ebx
it works when I do
call readint
mov _number, eax
but I cannot figure out which register is taking the string I type in like "milk" for example.
Main Topics
Browse All TopicsI can't seem to figure out what register my call readstring is going into. Can someone assist me real fast please. I get a symbol for some reason like I called readchar or something.
Here is a sample of what I got.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
jschmuff
By the way, on return from ReadString, eax holds the length of the string so you would do something like this:
mov edx, offset string
call ReadString
mov strSize, eax
not forgetting of course that edx, offset string, is where your string is.
infintiy08
It doesn't matter which assembler jschmuff is using as ReadString is just ReadString whichever way you look at it.
Modalot
Just because you cannot personally confirm my solution, does NOT mean it should be swept under the carpet.
I can't believe your reasoning.... If you can provide proof which contradicts my advice then that's one thing however, because you have not provided such proof it beggers belief you can take the action you have taken.
I expect greater consideration from moderators otherwise what's the point in participating contributions if they are going to be ignored?
This matter should be passed onto someone with greater competence.
Modalot
Thank you for your speedy reply.
The following supports and verifies my solution.
See section: "5.4 Reading Characters, Strings, and Integers from Standard Input" of:
http://ocw.kfupm.edu.sa/us
Which
ReadString
Reads a string from standard input. Reading stops when the user presses the
[Enter] key. Before calling ReadString, EDX should contain the address of
the array of bytes where the input characters should be stored, and ECX
should contain the maximum number of bytes to be read plus one extra byte
for the null character to terminate the string. This procedure returns a count
of the actual number of bytes read in the EAX register.
This confirms BOTH of my comments:
ID: 24956048
ID: 24959999
Modalot
To answer your question:
Is this very simple answer really worth the hassle you start?
It's not abut the points - it's about fairness!
To add to my previous comment, the actual 32-bit code for ReadString is defined here:
http://www.cs.fit.edu/~mma
See code below:
Business Accounts
Answer for Membership
by: Infinity08Posted on 2009-07-23 at 10:21:36ID: 24927647
How is readstring defined ? Look at its implementation, or in the documentation of your assembler toolkit.