All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: inside_SUB
Date: Mon, 16 Sep 2002 17:04:26 +0200	[thread overview]
Message-ID: <3D85F2FA.2723779D@wp.pl> (raw)
In-Reply-To: web-49320142@m1.plasa.com

ssams wrote:
> 
> by this code bellow i want print new line with the simple
> way
> i sub first char "49" with 39. but i did not get output
> like what i want
> output from this code is
> 1>>
> when i look at ascii code this second char value is 187.
> would some body expalin me...?
> 
> regard
> 
> .data
>  msg: .byte 49
> .text
> .globl _start
> _start:
>         mov $msg,%ecx
>         mov $1,%ebx
>         mov $1,%edx
>         mov $4,%eax
>         int $0x80
> 
>         mov %ecx,%eax
>         sub $39,%eax

xchg "sub $39,%eax" with "sub $39,(%eax)". %eax have a ptr value & You
access a memory using this ptr!

>         #ul %ebx
>         mov %eax,%ecx
>         mov $4,%eax
>         int $0x80
> 
>         mov $1,%eax
>         int $0x80

-- 
Maciej Hrebien


  reply	other threads:[~2002-09-16 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16  5:15 inside_SUB ssams
2002-09-16 15:04 ` Maciej Hrebien [this message]
     [not found] <web-50089505@m1.plasa.com>
2002-09-19 12:24 ` inside_SUB Maciej Hrebien

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=3D85F2FA.2723779D@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.