Page 1 of 1
problems with address 0x00100000
Posted: Sat Jan 07, 2006 4:47 pm
by DIGIT4L_PUNK
hi
I'm working on kernel image loader for DOS. I use flat-real mode to copy the image to the destination memory address (pointed by ES:EDI) when EDI = 0x00100000 (beginnig of the 1st megabyte) after the mem-copy is done, system hangs. and e.g. if EDI = 0x00200000 everithing works fine.
so, what's the problem? ???
keep in mind, I have Compaq DeskPro
Re:problems with address 0x00100000
Posted: Sat Jan 07, 2006 5:03 pm
by kataklinger
Flat real mode? Memory area from 0x100000 to 0x10FFEF is known as HMA maybe DOS puts some drivers or TSRs there.
Re:problems with address 0x00100000
Posted: Sat Jan 07, 2006 5:06 pm
by GLneo
try the deleting the command in config.sys:DEVICE=C:\WINDOWS\HIMEM.SYS
that should stop dos from puting things in hma, mabey?
Re:problems with address 0x00100000
Posted: Sat Jan 07, 2006 5:09 pm
by Candy
DIGIT4L_PUNK wrote:
hi
I'm working on kernel image loader for DOS. I use flat-real mode to copy the image to the destination memory address (pointed by ES:EDI) when EDI = 0x00100000 (beginnig of the 1st megabyte) after the mem-copy is done, system hangs. and e.g. if EDI = 0x00200000 everithing works fine.
so, what's the problem? ???
keep in mind, I have Compaq DeskPro
If your A20 doesn't enable properly, you're memcpy'ing to the IVT and further on. The very next interrupt (random-ish) will crash your system then.
If your DOS uses a HMA driver, that crashes your system if the A20 does work.
If neither of these, it should work.
Note, 0x200000 doesn't use A20 but A21 (and A[19..0]) so it does work if the A20 enable failed.
Re:problems with address 0x00100000
Posted: Sat Jan 07, 2006 5:38 pm
by DIGIT4L_PUNK
I made a test of A20. here it is:
Code: Select all
mov word [ES:DWORD 0x001b8000],'! '
It shoud print '!' on the screen if the memmory-wrapping was active.
... and I've got a question: when enabling A20 GATE, only 20th bit is enabled?
I knew that entire >=20 bits were enabled when toggling A20 GATE. Am i wrong ???
Re:problems with address 0x00100000
Posted: Sun Jan 08, 2006 3:17 am
by Candy
DIGIT4L_PUNK wrote:
... and I've got a question: when enabling A20 GATE, only 20th bit is enabled?
I knew that entire >=20 bits were enabled when toggling A20 GATE. Am i wrong ???
AFAIK, the A20 gate ONLY controls the A20 line. That means, the A21..A31 line are always on, but that doesn't matter since you can't access them from real-mode anyway.
So, if you can't get the A20 enabled, you'll have half your memory in 1M chunks with gaps.