Dear All,
The snippet code as following is enable A20 for JOS. It has a problem which confuse for me. The "$0xdf" is a command, not data.
It should be out to port 0x64, which is command port. In fact, It port to 0x60, which is data port.
So, my question is : Why port to 0x60 (outb %al, %0x60) at last ?
seta20.1:
inb $0x64,%al # Wait for not busy
testb $0x2,%al
jnz seta20.1
movb $0xd1,%al # 0xd1 -> port 0x64
outb %al,$0x64
seta20.2:
inb $0x64,%al # Wait for not busy
testb $0x2,%al
jnz seta20.2
movb $0xdf,%al # 0xdf -> port 0x60
outb %al,$0x60
Best regard, Gapry