From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: how_shifting_bit
Date: Mon, 16 Sep 2002 17:17:33 +0200 [thread overview]
Message-ID: <3D85F60D.D5089C7E@wp.pl> (raw)
In-Reply-To: web-49321140@m1.plasa.com
ssams wrote:
>
> /* i am trying building some code with instruction 'shl'
> i have a little problem when print second char. this is my
> code
> want somebody correct it...?
> regard */
> .data
> msg: .byte 0b111111 #char'?'
> baris_baru: .byte 10
> .text
> .globl _start
> _start:
> mov $4, %eax /* fungsi syscall - write */
> mov $1, %ebx /* file handler forstdout */
> mov $1, %edx
> mov $msg, %ecx
> int $0x80 /* do syscall */
>
> mov $msg,%eax
> mov $1,%cl
> shl %cl,%eax #eax=111 1110 = '~'
> movzwl %ax,%ecx
xchg this two lines with:
shl %cl,(%eax)
mov %eax,%ecx
> mov $4, %eax /* fungsi syscall - write */
> int $0x80
> /* after char '?' i want print '~'. No output generated
> what and where it wrong..?*/
>
> mov $baris_baru,%ecx
> mov $4, %eax /* fungsi syscall - write */
> int $0x80
>
> mov $1,%eax
> int $0x80
> can anybody explain me please..?
> regard.
--
Maciej Hrebien
prev parent reply other threads:[~2002-09-16 15:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 5:19 how_shifting_bit ssams
2002-09-16 15:17 ` Maciej Hrebien [this message]
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=3D85F60D.D5089C7E@wp.pl \
--to=m_hrebien@wp.pl \
--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).