Should I switch to "protected mode" in the first place?

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.
Locked
User avatar
Holus
Member
Member
Posts: 51
Joined: Thu Jan 27, 2011 5:57 pm

Should I switch to "protected mode" in the first place?

Post by Holus »

I'm making a database client that connect to a database server.
I want to make this client bootable on USB-stick so you can travel with it and use it as an Enqryption device to make contact to a server.

Wat does the client has to do:
  • Connect to the internet to contact the DATABASE server (only this server no web browsing)
  • Display database content tekst and pictures (NO PDF WORD or other documents)
  • SUPPORT of mouse, keyboard and VESA 1024x768 or more (Bankswitching is not a problem if this is the only thing)
There is no data stored on local disk.
Only thing stored is an encription key provided by server each time it contact the server.

Is there a reason to switch to PMODE other than RAM?
Computer says NOOOO
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by Solar »

Holus wrote:Is there a reason to switch to PMODE other than RAM?
Why do you want to do this on the OS level in the first place?

It sounds like your average Knoppix CD should do the job just fine...

(Seriously. What are your requirements for said DB client that you have to program it in kernel space? Taking some USB-booting Linux distro and writing your client in userspace - or taking some of the readily-available ones, even - is much easier, and you should have a good reason for not doing it.)

Edit: To actually answer your original question:
Is there a reason to switch to PMODE other than RAM?
What more reason do you need? Implementing anything in Real Mode is quite a hassle, and getting to protected mode is dead easy. (At least compared to the rest of the things on your to-do list.)
Every good solution is obvious once you've found it.
User avatar
Holus
Member
Member
Posts: 51
Joined: Thu Jan 27, 2011 5:57 pm

Re: Should I switch to "protected mode" in the first place?

Post by Holus »

Solar wrote:It sounds like your average Knoppix CD should do the job just fine...

(Seriously. What are your requirements for said DB client that you have to program it in kernel space? Taking some USB-booting Linux distro and writing your client in userspace - or taking some of the readily-available ones, even - is much easier, and you should have a good reason for not doing it.)
Knoppix is really cool stuff!!!

But why this webpage if you ask: Why to make a OS?
Windows 3.11 looks better then most OS I found here. And maybe even better then most.
What more reason do you need? Implementing anything in Real Mode is quite a hassle, and getting to protected mode is dead easy. (At least compared to the rest of the things on your to-do list.)
The problem is not switching to protected mode because the switch is hard to make, but making the hardware controllers yourselve if you only need the most things BIOS provides.
Computer says NOOOO
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by Combuster »

Holus wrote:if you only need the most things BIOS provides.
Behold!
Windows, Linux and BSDs proudly present what the BIOS can't do:

SOCKETS. \:D/



*cough*
Solar +1, you're really in the wrong place for this.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by Solar »

Holus wrote:But why this webpage if you ask: Why to make a OS?
This webpage is for those who can answer the question I asked. Before you set out on any software project, you have to make up your mind about:
  • What should it be capable of?
  • Is something like that already existing?
  • If yes, why do I need to re-invent it?
  • Do I have the knowledge, skill set, and spare time to actually make it happen?
These are questions you should have asked yourself. People going to help you in building the softwar e are more or less entitled to the answers, so we can judge if we're helping a worthy cause, or wasting our time (and yours, too).

Writing a database client in userspace can be done in a couple of hours up to a couple of months.

Writing an OS from scratch that is capable of supporting a database client - i.e., providing memory management, file I/O, network I/O, and a somewhat capable user interface - takes an order of magnitude longer. Another order of magnitude longer on top of that if you're looking at picking up the required knowledge as you go.

Check out this posting made by Brendan (who's easily among the most knowledgeable people on this board). Attempting to write an OS in Real Mode is more difficult than writing one in Protected Mode, not easier. That's why they invented Protected Mode. Trying to get around having to "make the hardware controllers yourself" shows two things:
  • You don't feel up to it.
  • You're looking for a shortcut.
Hence, I point out the easiest shortcut there is: Use one of the several existing, USB-booting host operating systems, and code what you really want (a database client) on top of that. Or use one of the many clients already existing. I might be unaware of some special requirement you have, so I'm asking you if there is one, and what it might be.
Every good solution is obvious once you've found it.
User avatar
Holus
Member
Member
Posts: 51
Joined: Thu Jan 27, 2011 5:57 pm

Re: Should I switch to "protected mode" in the first place?

Post by Holus »

  • What should it be capable of?
    I'm not capable, that's for sure.
  • Is something like that already existing?
    What on paper is what I want. Sure there is nothing exactly like it.
  • If yes, why do I need to re-invent it?
    Example: If it was reinventing the wheel and the valve on a existing wheel was not in te middle of the frame of the wheel, so i have to balance the wheel with extra weight to balens it. I should better make a wheel again with the valve exactly in the middle. Yes I'm stubborn :D
  • Do I have the knowledge, skill set, and spare time to actually make it happen?
    I'm creative,studious and stubborn. What more do you need??
These are questions you should have asked yourself. People going to help you in building the softwar e are more or less entitled to the answers, so we can judge if we're helping a worthy cause, or wasting our time (and yours, too).
I'm enjoying myself and I want to learn more. But I don't want to wast your time.

Writing a database client in userspace can be done in a couple of hours up to a couple of months.
The database I made is working. But I allways feel stupid when I start all this mallware to start the main function of the server. Be a DATABASE!!!

Writing an OS from scratch that is capable of supporting a database client - i.e., providing memory management, file I/O, network I/O, and a somewhat capable user interface - takes an order of magnitude longer. Another order of magnitude longer on top of that if you're looking at picking up the required knowledge as you go.
memory management and files are the main reason to make my own OS. Tha database is the fundament of its own. It uses itself to build the interface. Just like my database generate the interface to use it like it does now. Only one step ahead whit this project (hobby). Now it makes webpages as the database-structure support it lay-out and backwards. Just like an OS should be something like a selection. Select * from hardware where functions='needed' and hardware='supported'

Check out this posting made by Brendan (who's easily among the most knowledgeable people on this board). Attempting to write an OS in Real Mode is more difficult than writing one in Protected Mode, not easier. That's why they invented Protected Mode. Trying to get around having to "make the hardware controllers yourself" shows two things:
  • You don't feel up to it.
  • You're looking for a shortcut.
Hence, I point out the easiest shortcut there is: Use one of the several existing, USB-booting host operating systems, and code what you really want (a database client) on top of that. Or use one of the many clients already existing. I might be unaware of some special requirement you have, so I'm asking you if there is one, and what it might be.[/quote]

The question I ask is not:
Should I make an OS?
But:
What reasons to switch to protected mode.

You could had given the answer.
Protected mode is 32 bit and support hardware and documentation is mostly 32 or 64 BIT based. So if you want to make it in real mode you'll get stuck with 32bit addressing.
If you want to read the temperature of your shutdown button in the future.

But my question was. If I don't want to know the temperature of my shutdown-button.
The only thing I want to work is
  • networking (Yes most info is still provides even for MS-DOS)
  • input and output interfaces
  • display
  • and do not need a lot of memory
Then you answer could be simply:
Be carefull, because there is no mutch support on hardware in 16 bit mode and no mutch information on the internet.

And then I wasted just 5 minutes of your time. :mrgreen:
Computer says NOOOO
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by Solar »

*sigh*

OK, I'll be more blunt this time:

1) Real Mode means programming under severe memory and toolchain constaints. All you wrote so far gives the impression that you don't have a compelling (and well-informed) reason to do it, so I strongly advice against doing so. (You are aware that you cannot get either GCC or MSVC to generate Real Mode binaries?)

2) To quote from the Wiki, section "Required Knowledge": "You need to be able to read and write (technical) English at a competent level. Virtually all technical documentation is in English, and most of the resources you could find on the web (like this Wiki and the forum) are, also. Using incorrect terminology will make you look foolish and confuse the people willing to help you. "

You did misunderstand three of the four questions I listed, and were not able to answer the fourth clearly. To wit:
  • What should it be capable of?
I'm not capable, that's for sure.
What should it (i.e., your database client) be capable of. "A database client" is not a development goal. A precise list of desired features, ideally prioritized, is.
  • Is something like that already existing?
What on paper is what I want. Sure there is nothing exactly like it.
"What on paper is what I want." -- No idea what you are trying to say here.

"Sure there is nothing exactly like it." -- I didn't ask about "exactly like", I asked about "like". Since you didn't give a list of desired features, we cannot point you to a ready-made solution even if it would exist.
  • If yes, why do I need to re-invent it?
Example: If it was reinventing the wheel and the valve on a existing wheel was not in te middle of the frame of the wheel, so i have to balance the wheel with extra weight to balens it. I should better make a wheel again with the valve exactly in the middle.
To stay with the metaphor, We still have no idea which wheels you've been looking at, what kind of wheels you have in mind (wheelbarrow, motorcycle, truck?), and there's this nagging impression that, while having a "perfect wheel" in mind, you're trying to carve something square out of a piece of wood (which would make a valve in the middle rather pointless).
  • Do I have the knowledge, skill set, and spare time to actually make it happen?
I'm creative,studious and stubborn. What more do you need??
Trying to do it all in Real Mode is creative. Asking lots of questions here is studious. Taking offense while I'm trying to help you could be called stubborn. 8) None of it leads to results, though.

Another metaphor: Somebody who has never climbed a mountain in his live arrives at Mount Everest base camp and starts asking questions about how to best get to the top of the mountain. He might be looking for directions up, but any experienced mountaineer knows that the best directions for that person would be elsewhere, before he hurts himself (or others)...
Every good solution is obvious once you've found it.
User avatar
Holus
Member
Member
Posts: 51
Joined: Thu Jan 27, 2011 5:57 pm

Re: Should I switch to "protected mode" in the first place?

Post by Holus »

Combuster wrote:
Holus wrote:if you only need the most things BIOS provides.
Behold!
Windows, Linux and BSDs proudly present what the BIOS can't do:

SOCKETS. \:D/



*cough*
Solar +1, you're really in the wrong place for this.
Sockets???

That is no more than a listener to start an proces if something match a selection?
That is something you make yourselve in the IRQ-handler of your NIC for example.

Am I missing something?
Computer says NOOOO
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by Combuster »

Holus wrote:Sockets???

That is no more than a listener to start an proces if something match a selection?
To eliminate English as the likely contribuant to the problem: <Dutch>Weer een typisch geval waar je de klok hebt horen luiden en geen idee hebt waar de klepel hangt</Dutch>. In other words:
You need to be able to read and write (technical) English at a competent level. Virtually all technical documentation is in English, and most of the resources you could find on the web (like this Wiki and the forum) are, also. Using incorrect terminology will make you look foolish and confuse the people willing to help you.
You just tested positive for breaking forum rules as far as I am concerned.
Am I missing something?
<Blunt Dutch>Je bent op z'n best een beginner in programmeren. Het schrijven van een OS op dit punt is gewoon dom en daarom raadt iedereen voor je eigen bestwil het aan om iets (veels) simpelers te doen.</Blunt dutch> There are much better places to go in your current state, you will only meet frustration (from either end) here.

I hope you got the message this time.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by Solar »

Holus wrote:Sockets???

That is no more than a listener to start an proces if something match a selection?
That is something you make yourselve in the IRQ-handler of your NIC for example.
We obviously have extremly different ideas of what constitutes "a database client".

I'm working with database clients for a good part of my working day, so I doubt that my idea is that wrong... and yes, for my idea of "database clients" you need something like sockets...
Every good solution is obvious once you've found it.
User avatar
Holus
Member
Member
Posts: 51
Joined: Thu Jan 27, 2011 5:57 pm

Re: Should I switch to "protected mode" in the first place?

Post by Holus »

I'll not abusing this site again. I just go reading manuals I think.
Computer says NOOOO
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Should I switch to "protected mode" in the first place?

Post by AJ »

Locked - this is going nowhere. And Solar - I still haven't got used to your last avatar switch :D
Locked