Page 1 of 1
Memory Wrap-Around (A20-Gate)
Posted: Sun Apr 20, 2003 8:30 am
by Perica
..
Re:Memory Wrap-Around (A20-Gate)
Posted: Sun Apr 20, 2003 8:51 am
by slacker
Perica: according to your tutorial on sourceforge:
Memory Wrap-Around does exactly what the name suggests, it makes the memory wrap around! So, for example - If you tried to Acess the Address 0xFFFF:0x0010 you would actually be acessing the Memory at 0x0000:0x0000
Re:Memory Wrap-Around (A20-Gate)
Posted: Sun Apr 20, 2003 8:53 am
by Perica
..
Re:Memory Wrap-Around (A20-Gate)
Posted: Sun Apr 20, 2003 8:53 am
by slacker
actually the tutorial was on BonaFide:(osdev.neopages.net)
Re:Memory Wrap-Around (A20-Gate)
Posted: Sun Apr 20, 2003 8:56 am
by slacker
btw perica. that tutorial was one of the best ive read on real mode.
Re:Memory Wrap-Around (A20-Gate)
Posted: Mon Apr 21, 2003 1:37 am
by Perica
..
Re:Memory Wrap-Around (A20-Gate)
Posted: Mon Apr 21, 2003 6:09 am
by Pype.Clicker
what if your BIOS decided to start the PC with A20 gate enabled ? some BIOSes do, some don't, some other have an option for it ...
Your code seems okay for me ... maybe you could try to invalidate cache entries before you re-read ...
Re:Memory Wrap-Around (A20-Gate)
Posted: Mon Apr 21, 2003 6:13 am
by Perica
..
Re:Memory Wrap-Around (A20-Gate)
Posted: Mon Apr 21, 2003 4:09 pm
by slacker
my A20 code(works):
Code: Select all
;---enable a20 line---
jmp enable_a20
wait_for_controller: ;this waits for kbd controller to process data
xor al, al
in al, 0x64 ;check port 0x64
test al, 0x02 ;check for bit 1=1
jnz wait_for_controller ;if not 1, loop until 1
ret
enable_a20: ;begin a20 enable
cli ;disable interrupts
call wait_for_controller
mov al, 0xD1 ;send 0xD1
out 0x64, al
call wait_for_controller
mov al, 0xDF ;send 0xDF
out 0x60, al
call wait_for_controller
sti
Re:Memory Wrap-Around (A20-Gate)
Posted: Mon Apr 21, 2003 8:32 pm
by Perica
..
Re:Memory Wrap-Around (A20-Gate)
Posted: Mon Apr 21, 2003 9:07 pm
by Perica
..
Re:Memory Wrap-Around (A20-Gate)
Posted: Tue Apr 22, 2003 2:43 am
by Pype.Clicker
perica, were you able to determine whether BOCHS's bios boots with A20 enabled or disabled ? it could help other people to know it, imho