Operating system development--open A20

Source: Internet
Author: User

We mentioned in the previous article, how to make bootsect, of course, people are always greedy, production finished bootsect and think about doing setup, Setup main work is to open A20, enter the protection mode, and so on.

I. Introduction of A20

This is a historic issue, in Intel processor 8086, "segment: Offset" Maximum can represent the memory address is ffff:ffff, that is, 10FFEFh, but 8,086 only 20-bit addressing address bus, only addressed to 1MB, if you try to access more than 1MB memory address, There is no error, but back to the volume, that is, back to the 0000:0000 address, and from the zero start addressing, but to 80286, can really access to more than 1MB of memory, if encountered the same situation, the system will not be back to the volume addressing, which caused upward incompatibility, in order to ensure 100% compatibility, IBM came up with a way to use a 8042 keyboard controller to control the 20th address bit, which is the A20 address line.

Second, practical operation

Directly affixed to the code, but also intimidate readers hehe:

Open the A20 address line inal,0x92; Enter the South bridge chip oral,00000010b; Open the 2nd bit of the South Bridge chip (A20 control bit) out 0x92,al; Send the modified configuration back to the South bridge chip

Here's another way, not using the 8042 keyboard controller, the note has been said, and, this code to run under the privilege level of RING0, if you want to continue to operate later, require JMP instructions and enter the protection mode, we will introduce in the next article into the protection mode.

If you have any questions, you can contact me: email:[email protected]

If the reader friend also has the idea of developing the operating system, you can contact me.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Operating system development--open A20

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.