The 0x66 indicates that the JMP (0xEA) refers to six bytes. The default is refering to 64K (16 bits) in real mode or to 32 bits in protected mode (if I recall well). Having it increased, it also includes the segment descriptor, the index of the segment either in the GDT or the LDT, which means, that this code is making what is traditionally called a "long jump": a jump that cross beyond segments in the x86 architecture. The segment, in this case, points to the second entry on the GDT. If you look before in that program, you'll likely see how the GDT is defined in terms of the segment starting address and length (look in the Intel manual to study the GDT and LDT tables, 32 bit entry describing each segment).
+10
A:
Diego Sevilla
2009-02-13 07:59:05
Ah, this makes sense now. Earlier, when the GDT is defined the first entry is null (like the manual says), but the second is the code segment. After re-reading some parts of the manual I am seeing how this works. Thanks for clearing this up.
TURBOxSPOOL
2009-02-13 08:13:33
Then again, I am still curious why the author chose to do this instead of using the mnemonics.
TURBOxSPOOL
2009-02-13 08:14:55