From: Rudolf Marek <MAREKR2@cs.felk.cvut.cz>
To: "J.S.Souza" <jssouza@pacbell.net>
Cc: linux-assembly@vger.kernel.org
Subject: Re: Keyboard Input
Date: Wed, 8 May 2002 15:46:02 +0200 [thread overview]
Message-ID: <abba6o$dal$2@main.gmane.org> (raw)
In-Reply-To: <200205081329.GAA32743@gold.he.net>
hello,
I wrote it here last week I think but I cant find it so once again.
On Wed, 8 May 2002, J.S.Souza wrote:
> Date: Wed, 8 May 2002 06:30:00 -0700
> From: J.S.Souza <jssouza@pacbell.net>
> To: linux-assembly@vger.kernel.org
> Subject: Keyboard Input
>
> I'm new to linux assembly although I have taken Assembly Programming in
> College (unfortunately DOS based). How is it possible to read input from the
> keyboard until the user hits the 'enter' key? Does using the read() syscall
> work?
yes via read syscall, file desc (handle) will be STDIN
Also, how about reading only ONE character from user and returning
> control back to the program? Although I know C fairly well, I would rather
> use Assembly _only_ (if this is possible).
It depends on terminal settings, you have to set it via ioctl syscall
I think it is ICANON atribute.
see example in asmutils package (sh.asm - tty_init to be more specific)
Regards
Rudolf
To konstantin:
I should put Q&A about this in FAQ and about vm86 too.
next prev parent reply other threads:[~2002-05-08 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-08 13:30 Keyboard Input J.S.Souza
2002-05-08 13:46 ` Rudolf Marek [this message]
2002-05-08 18:33 ` h-peter recktenwald
2002-05-08 17:50 ` J.S.Souza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='abba6o$dal$2@main.gmane.org' \
--to=marekr2@cs.felk.cvut.cz \
--cc=jssouza@pacbell.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).