Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP WITH BASIC INPUT

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
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. . . :(
 
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
 
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."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top