I know i have asked this before, but i dont remember getting an answer, so here goes again.
How do you test/check if A20 is enabled or disabled?
Regards
testing testing (A20)
testing testing (A20)
This was supposed to be a cool signature...
Since you are only asking about detecting whether A20 is already enabled, there are 3 methods. The wiki mentions one specifically, and implies a second way.
Method 1 -- use memory map info to verify that 1M to 2M is not mapped to hardware, then probe the memory addresses at 0x7c00 to 0x7dff and 0x107c00 to 0x107dff and verify that they are different.
Method 2 -- standard method. Send a 0xD0 to keyboard command port 0x64. Read back the response byte on port 0x60 (with the proper waits, of course). Check bit#1 (with the value of 2) -- if the bit is set, A20 is on.
Method 3 -- Compaq method, now also a standard. Send a 0x20 to keyboard command port 0x64. Read port 0x60. If bit#0 (value =1) is set, A20 is on.
Method 1 -- use memory map info to verify that 1M to 2M is not mapped to hardware, then probe the memory addresses at 0x7c00 to 0x7dff and 0x107c00 to 0x107dff and verify that they are different.
Method 2 -- standard method. Send a 0xD0 to keyboard command port 0x64. Read back the response byte on port 0x60 (with the proper waits, of course). Check bit#1 (with the value of 2) -- if the bit is set, A20 is on.
Method 3 -- Compaq method, now also a standard. Send a 0x20 to keyboard command port 0x64. Read port 0x60. If bit#0 (value =1) is set, A20 is on.