kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: LILO jump/retf question
Date: Sun, 13 Mar 2011 15:31:52 +0700	[thread overview]
Message-ID: <AANLkTikfM584pCemBdxmzxcc24jJQqntbA_5Z7mnVj5g@mail.gmail.com> (raw)
In-Reply-To: <4D7BDFA8.40201@o2.pl>

Hi....

Not a pro asm coder, but here's what I think...

On Sun, Mar 13, 2011 at 04:03, Andrzej Kardas <andrzej-kardas@o2.pl> wrote:
> i wonder if are there any benefits of replacing line
>
> jmpi ? ?go,INITSEG ?; which, i think is more readable
>
> by
>
> push ? ?es
> push ? ?#go
> retf
>
> besides to make people confused?


hm, I just read about retf here:
http://stackoverflow.com/questions/1396909/ret-retn-retf-how-to-use-them

and.... I think, personally, the push-push-retf is more readable. By
pushing the values into the stack and do far return, it's easy to
interpret that "we jump into return value which we should find in
stack"

The readability I point here is more like "do goto vs don't do goto".
Although in assembly, we're not forced to do everything structurally,
but it's better to avoid it. Let me guess, the context of the above
"retf" is to exit from somekind of "function"?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

      reply	other threads:[~2011-03-13  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 10:34 SPI over GPIO Alexandru Caramida
2011-03-11 10:44 ` Tirtha Ghosh
2011-03-11 11:08 ` Kaustubh Ashtekar
2011-03-11 16:31   ` Vic
2011-03-12 21:03     ` LILO jump/retf question Andrzej Kardas
2011-03-13  8:31       ` Mulyadi Santosa [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=AANLkTikfM584pCemBdxmzxcc24jJQqntbA_5Z7mnVj5g@mail.gmail.com \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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).