From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Sun, 13 Mar 2011 15:31:52 +0700 Subject: LILO jump/retf question In-Reply-To: <4D7BDFA8.40201@o2.pl> References: <344296.43554.qm@web56301.mail.re3.yahoo.com> <4D7BDFA8.40201@o2.pl> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi.... Not a pro asm coder, but here's what I think... On Sun, Mar 13, 2011 at 04:03, Andrzej Kardas 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