4

Normally, the "Extended BIOS Data Area" (EBDA) is located at the segment stored at 0x0040:0x000E, but this is only true for EISA and MCA systems (at least that's what I found in various specs). This BDA Map says that on older systems, the word at 0x040E is "LPT 4 port address", while on PS/2 systems it is indeed the EBDA segment.

How can you find out the location of the EBDA in older systems, and how can you find out that 0x040E points to it and is not describing something else?

1 Answer 1

12

Older systems don’t have an extended BIOS data area, so there’s nothing to find.

Systems with an EBDA place it at the top of conventional memory, i.e. usually as the last 1024 bytes (or in some cases, 2048 or 4096 bytes) before the 640K boundary. This can be used to check whether the value at 0040Eh points to the EBDA: you can compare it with the installed conventional memory size given by interrupt 12h or the word at 00413h; if it exists, the EBDA comes just after the end of conventional memory as indicated by that word.

A less reliable test is to check the number of installed parallel ports (interrupt 11h, or the byte at 00411h); if 0040Eh is non-zero and one or two parallel ports are installed, 0040Eh points to the EBDA.

The Undocumented PC only mentions the former test, and the Linux kernel’s EBDA detection also only relies on checking the given address against known memory boundaries.

6
  • 1
    The reason I asked the question is because there are systems with less than 640K of conventional memory (e.g. 512K), and I didn't think the EBDA could be found right after the conventional memory unless there is the full 640K (if there was less, there would be a gap). Also, I'm not sure if INT 0x11 can help, because the number of ports it can return seems to be between 0 and 3 (so it can't say anything about the 4th port).
    – DarkAtom
    Sep 22 at 10:59
  • 1
    The EBDA is in memory, so systems with only 512K with an EBDA (which would be surprising, but let’s imagine) would have the EBDA at the top of the 512K. The equipment byte indicates either 0 or 3 on systems with four parallel ports, so three is indeed inconclusive (I suspect however that systems with four BIOS-managed parallel ports don’t have an EBDA). Sep 22 at 11:37
  • I suppose that if the value at 0x040E is above 0x8000 or so, there isn't any real chance for it to be the address of a parallel port, right?
    – DarkAtom
    Sep 22 at 12:00
  • 2
    Right, I think it would be safe to conclude that. Sep 22 at 12:12
  • Some BIOSes have an option to choose whether EBDA is located at last 1k which does reduce available conventional memory amount by 1k, or located at 0:300h (or 30h:0 which is the same address).
    – Justme
    Sep 22 at 22:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .