LILO jump/retf question

Mulyadi Santosa mulyadi.santosa at gmail.com
Sun Mar 13 04:31:52 EDT 2011


Hi....

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

On Sun, Mar 13, 2011 at 04:03, Andrzej Kardas <andrzej-kardas at 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



More information about the Kernelnewbies mailing list