Hi,
Doh - I got my "system" flag around the wrong way
HugeCode wrote:Do I have to make two realmode descriptors?
You can load an "executable, read-only" segment into ES, but you can't load an "executable, read-only" segment into SS, so you will need to make 2 descriptors.
HugeCode wrote:I don't think so because I'm not writing in it, after far jump I clear cr0:0 to turn pmode off and I make another far jump....
Are you sure that the "mov es, ax" causes the exception (and that the exception isn't caused by a different instruction afterwards)? If it's definitely the "mov es,ax" causing the exception then the only other thing is the GDT (e.g. dodgy GDT limit or something).
Also; I don't know which assembler you're using; and don't know what the "jmp es:0x8400" instruction is. Is it "jmp 0x8400" with an ignored segment override prefix, or is it "jmp [es:0x8400]" (near jump to the value stored at es:0x8400)? It looks like "jump to es:0x8400" but there is no such instruction.
Cheers,
Brendan