what is your interface?

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.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: what is your interface?

Post by Troy Martin »

Love4: Duly noted, will be changed for next version. Thanks, quite helpful :P I was going by some DS/ES setups to be == 07C0h but I guess that's a no-no! [-X [-X
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: what is your interface?

Post by JAAman »

actually, its not correct...

any bootsector that wont run if run at 07C0:0000 is flawed -- because many BIOSs actually do load it there -- some load it to 0000:7C00, others load it to 07C0:0000, and still others may load it to 50:07700...

basically, the only thing you can be assured is that whatever address it is, it will resolve to physical address 7C00


all properly written bootsectors will do one of 2 things:
1) will force CS to a specific, known value, with a FAR jump
or (my personal preference)
2) use only short branching (as long as you dont use any near instructions, there is no problem) and use a FAR to jump to the 2nd/1.5 stage

therefore, for chainloading other bootsectors, jumping to either 0000:7C00 or 07C0:0000 should work equally well (any bootsector that would have a problem with this is not properly written, and will fail on a large number of computers anyway)
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: what is your interface?

Post by Love4Boobies »

Nope, sorry. Not according to the BBS (BIOS Boot Specification)... I'm not saying that there aren't BIOSes that use other addresses to load the boot sectors in, but the flaw is in the BIOS, not the boot sector itself. Your solutions are for bogus BIOSes which do not follow the accepted standard.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: what is your interface?

Post by 01000101 »

I have a feeling you are refering to Phoenix's BBS... and that should explain the flaw in your statement.

It's A: Phoenix's and thus not universal.
and B: it was made in like '92.

A simple "JMP 0x0000:SYNC; SYNC: " should be all that's necessary.

back on topic:

My OS has a menu-based UI and you can find screenshots in the "Post a screenshot..." topic.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: what is your interface?

Post by Love4Boobies »

01000101 wrote:It's A: Phoenix's and thus not universal.
Compaq, Phoenix and Intel. I can't see why they'd all work together just in order to define Phoenix's interface. It's just like saying the VGA is not standard because it was IBM's way of doing things. Well, clearly; but it has become de facto.
and B: it was made in like '92.
1996. There are even older standards that are still in use.
A simple "JMP 0x0000:SYNC; SYNC: " should be all that's necessary.


Agreed (well, ALMOST all that's necessary).
back on topic:

My OS has a menu-based UI and you can find screenshots in the "Post a screenshot..." topic.
Can't wait for you to have a working website :) I'm curious how the only commercial OS around here is doing. My alpha-stage interface can also be seen in that section. Pending: icon support, lol (but I think otherwise, I'm pleased with how things are going).
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: what is your interface?

Post by 01000101 »

Love4Boobies wrote:
01000101 wrote:It's A: Phoenix's and thus not universal.
Compaq, Phoenix and Intel. I can't see why they'd all work together just in order to define Phoenix's interface. It's just like saying the VGA is not standard because it was IBM's way of doing things. Well, clearly; but it has become de facto.
[/quote]

ah, I skimped on some of the research, not sure how I missed Compaq and Intel.
Love4Boobies wrote: Can't wait for you to have a working website :) I'm curious how the only commercial OS around here is doing.
lol I'm not the only one developing a commercial OS here. I'll leave it at that though, I'm not sure if I'd be making a first announcement for someone.
TroyMartin is working on a website for me. Hope it turns out good. =)
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: what is your interface?

Post by Brendan »

Hi,
JAAman wrote:any bootsector that wont run if run at 07C0:0000 is flawed -- because many BIOSs actually do load it there -- some load it to 0000:7C00, others load it to 07C0:0000, and still others may load it to 50:07700...
Yes. Also, some BIOSs (in some old Compaq machines IIRC) think the boot loader isn't bootable if the first instruction isn't a JMP.
JAAman wrote:basically, the only thing you can be assured is that whatever address it is, it will resolve to physical address 7C00
Hmm, worst case would be something like 0xF7C1:0xFFF0.... :lol:


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: what is your interface?

Post by Love4Boobies »

All these things make chainloading a lot harder (and loading a 2nd stage altogether, since you don't want to read over the current executing code). Perhaps the only way of doing it right is using the BIOS stack to push the current address (using a CALL) and reading CS and EIP manually (using SP); only then set up a stack and chain copy the boot code.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply