From: Ricardo Catalinas Jimenez <th1nk3r@server01.org>
To: linux-assembly@vger.kernel.org
Subject: printf without '\n'
Date: Tue, 25 Oct 2005 17:16:02 +0200 [thread overview]
Message-ID: <20051025151602.GA2904@jehuty.server01.org> (raw)
Newbie simple question:
With a code like this:
.section .data
MSG:
.ascii "Hello\0"
.section .text
.globl _start
_start:
pushl %ebp
movl %esp, %ebp
pushl $MSG
call printf
movl %ebp, %esp
popl %ebp
movl $1, %eax
xorl %ebx, %ebx
int $0x80
I compiled it with:
as code.s -o code.o; ld --dynamic-linker /lib/ld-linux.so.2 -lc \
test.o -o test
With that ascii string, nothing is printed but when I use "Hello\n\0" it
works fine.
What is the reason for not printing the string if there isn't a '\n' in
it?
I something related with the buffered (by lines) IO?
Why with a C program it does not happend.
Thanks in advance.
next reply other threads:[~2005-10-25 15:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-25 15:16 Ricardo Catalinas Jimenez [this message]
2005-10-25 15:44 ` printf without '\n' joy merwin monteiro
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=20051025151602.GA2904@jehuty.server01.org \
--to=th1nk3r@server01.org \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).