flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Int 15h Fn E820 question...

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 490
Location: Belarus
zhak
Hi, men!
Ralf Brown wrote:
Quote:
The BIOS is permitted to return a nonzero continuation value in EBX and indicate that the end of the list has already been reached by returning with CF set on the next iteration

Does it mean that the interrupt will complete with ebx = 0 and CF set, or ebx can be non-zero? As I understand what is written, BIOS defines ebx != 0, and on the next iteration it sets the carry flag with ebx not defined. This interrupt completes with ebx = 0 on my system and I cannot test the described condition.

The question bothers me much, because error state can be interpreted incorrectly in my routine.

Or maybe it is enough to do 'CMP EAX, 534D4150h' to check if error occured? This simplifies the algo slightly...
Thanks.
Post 11 Jul 2006, 09:35
View user's profile Send private message Reply with quote
fonolite



Joined: 14 Dec 2005
Posts: 32
fonolite
Once the iteration starts (<=> CF=0),
then you don't have to consider CF.

http://www.delorie.com/djgpp/doc/rbinter/id/50/17.html


if CF=1, the system doesn't support int 15h with E820h.


if CF=0, EBX++ and ES:DI is filled with memory map data,


when all iterations are done, EBX becomes 0.

The maximum value of EBX is the number of system memory map.
Post 12 Jul 2006, 04:01
View user's profile Send private message Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 490
Location: Belarus
zhak
Yup, fonolite, thanks for the link. I've read this for almost a hundred of times already Smile Yes, I understand what you've written, and it's true for almost all BIOSes (and all that I met), but what confuses me is that was quoted. That BIOS IS PERMITTED TO SET CF AT THE END. And it seems that Ralph dealed with such BIOSes. If I don't consider CF, then the code won't work correctly under the described circumstances.
Post 12 Jul 2006, 06:56
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.