Bootstrap Asm Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all:

I am very very new to kernel hacking. I have been reading lurking on
this list for some time and have to commend all you guys for the great
and friendly atmosphere.

As I was reading the bootstrap code (bootsect.S), I came across :
         movw    $BOOTSEG, %ax
         movw    %ax, %ds                # %ds = BOOTSEG
         movw    $INITSEG, %ax

$BOOTSEG gets assigned to %ax which gets assigned to %ds. I am also new
to assembly, but could the first two lines be made into a single line like
	movw	$BOOTSEG, %ds

Is this possible? or is there a reason for it going through %ax, which
appears to be a redundant middle-man since its immediately overwritten
in the third line.
         movw    $INITSEG, %ax

Thanks.

Anuradha Weeraman
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux