User:Johnburger/Demo/Dev/A20

From OSDev Wiki
Jump to: navigation, search

There are actually two (potential) A20 Gate controllers on the PC:

  • One is the "fast" controller defined on the IBM PS/2;
  • The other is the traditional one that is accessed through the keyboard controller.

By giving the latter its own definitions, as though it was a separate controller to the keyboard (albeit with the same values), risks writing the same access routines for both A20 and the keyboard, instead of using common code. For example, very similar things need to be done to command the A20 gate versus telling the keyboard to light the Lock LEDs.

Demo/Dev/A20.inc

;
; Dev/A20.inc
;
 
; These are the definitions for the A20 Gate registers
Dev.A20.Fast.Port  EQU          092h
Dev.A20.Fast.A20   EQU          0000_0010b      ; Set this bit to Enable A20
Dev.A20.Fast.Reset EQU          0000_0001b      ; Set this bit to Reset PC
 
Dev.A20.Ctrl.Port  EQU          064h
Dev.A20.Ctrl.Read  EQU          0D0h
Dev.A20.Ctrl.Write EQU          0D1h
 
Dev.A20.Stat.Port  EQU          064h
Dev.A20.Stat.InFull  EQU        0000_0010b
Dev.A20.Stat.OutFull EQU        0000_0001b
 
Dev.A20.Data.Port  EQU          060h
Dev.A20.Data.Enable EQU         0DFh
Personal tools
Namespaces
Variants
Actions
Navigation
About
Toolbox