Trouble with 2 Stage Bootloader - Calling 2nd Stage

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: Trouble with 2 Stage Bootloader - Calling 2nd Stage

Post by Antti »

Ready4Dis wrote:That just adds confusion for no reason, and I'm not even sure if it's supported in 16-bit mode?
It should be supported but you (and Octocontrabass) are right. There are absolutely no benefits. Intel says:

Code: Select all

IF instruction = near indirect JMP
   (* i.e. operand is r/m16 or r/m32 *)
THEN
   IF OperandSize = 16
   THEN
      EIP := [r/m16] AND 0000FFFFH;
   ELSE (* OperandSize = 32 *)
      EIP := [r/m32];
   FI;
FI;
Unneeded code removed. It was a good lesson and I have more confidence in this.
Post Reply