Page 3 of 3

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

Posted: Mon Oct 19, 2015 3:24 am
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.