Page 3 of 3
Re: BIOS I/O function causing older systems to freeze
Posted: Tue Jul 07, 2020 1:17 am
by pranavappu007
Octocontrabass wrote:Only if you haven't made a mistake somewhere else
could you point me to areas or possible mistakes that I have done that can make this issue?
I don't know if it means something in real mode, but here is the gdt table I used to switch to 16-bit protected mode. This is the only thing left to actually do a check, I suppose.
Code: Select all
null_16: ;NULL gdt
dd 0x0
dd 0x0
gdt_code_16: ;code segment descriptor
dw 0xffff
dw 0x0
db 0x0
db 10011010b
db 00001111b
db 0x0
gdt_data_16: ;Data segment Descriptor
dw 0xffff
dw 0x0
db 0x0
db 10010010b ; 1 st flags , type flags
db 00001111b ; 2 nd flags , Limit ( bits 16 -19)
db 0x0
Re: BIOS I/O function causing older systems to freeze
Posted: Tue Jul 07, 2020 10:25 am
by pranavappu007
First of all, Thanks for eveyone for your support.
Yess, I got it working! PeterX told me about an
Unreal Mode as a possibility. But I didn't get it so I left it there. Later I thought well, let's check that out and found that processors have a
Descriptor Cache that don't clear when switching over to real mode, so you get this weird mode where you are running in 16-bit mode but can access upto 4GB.
So I thought maybe am in unreal mode and the bios using es:bx is causing problem. So, what I did is reset the segment registers to flush the descriptor cache before real mode. And that was it! It worked!! Thanks to all 3 of you for helping me out to narrow down the problem this much.
I think this is needed for older processors to function properly.