On Sun, 23 Sep 2012, K Arun Kumar wrote:
Hi,
I am trying to understand the x86 boot code where I encountered this assembly code fragment -
asm volatile("lcallw *%0" : : "m" (boot_params.hdr.realmode_swtch) : "eax", "ebx", "ecx", "edx");
"lcallw *%0" - what does this mean ??
Regards, Arun
You will find the answer in your assembler manual[0] and, of course, in your architecture's one. The 'lcallw' instruction is a long-call to the word in here: *%0 which is: take the address stored at memory address operand %0 which is boot_params.hdr.realmode_swtch and jump there. Please, CMIIW. Regards, Tobi [0] http://sources.redhat.com/binutils/docs-2.12/as.info/i386-Syntax.html (a seemingly outdated but sufficient mirror)