BIOS INT 0x15 AH=0xE801 question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
suslik
Member
Member
Posts: 45
Joined: Sun May 27, 2012 1:00 am
Location: Russia

BIOS INT 0x15 AH=0xE801 question

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: BIOS INT 0x15 AH=0xE801 question

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: BIOS INT 0x15 AH=0xE801 question

Post 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.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: BIOS INT 0x15 AH=0xE801 question

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: BIOS INT 0x15 AH=0xE801 question

Post 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.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: BIOS INT 0x15 AH=0xE801 question

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: BIOS INT 0x15 AH=0xE801 question

Post 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.
Post Reply