×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

HELP WITH BASIC INPUT

HELP WITH BASIC INPUT

HELP WITH BASIC INPUT

(OP)
How can one get basic input in ASM?! What I'm looking for is the equivalent of scanf("%d",&var);

I also need to know how the heck to get string input.

I need serious help. . . :(

RE: HELP WITH BASIC INPUT

Hey there
I think you can call the

read system call
The protoype for the read system call is

int read(void fd, char *buffer, int size)

If you are not sure about how to use this system call and need more help just post a reply saying so
later
Xp0nential

RE: HELP WITH BASIC INPUT

Three words: MAKE YOUR OWN.

To expand those three words:
First, we need to know your OS of choice.  Windows?  DOS?  No OS at all??
Second, we need to know how generic you want it to be.  Just numeric input?  Just string input?  If you want it to be as useful as C's scanf... then use C's scanf!!  No kidding, you CAN use C's scanf() from assembly... you just need a C compiler and library...
Third, if you don't use C's scanf(), then write your own using whatever services your OS provides you.  DOS for example has a function call that handles string input completely without your application having to do anything.
Fourth, how do you need to integrate it into your application?  The OS services may be too generic or too specific.

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close