Page 1 of 1
Opening the A20 gate
Posted: Sat Apr 06, 2002 5:15 pm
by f2
Because my OS is going to be in Protected Mode, I'm going to have to open the A20 gate. Isn't it to use more than 1 meg of memory?
Anyway, can somebody tell me how to do it? Not just giving me code, but explaining what is needed and what is done and why and how. Thanks!
Re:Opening the A20 gate
Posted: Sun Apr 07, 2002 3:55 am
by df
There is code in the OS faq for doing it
http://www.mega-tokyo.com/os
Re:Opening the A20 gate
Posted: Sun Apr 07, 2002 5:32 am
by virtus
In real mode, you can only access memory below 1 Meg, in protected mode, you can access up to 4Gigs, when you have enabled the a20 gate..
a20 is controlled thru the keyboard controller..
A very good tutorial can be found at:
http://www.win.tue.nl/~aeb/linux/kbd/A20.html
Re:Opening the A20 gate
Posted: Sun Apr 07, 2002 8:47 am
by f2
Does that mean you HAVE to be in Protected Mode when opening the A20 gate, or can you be in Real Mode to open it?
Re:Opening the A20 gate
Posted: Sun Apr 07, 2002 9:10 am
by The_Legend
You can open it in real mode, then you can access even 64kb - 16 bytes more ram than 1MB, but some programs crash if you don't close it again (no problem if you are not running dos programs at all).
Re:Opening the A20 gate
Posted: Sun Apr 07, 2002 9:12 am
by f2
Well, what I'm going to do is just open the A20 gate (in my bootstrap) and then choose the file system and then load the kernel, so I don't have to worry about opening other programs and causing the system to crash. Thanks!