Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / An OS from DB...?

Author
Message
Zach
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: Ms, USA
Posted: 10th Dec 2003 02:08
Just wandering...

is it possible to create an operating system with Darkbasic not dependent on windows.....?

Tupelo, Ms
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Dec 2003 02:33
No.

With our species on the edge of extermination,
with no prospect but a horrible death,
we actually played games.
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th Dec 2003 06:18 Edited at: 10th Dec 2003 07:46
Just to show that almost any question can be answered yes...

1)The fact is that there is notheing stopping you from writing a DB program that writes out Assembly language code, As well as having DB execute an assembly compiler to create the machine code. Albeit this is completely ridiculous.

2)Or if you wish write a DB program that spits out pure machine code.

3)You could probably write an assembler In DB that could generate A simple Disk Operating system.

4)You could technically write an OS launches off of DOS hence it would not be dependent on windows.
[edit after Indi's post]
(though understand that you will not be able to just compile an .exe directly in DB and run it. but you could write the tools in DB that would generate the code that could be an OS either off of DOS, or completely your own.)
Are any of these and more really pratical, no, but theoretically speaking If you can create a binary output, anything is possible just not necessarily sane.
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 10th Dec 2003 06:42 Edited at: 10th Dec 2003 19:27
Quote: "4)You could technically write an OS launches off of DOS hence it would not be dependent on windows. "

i think he meant, "could you make a program that doesnt need any help from any program, as in, if i were to put it on a blank hard drive, it would still run."

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Dec 2003 07:01
you can fake one like dos tho

ohh my crappy code how u look so tiredly old

zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th Dec 2003 07:42 Edited at: 10th Dec 2003 07:47
@Darwin

Yes, but I was giving just "some" of the possible ways to accompish an OS that is not dependent on "Windows".

From the question you also can't assume that the OS has to be for an 8086-pentium processor, nor does it necessarily need to reside on a hard drive. It could be an OS that runs in memory as a TSR; It could be a firmware, it could be an OS for simple stamp microprocessor or PIC.

It all depends on how you define OS. My Atari 65xe had an OS that was loaded into memory and took up 16K. Albeit it wasn't an OS like Windows.

Now even if it is based on the 8086 There is nothing that prevents you from writing an OS in Darkbasic that handles and uses Microprocessor intterupts and handles memory and resources. Obviouslu it wouldn't be an .exe that the darkbasic compiler outputs. an .exe is already dependent on an OS existing as well as a partioning scheme on the HardDrive. But all OS's need to have a compiler that can generate the machine instructions, and a way to tie into the processors interrupts. So you could build your own language compiler in DB. You can also use DB create a script interpreter, or machine code interpreter. You can than use DB to produce your own Files.

All I was trying to say is that there is almost always a way with ingenuity to do something. Andit is if you have a language that can output 1's and 0's technically you can write an OS. In fact it would be possible to write an OS in a text editor, Now how to and what tools/software you will use to get that code into memory and boot, well that is up to the person. The fact is that it can be done.

Last thought, You can write an os with an electronic device that can output voltages. Just look at a Pic chip programmer. Remember, there was a time when computers didn't have microprocessors at all, and relied on vacuum tubes and capacitors and such. No languages existed and programming was done by flipping switches (voltages) or patching cords all over the place to get simple addition results. Even early microprocessors were programmed this way and then by punch cards. Memory allowed storage of these programs, some of which eventually became known as OS's. Just the fact that A.Turring (spelling?) had thought about these machines even before the transistor or tube. In fact he had designs for a computer based on mechanical moving parts and gears. His prototypes even had mechanical memory. unforutnately the tools of his day didn't allow the precision to make the parts that he needed to fully realize his all purpose computational machine.

Well enough said. I am almost determined now to write an OS from DB.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Dec 2003 07:56
Ive provided some code to fake one if the game required something of that inside its entertainment shell.

Anything else is a big "waynek" mate, We have a saying here " Get yer hand off it Darryl" comes from the movie the castle.


You would have to have windows and directx installed to start with , get past MS liscencing requirements to even think about selling it, and rely on the MS operating system to be set up.

Another operating system in regards to drivers and hardware,it would be mockery to suggest it was an operating system in any regards.

Its such an abstract layer to even call it an emulated Operating system, but more akin to a file browser.

It would however be a brillaint waist of your time and effort to try tho, you should call it ClaytonsOS the OS you have when are not having an OS.


In regards to what the user requested I think he means is it possible for him to write one as compared to doing one in say assembly or C and quite frankly it would be way out of his league for the simple asking of the question, yet if he wants to make a file browser akin to DOS or something similar for his game I think that would be possible.

Xtree gold is a file browser/management tool and that could be designed easily.

lol OS indeed, Oh that made my day..
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th Dec 2003 08:48
Indi,

I feel that you have a limited vision of what the term OS entails. And that's ok. If you believe that the term OS only refers to your PC computer, then so be it. I would ask you to understand that my interpretation of an OS differs from yours.

In reading your post about it having to have to have MS and directX and the rest of your post, I feel as though you perhaps don't understand what I am talking about. Of course to run DBPRO that would be the case. And to run any .EXE that the compiler generates that would also be the case. But the code that a DB program could generate (not an .exe but an output file that could get loaded into memory, or invoked from an interrupt; that is not the case.

I personally, would disagree that any other OS would be a "mockery".
I believe in firmware. Firmware that controls many of the devices that we use everyday. From traffic signaling, to smarter Microwaves, Elevators, Electronic devices, Control systems and guages, Smarter Vacuums that use fuzzy logic systems to detect soil, Smart balancing washer and dryers, Smart LAN Switches, Cable Modems, Health Devices for the disabled, Health monitoring equipment in hospitals, Smart tags to locate children or pets if they are missing, Etc..etc...
You see I do not limit myself to thinking of an OS only for PC's, but rather many types of computers.

Now, I also think that I expressed that I was just trying to show that sometimes a NO, can be a YES with some ingenuity. I was trying to be thought provoking with my post. I am well aware that It probably wasn't the exact question that the poster was asking. Then again I can't assume is intentions from one short question, nor the others that may read the post. The fact remains that It can be done.

The questions that I will leave you with are:
1)What programming language do you think was used to write the first programming language?
2)What OS do you think was running... wait, how was there an OS if the first programming language wasn't yet written?
3)What's wrong with writing a simple single or dual pass assembler for the 8086 instruction set in DB that can eventually produce the actual code for an OS? It may be slower than MASM or TASM but it can be done. And even the assembly instructions could be an output from a DB written script intpreter. How is that akin to a file broswer.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Dec 2003 09:12
your beating a dead horse yank.
to answer the kids question you should just say no its not within the limits of DBP but possible with a lot more knowhow.
go waist your time and do it if thats what floats your boat.
lol pendanticism++ should be your motto bro.
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th Dec 2003 15:53
Indi,
I respect your oppinion, and I will not hold on so tightly to my own to try to prove you wrong. There is no point in that. I also understand that my answer is argumentative and is in no way right, but does offer a view on what is possible when one believes it is. If I believe this way, it's really my problem and not yours to deal with. It's my own issue that I have with the ("is this possible in DB?") line of questions. I porbably did more harm in the way I expressed my oppinions and in this way, my ideas, were possibly less effective or directed as they could have been. in other words it probably wasn't helpful to the person or this site. For that I take the blame.

I just beleive that people shouldn't stop with one persons no answer, regardless of their status on this site ("moderators, admins... etc). I know that Rich was trying to save a long debate on something that may not be worth the headache and beyond the scope of what the language was designed for, and that many other tools exist that can proiduce OS code with exponentially less difficulty. I guess that I am just glad that LEE BAMBER stuck with his vision, and saw worth in developing a Basic language that could give begginnning programmers an evironment to realize their dreams. I am quite certain that many people told him "no!", or that a Basic language would never compare to c++/Assembly. I am glad he p[roved them wrong. And even if their aren't too many commercial quality games/apps/tools that come out of this language, it still was worth it. Dark Basic has delighted us, taught us, had many of realize dreams, or at least open us to new possibilities; and it was in that spirit that I decided to post my reply. If it isn't well accepted I can live with that.
I also know that Rich and yourself have gone to great lengths to help this community and application, far more than a few comments or paragraphs of my writing. I respect you for your knowledge, dedication, and steadfastness. I mean no harm. And now I will let this topic die.

Remember as Michael Abrash said
There Ain't No Such Thing As The Fastest Code. (TANSTATFC)

and 2 cent of advice.
Do not be limited by what was done yesterday, Do not just develope what you know can be done today;

Rather strive to open up to what was never thought possible for tomorrow. - ~zenassem (Edward Jomisko)
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 10th Dec 2003 19:26
Quote: "I know that Rich was trying to save a long debate on something that may not be worth the headache and beyond the scope of what the language was designed for"


but yet, he still failed...

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Dec 2003 10:12
I know a golden rule of computing is that most things are possible and Im not about to force feed anyone an opinion regarding it.
In context tho if the question was regarded as to whether its possible to do it with DBc / DBp and you had to ask the question in the first place then the easy answer is just to say no its not.
I wouldnt worry if you think its possible after so many abstract layers unless your keen to waist time tinkering with the notion, but sometimes thats where the best things come from, abstract thoughts that lead into amazing things.

Login to post a reply

Server time is: 2025-05-22 04:01:25
Your offset time is: 2025-05-22 04:01:25