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
problems with address 0x00100000
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re:problems with address 0x00100000
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
try the deleting the command in config.sys:DEVICE=C:\WINDOWS\HIMEM.SYS
that should stop dos from puting things in hma, mabey?
that should stop dos from puting things in hma, mabey?
Re:problems with address 0x00100000
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.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 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
I made a test of A20. here it is:
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 ???
Code: Select all
mov word [ES:DWORD 0x001b8000],'! '
... 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
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.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 ???
So, if you can't get the A20 enabled, you'll have half your memory in 1M chunks with gaps.