📄 a20.inc
字号:
;=========================================================;
; A20 11/12/03 ;
;---------------------------------------------------------;
; DOS EXTREME OS V0.01 ;
; by Craig Bamford. ;
; ;
; Enable the A20 line. ;
;=========================================================;
enable_A20:
pusha
cli ; Disable all irqs
cld
mov al,255 ; Mask all irqs
out 0xa1,al
out 0x21,al
l.5: in al,0x64 ; Enable A20
test al,2 ; Test the buffer full flag
jnz l.5 ; Loop until buffer is empty
mov al,0xD1 ; Keyboard: write to output port
out 0x64,al ; Output command to keyboard
l.6: in al,0x64
test al,2
jnz l.6 ; Wait 'till buffer is empty again
mov al,0xDF ; keyboard: set A20
out 0x60,al ; Send it to the keyboard controller
mov cx,14h
l.7: ; this is approx. a 25uS delay to wait
out 0edh,ax ; for the kb controler to execute our
loop l.7 ; command.
sti
popa
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -