Is it safe (and portable among Intel-compatible processors) to instead use:
Code: Select all
pushl %edx;
pushl $Offset;
lgdt (%ecx);
lret
I believe pushing 32-bits is correct for the selector, as a lret (retf) pops 32-bits for the selector and discards the top 16-bits (according to Intel )
This seems to work on Bochs and my Pentium 4, but I don't have other PCs to test it on. Does anyone else have experience of using this method?
Thanks in advance,
Fraser