A20 Line: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Line 76: | Line 76: | ||
ret |
ret |
||
</source> |
|||
===Testing A20 line from Protected Mode=== |
|||
When in Protected mode it's easier to test A20 because you can access a20's set memory addresses using any odd megabyte address. |
|||
<source lang="asm"> |
|||
[bits 32] |
|||
; written by Elad Ashkcenazi |
|||
is_a20_on?: |
|||
pushad |
|||
mov edi,0x112345 ;odd megabyte address. |
|||
mov esi,0x012345 ;even megabyte address. |
|||
mov [esi],esi |
|||
mov [edi],edi |
|||
cmpsd |
|||
popad |
|||
jne a20_on |
|||
ret |
|||
a20_on: |
|||
</source> |
</source> |
||