Page 1 of 1
A20: checking status
Posted: Tue Sep 24, 2002 8:51 am
by dronkit
is there a safe and all-compatible way of knowing if A20 is on? I'm using the AT method, via 8042. that should work on every known pc, right? (except xt, sure)
Re:A20: checking status
Posted: Tue Sep 24, 2002 1:55 pm
by Slasher
Use the method of setting the A20 line through the keyboard!!! It should serve you well for a wide variety of systems. you can also improve your chances by adding a test to see if a second method(ie the one that uses the system port for ps/2) should be called if the main one failed. No code or docs with me now so can't give any psuedocode or algorithms,SORRY!!
But this is the way to go!! ;D
Re:A20: checking status
Posted: Tue Sep 24, 2002 2:00 pm
by dronkit
i'm first trying the bios with
movw $0x2401, %ax
int $0x15
jnc A20_OK
fallback_to_kbdcontroller:
<a20 activation via 8042 code>
A20_OK:
<continue execution>
but i want to probe if this last method (8042) was successfull
Re:A20: checking status
Posted: Tue Sep 24, 2002 2:10 pm
by Slasher
you need to then read the status port!!!

send a read status port command to 0x64(i think its d1h)
wait for the command to be executed and the result to be written to the output port
then read the the output port
if the 2 bit(i think,no doc here to confirm

) is set then it was sucessful. the code to do this is short! search testing A20 bit on this forum!! ;D
Re:A20: checking status
Posted: Tue Sep 24, 2002 2:28 pm
by dronkit
thank you, i'll see what can i find about it