• Please review our updated Terms and Rules here

Memory writes with DEBUG not being "retained"

Anonymous Coward

Veteran Member
Joined
Aug 11, 2004
Messages
1,555
Location
Shandong, China
I am using PC DOS 2K with empty autoexec.bat and config.sys.

I am attempting to setup an EBDA (extended BIOS data area) at memory location 9FC0:0000.

I am able to write the correct values into the normal BIOS Data area (0040:00XX) using DEBUG E command, but when I try to write to data to 9FC0:0000 the data is wiped as soon as I exit DEBUG. What's going on? I've heard that in some versions of DOS the EBDA is relocated to high memory (or sometimes low memory). I think EMM386 also does this, but I am not loading it.

Anyone familiar with PC-DOS 7.X know what's going on? 9FC0:0000 normally defines the length of the EBDA by the way.
 
It was my understanding that you don't define an EBDA, the BIOS does that, and the segment where it is located can be found at 40:0E. I also thought the EBDA was only applicable to PS/2 systems.

Is this a PS/2 system? If so, what segment does 40:0E refer to on a clean boot?
 
See: http://www.vogons.org/viewtopic.php?f=46&t=36122&start=120 Trying to convince DOS mouse drivers that a PS/2 mouse is available on the system.

I was under the impression that the EBDA wasn't used by the PS/2 mouse at all on a generic clone machine as none of them have ever shown less than 640k under plain DOS with the mouse installed.

I have only seen it used by LBA BIOS cards and EZ-Drive. Annoying because the Amnesia demo won't run because it only sees 638k of memory (hmm, I wonder if it could be patched?).
 
From what I understand all systems that use a PS/2 mouse use the EBDA. The reason you don't see it being reported it sounds like many versions of DOS move relocate it to either high or low memory. It is either done though EMM386 or IO.SYS (on MS-DOS). As most systems only use the EBDA for the mouse it is a waste of 900+ bytes of conventional memory, so DOS uses some tricks to get it back. Apparently this only applies to EBDAs that are 1kb in size. If you read the notes by FreeDOS developers you can see this is certainly the case, and they specifically single out MS-DOS.

Perhaps if you boot up with an old version of DOS you can see some of your conventional memory missing?
 
Apparently MR-BIOS doesn't use the EBDA:

"The original IBM PS/2 extends the standard BIOS data area by "stealing" the
top 1 Kbyte of precious Base 640K memory, reducing
it to an effective 639K. That area is sometimes called the Extended BIOS Data
Area ("EBDA"). It seems the only useful thing in there
is the PS/2 Mouse data storage. In contrast, MR BIOS is concerned with
conserving and optimizing memory usage. To this end, the
runtime MR BIOS image is condensed to maximize available Upper Memory Blocks
("UMBs"), and the wasteful EBDA is not
employed. Instead, the few PS/2 Mouse variables are stored in the standard
BIOS data area (where they really belong).
Unfortunately, from time to time you will come across a Microsoft Mouse driver
that assumes the EBDA exists unless you explicitly
tell it otherwise. To do so, you will need to create or edit the driver's .INI
file (usually MOUSE.INI or MSINPUT.INI)"
 
Back
Top