"Collins Chen" <"collins_chen"@ali.com.tw> writes:

> Hi Ron,
>      In ipl.S the machine code "e8 01 00" (is a short call) can execute because
> in real mode.
>      In start32.inc the same machine code "e8 01 00" can't execute because in
> protected mode, I find in protected mode, CPU always fetch 4 bytes as offset
> after machine code "e8". So I must back to real mode before invoke vga bios, but
> 
> then CPU still fetch 4 bytes as offset like in protected mode. I think maybe my
> code about back real mode is wrong. Can you give me some advice?
>      BTW, if CPU can execute "e8 01 00" correctly in protected mode?

Your code goes to real mode but it doesn't switch to 16bit mode.  I'm
not quite certain how such a contradiction can exist but it does.

Switch to a 16bit protected mode segment before switching to real mode
and it should work.

Eric


> 
> Regards,
> Collins
> 
> my code:
> 
>      movl %cr0, %eax          /*exit protected mode*/
>      andb $0xfe, %al
>      movl %eax, %cr0
> 
>      ljmp $0x8000, $realcc
> /*   jmp  realccc    */
> realcc:

Reply via email to