Opening the A20 gate

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
f2

Opening the A20 gate

Post 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!
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Opening the A20 gate

Post by df »

There is code in the OS faq for doing it
http://www.mega-tokyo.com/os
-- Stu --
virtus

Re:Opening the A20 gate

Post 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
f2

Re:Opening the A20 gate

Post 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?
The_Legend

Re:Opening the A20 gate

Post 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).
f2

Re:Opening the A20 gate

Post 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!
Post Reply