OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:42 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: problems with address 0x00100000
PostPosted: Sat Jan 07, 2006 4:47 pm 
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


Top
  
 
 Post subject: Re:problems with address 0x00100000
PostPosted: Sat Jan 07, 2006 5:03 pm 
Offline
Member
Member
User avatar

Joined: Fri Nov 04, 2005 12:00 am
Posts: 381
Location: Serbia
Flat real mode? Memory area from 0x100000 to 0x10FFEF is known as HMA maybe DOS puts some drivers or TSRs there.


Top
 Profile  
 
 Post subject: Re:problems with address 0x00100000
PostPosted: Sat Jan 07, 2006 5:06 pm 
try the deleting the command in config.sys:DEVICE=C:\WINDOWS\HIMEM.SYS
that should stop dos from puting things in hma, mabey?


Top
  
 
 Post subject: Re:problems with address 0x00100000
PostPosted: Sat Jan 07, 2006 5:09 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 11:33 pm
Posts: 3882
Location: Eindhoven
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.


Top
 Profile  
 
 Post subject: Re:problems with address 0x00100000
PostPosted: Sat Jan 07, 2006 5:38 pm 
I made a test of A20. here it is:
Code:
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? :o I knew that entire >=20 bits were enabled when toggling A20 GATE. Am i wrong ???


Top
  
 
 Post subject: Re:problems with address 0x00100000
PostPosted: Sun Jan 08, 2006 3:17 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 11:33 pm
Posts: 3882
Location: Eindhoven
DIGIT4L_PUNK wrote:
... and I've got a question: when enabling A20 GATE, only 20th bit is enabled? :o 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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot], SemrushBot [Bot] and 79 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group