Page 1 of 1

BIOS INT 0x15 AH=0xE801 question

Posted: Thu Jul 12, 2012 2:15 am
by suslik
I've read from Ralf Brown's Interrupt List that INT 0x15 AH=0xE801 returns:
CF clear if successful
AX = extended memory between 1M and 16M, in K (max 3C00h = 15MB)
BX = extended memory above 16M, in 64K blocks
I wonder why
(max 3C00h = 15MB)
??? The maximum extended memory between 1M and 16M is 14 MB (3800h)!

May be it returns extended memory which is mapped to the address space between 1M offset and 17M offset, so one can determine is there ISA hole or not? In this case all is clear: if there is no ISA-hole and PC has RAM more than 16 MB, then
it returns 15MB.

Re: BIOS INT 0x15 AH=0xE801 question

Posted: Thu Jul 12, 2012 4:39 am
by Love4Boobies
suslik wrote:I wonder why
(max 3C00h = 15MB)
??? The maximum extended memory between 1M and 16M is 14 MB (3800h)!
Huh? Let me give you a hand with your arithmetic. 16 MiB - 1 MiB = 15 MiB between them. For more details on how to substract, click here.

Re: BIOS INT 0x15 AH=0xE801 question

Posted: Fri Jul 13, 2012 5:42 pm
by Firestryke31
Love4Boobies wrote:
suslik wrote:I wonder why
(max 3C00h = 15MB)
??? The maximum extended memory between 1M and 16M is 14 MB (3800h)!
Huh? Let me give you a hand with your arithmetic. 16 MiB - 1 MiB = 15 MiB between them. For more details on how to substract, click here.
Except you're forgetting that the documentation he's looking at lists the count as starting at 1MB, and then there's the ISA hole.

Re: BIOS INT 0x15 AH=0xE801 question

Posted: Fri Jul 13, 2012 6:03 pm
by Love4Boobies
Since first grade arithmetic seems to be too difficult, I decided to draw some segments, each representing 1 MiB. The first row of segments is the physical memory up to the 16 MiB mark. The second row of segments represents the memory which the interrupt function in question accounts for. If in doubt, please use your index finger to count how many of them there are. If you prefer, I can prepare a figure with longer segments.

Code: Select all

0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| (16 MiB)
    |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| (15 MiB)
                                                              ^
                                                     ISA memory hole may
                                                      or may not occupy
                                                     some or all of this
                                                             MiB.

Re: BIOS INT 0x15 AH=0xE801 question

Posted: Sat Jul 14, 2012 3:19 pm
by Firestryke31
Love4Boobies wrote:

Code: Select all

                                                     ISA memory hole may
                                                      or may not occupy
                                                     some or all of this
                                                             MiB.
Bah, I didn't realize the ISA hole was optional, since Wikipedia says there are still some things that use ISA internally. In that case, yes, 15MB is the max.

Stupid backwards compatibility and having/not having it.

Re: BIOS INT 0x15 AH=0xE801 question

Posted: Sun Jul 15, 2012 7:24 am
by Love4Boobies
The whole point of this interrupt is to tell you whether or not there is a hole and how big it is. Was the fact that it returns both how much memory there is in the range 1--16 MiB and the 16--64 MiB range seriously not a clue? If not, I believe the wiki is pretty explicit.

Re: BIOS INT 0x15 AH=0xE801 question

Posted: Sun Jul 15, 2012 11:38 am
by bewing
Firestryke31 wrote: Bah, I didn't realize the ISA hole was optional, since Wikipedia says there are still some things that use ISA internally. In that case, yes, 15MB is the max.

Stupid backwards compatibility and having/not having it.
On machines that support it, the ISA memory hole is enabled/disabled by the user from the BIOS -- depending on whether the machine has a board that needs to be mapped into that area.