bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use control-D character?


From: Ian Lance Taylor
Subject: Re: How to use control-D character?
Date: Wed, 13 Oct 2010 06:11:20 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

ali hagigat <address@hidden> writes:

> Thank you to reply to my message. Ian, I am using Linux, Fedora 12.
> I typed 'as' as you wrote:
> root> as
> Then I wrote the name of my input file:
> root> asm1.s
> Then i pressed <ENTER> and then <ctl-D> and nothing happned!
> For the second time I pressed  <ctl-D> and now I have the following
> error message:
> {standard input}: Assembler messages:
> {standard input}:1: Error: no such instruction: `asm1.s'
>
> I think you meant writing some assembly instructions before <CTL-D>.
> But when I type:
> root> as  <ENTER>
> root> mov  $0, %eax  <ENTER>
> root> <CAPS LOCK> <CTL-D>
> nothing happens!! but if i press <CTL-D> for two more times, it will
> exit from as and returns back to my shell prompt!
> So what happened? Did it assemble the line? Why this <CTL-D> is
> useful, how it is used?

As noted in http://en.wikipedia.org/wiki/End-of-file , ^D is the
standard Unix end-of-file indicator from the terminal.  You don't need
to use the caps lock or the shift key; pressing the control key and the
D key simultaneously is sufficient.

The fact that you have to type ^D more than once seems like a bug in the
GNU assembler.  Please consider reporting it at
http://sourceware.org/bugzilla/ .

And, yes, when you do type it more than once, and the assembler exits,
then it has assembled the line you typed.  You will find the results in
the file "a.out".

Ian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]