All of lore.kernel.org
 help / color / mirror / Atom feed
From: hp <lx@lxhp.in-berlin.de>
To: ssams <ssams@telkom.net>, linux-assembly@vger.kernel.org
Subject: Re: calculating byte
Date: Thu, 24 Jul 2003 08:54:28 +0100	[thread overview]
Message-ID: <200307240854.28632.lx@lxhp.in-berlin.de> (raw)
In-Reply-To: <web-3860654@b1.c.plasa.com>

ssams am Mittwoch, 23. Juli 2003 23:15:
> hi all
> if u have time, please answer my following question
> i try to learn more about assembly. in a time i'found some
> article that explain about exploit, and i get this
> following code. My question is.. how to calculate byte at
> each line..?

for a rough calculation, as a rule of thumb:

	simple opcode			1 byte	(very few such opcodes, e.g. push/pop)
	opcode w. addressing modifier	2 bytes
	mov immediate data		+ 4 bytes
	signed byte displacement	+ 1 byte

	'other' addressing size		+ 1 byte	(16/32bit)
	'other' data item size		+ 1 byte	(word/dword)

	'exotic operations praefix'	+ 1byte	(e.g. "0F")


hp

-- 
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml en/de
	FAQ(s) + DOCs at http://linuxassembly.org
  pse, reply to << lx -at- lxhp -dot- in-berlin -dot- de >>


  parent reply	other threads:[~2003-07-24  7:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 22:15 calculating byte ssams
2003-07-24  6:13 ` Anticipating a Reply
2003-07-24  7:54 ` hp [this message]
2003-07-25 13:38   ` switching to real mode? Wolfgang Huber
2003-07-25 16:55     ` hp
2003-07-25 17:20     ` Maciej Hrebien
2003-07-25 19:42       ` switching to real mode Rick A. Hohensee

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=200307240854.28632.lx@lxhp.in-berlin.de \
    --to=lx@lxhp.in-berlin.de \
    --cc=linux-assembly@vger.kernel.org \
    --cc=ssams@telkom.net \
    /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.