The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: nathanpc on October 03, 2009, 11:19:54 AM

Title: Do a Input Character
Post by: nathanpc on October 03, 2009, 11:19:54 AM
Hello,
I want to know two things, the first: How can i build a program that do something like this:
Enter Your Name: <name>
Hello <name>

<name> is what the user have typed.

Best Regards,
Nathan Paulino Campos
Title: Re: Do a Input Character
Post by: dedndave on October 03, 2009, 11:58:12 AM
try this...
Title: Re: Do a Input Character
Post by: FORTRANS on October 03, 2009, 12:04:01 PM
Hi,

   This has been addressed before, see for instance:

get useriput
http://www.masm32.com/board/index.php?topic=12054.0

Buffered Input.[solved]
http://www.masm32.com/board/index.php?topic=10689.0

   But a summary:  Use DOS String Output function 2 to
print your prompt.  Use function 0AH, Buffered Keyboard
Input to read the name.  Modify the input to put a dollar
sign at the end of the name.  Use String Output twice to
output your response and the name.

HTH,

Steve N.
Title: Re: Do a Input Character
Post by: nathanpc on October 03, 2009, 05:34:39 PM
I'm using dedndave example, but how i can store the inputed characters in a variable.

Thanks
Title: Re: Do a Input Character
Post by: dedndave on October 03, 2009, 09:31:27 PM
it is stored in a variable - the buffer
are you talking about converting numeric input into a binary value ?
Title: Re: Do a Input Character
Post by: nathanpc on October 03, 2009, 09:45:22 PM
Thanks very much!
Title: Re: Do a Input Character
Post by: BlackVortex on October 05, 2009, 11:03:47 AM
Are you programming in DOS ?
Title: Re: Do a Input Character
Post by: dedndave on October 05, 2009, 12:22:14 PM
we are in the 16-bit forum
Title: Re: Do a Input Character
Post by: nathanpc on October 05, 2009, 12:38:47 PM
Sorry, it's 32 bits. :(
Title: Re: Do a Input Character
Post by: BlackVortex on October 05, 2009, 01:55:35 PM
Then I think this thread got wrongly created or moved here   :P
Title: Re: Do a Input Character
Post by: dedndave on October 05, 2009, 02:58:26 PM
i didn't see any 32-bit code - lol
the example i gave you isn't 32-bits, either