A20: checking status

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
dronkit

A20: checking status

Post 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)
Slasher

Re:A20: checking status

Post 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
dronkit

Re:A20: checking status

Post 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
Slasher

Re:A20: checking status

Post 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
dronkit

Re:A20: checking status

Post by dronkit »

thank you, i'll see what can i find about it
Post Reply