linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Keyboard Input
@ 2002-05-08 13:30 J.S.Souza
  2002-05-08 13:46 ` Rudolf Marek
  2002-05-08 18:33 ` h-peter recktenwald
  0 siblings, 2 replies; 4+ messages in thread
From: J.S.Souza @ 2002-05-08 13:30 UTC (permalink / raw)
  To: linux-assembly

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?  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).

			J.S.Souza

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Keyboard Input
  2002-05-08 13:30 Keyboard Input J.S.Souza
@ 2002-05-08 13:46 ` Rudolf Marek
  2002-05-08 18:33 ` h-peter recktenwald
  1 sibling, 0 replies; 4+ messages in thread
From: Rudolf Marek @ 2002-05-08 13:46 UTC (permalink / raw)
  To: J.S.Souza; +Cc: linux-assembly


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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Keyboard Input
  2002-05-08 18:33 ` h-peter recktenwald
@ 2002-05-08 17:50   ` J.S.Souza
  0 siblings, 0 replies; 4+ messages in thread
From: J.S.Souza @ 2002-05-08 17:50 UTC (permalink / raw)
  To: phpr; +Cc: linux-assembly

On Wednesday 08 May 2002 11:33 am, h-peter recktenwald wrote:
> On Wed, 8 May 2002 06:30:00 -0700
>
> "J.S.Souza" <jssouza@pacbell.net> wrote:
> > 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?  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).
> >
> > 			J.S.Souza
>
> => http://home.snafu.de/phpr/initty.gz
>
> regards,
> 	hp
Not the easiest thing to do is it?
Why is it that something so seemingly simple has such a complex solution?

			regards,
			Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Keyboard Input
  2002-05-08 13:30 Keyboard Input J.S.Souza
  2002-05-08 13:46 ` Rudolf Marek
@ 2002-05-08 18:33 ` h-peter recktenwald
  2002-05-08 17:50   ` J.S.Souza
  1 sibling, 1 reply; 4+ messages in thread
From: h-peter recktenwald @ 2002-05-08 18:33 UTC (permalink / raw)
  To: J.S.Souza; +Cc: linux-assembly

On Wed, 8 May 2002 06:30:00 -0700
"J.S.Souza" <jssouza@pacbell.net> wrote:

> 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?  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).
> 
> 			J.S.Souza

=> http://home.snafu.de/phpr/initty.gz

regards,
	hp

-- 
Linux,Assembly,Forth: http://home.snafu.de/phpr/index-lx.shtml (en,de)
no abusive software patents http://petition.eurolinux.org/pr/pr17.html
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-08 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-08 13:30 Keyboard Input J.S.Souza
2002-05-08 13:46 ` Rudolf Marek
2002-05-08 18:33 ` h-peter recktenwald
2002-05-08 17:50   ` J.S.Souza

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).