| | |
Creating an OS in visual basic 6.0
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
From what I remember, QBASIC was not only a programming language but a software environment as well - and therefore it ran somewhat like an interpreter? Meaning that you couldn't write a program in it that would be able to stand alone. The code had to be executed from within the QBASIC software program.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
•
•
•
•
Originally Posted by cscgal
From what I remember, QBASIC was not only a programming language but a software environment as well - and therefore it ran somewhat like an interpreter? Meaning that you couldn't write a program in it that would be able to stand alone. The code had to be executed from within the QBASIC software program.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
You can't make an OS in QBASIC. QBASIC can compile to .com files, but these run under DOS (ie. they use DOS interrupts to print to screen, get keystrokes, access disk etc.). You would have to start with C or C++ and write your own API for your OS. I've thought of doing this a few times, but it would be very difficult to make it work with all hardware (notice how even windows, which has an immense library of drivers, has trouble with this sometimes). Good luck though
.
. what? WHAT?
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 8
Hi Everyone,
Yes it is possible to use basic language to make an operating system but you cannot use visual basic as you need runtimes. The only basic compiler that i can think of for creating your own os is Rapid-q by William Yu. But this compiler will create all .exe files thus all you have to do is to write .asm codes to run the main desktop executable. As for common controls and dialog boxes these can be created using Rapid-q but the only problem i see is trying to create your own custom fonts which can be very very hard. As for the use certain libraries for the kernel you can use gpl dos programs like freedos.
I hope this helps you
Yous Sincerely
Richard West
Yes it is possible to use basic language to make an operating system but you cannot use visual basic as you need runtimes. The only basic compiler that i can think of for creating your own os is Rapid-q by William Yu. But this compiler will create all .exe files thus all you have to do is to write .asm codes to run the main desktop executable. As for common controls and dialog boxes these can be created using Rapid-q but the only problem i see is trying to create your own custom fonts which can be very very hard. As for the use certain libraries for the kernel you can use gpl dos programs like freedos.
I hope this helps you
Yous Sincerely
Richard West
•
•
Join Date: Jul 2004
Posts: 1
Reputation:
Solved Threads: 0
Creating an OS in visual basic 6.0 :rolleyes:
this is not possible atleast with vb bcuz vb program run
on windows platform even vbrun can't do
anything... :o vb sucks.... but VB.NET is something diffrent and i like
that
and if u r really want to code a OS :eek: than go for ASM
bcuz u can do anything in this language but remember it's
not a toy launguage like VB...u really needs to work hardddddd on
this language for many years
this is not possible atleast with vb bcuz vb program run
on windows platform even vbrun can't do
anything... :o vb sucks.... but VB.NET is something diffrent and i like
that
and if u r really want to code a OS :eek: than go for ASM
bcuz u can do anything in this language but remember it's
not a toy launguage like VB...u really needs to work hardddddd on
this language for many years
•
•
Join Date: Jun 2004
Posts: 4
Reputation:
Solved Threads: 0
i am sorry but no one here ans me correctly or i did not get it :lol:
what i wanted to know is that if some how realy magicaly if i am able to install the runtimes needed for VB is it possible to create an OS in VB i am saying this due to the fact that OS is not that complecated as they look only if u know what to do and what u want
the os i am trying to create is for backing up files when windows or lunix has crash so i just boot with my os boot cd and back up nothing else so if possible rec me some cool easy language to do this very thing :lol:
and please try to ans my first question in yes or no and if yes tell me the method to do it :lol: thx for all ur reply realy nice...
what i wanted to know is that if some how realy magicaly if i am able to install the runtimes needed for VB is it possible to create an OS in VB i am saying this due to the fact that OS is not that complecated as they look only if u know what to do and what u want
the os i am trying to create is for backing up files when windows or lunix has crash so i just boot with my os boot cd and back up nothing else so if possible rec me some cool easy language to do this very thing :lol:
and please try to ans my first question in yes or no and if yes tell me the method to do it :lol: thx for all ur reply realy nice...
My imaginary friend thinks you have serious mental problems. ! :eek:
•
•
Join Date: Jul 2004
Posts: 17
Reputation:
Solved Threads: 0
No, it is NOT possible to create an operating system with Visual Basic (any version), because they require certain runtime libraries. Pre .NET versions require a file called vbrunxxx.dll (where 'xxx' is the version, such as '300' would be version 3.0) VB for DOS (version 1.0) requires a VBRUN100.LIB in order to run. This is true, even if you create a "self-contained" EXE file. All of these libraries require you to have MS-DOS or MS Windows installed, because they all are linked to Microsoft's OS-specific code (interrupts, external DLL's, etc), and cannot run unless you have those libraries. And those libraries require OTHER libraries, which require OTHER libraries (such as gdi32.dll and kernel32.dll - hence, an OS).
As for QBasic, it is technically not possible to create an OS because it requires runtime modules (these modules are linked into the EXE if you create a stand-alone EXE file), and they also use MS-DOS interrupts, which would need to be programmed from your OS EXACTLY the way DOS does (in essence, re-creating MS DOS).
Although it is *TECHNICALLY* impossible, it is not impossible on a theoretical level. If you had the patience and knowledge, you could create your own compiler for QBasic so that it produces pure code (not interpreted like QB code). This would essentially be creating a similar compiler as to Linux's gcc or Borland's DOS compiler for C/C++. Then, you could require that the QB program (the BAS file, not the actual EXE) declare "include" statements to add runtime libraries for functions such as file I/O and screen printing (this is what C/C++ does).
What it all boils down to is this: It doesn't matter WHICH language you use to create your OS... as long as there is a compiler that will create code that does not require libraries to run. The outcome of this language would be a VERY small key word base (if you look up the keywords for the core C language [not including those functions provided by #include lines], then you'll find that there are only a handful of keywords).
So the ultimate answer to this question is... No, it's not possible to write an OS in VB 6 because the VB6 runtime libraries are copyrighted by Microsoft, and therefore, you cannot create the proper runtime librarires in order to create your own compiler in order to write an OS with it. Also, regardless of which language you use to write the operating system, you MUST use ASM to write your boot loader, as it requires some pretty low-level stuff to make the machine useable.
I hope this helps. If you are still interested in using a BASIC style language to create an OS, then I would suggest looking into either creating your own BASIC compiler (prefereably a 32-bit compiler), or finding a copy of BASM (a BASIC to ASM translator).
As for QBasic, it is technically not possible to create an OS because it requires runtime modules (these modules are linked into the EXE if you create a stand-alone EXE file), and they also use MS-DOS interrupts, which would need to be programmed from your OS EXACTLY the way DOS does (in essence, re-creating MS DOS).
Although it is *TECHNICALLY* impossible, it is not impossible on a theoretical level. If you had the patience and knowledge, you could create your own compiler for QBasic so that it produces pure code (not interpreted like QB code). This would essentially be creating a similar compiler as to Linux's gcc or Borland's DOS compiler for C/C++. Then, you could require that the QB program (the BAS file, not the actual EXE) declare "include" statements to add runtime libraries for functions such as file I/O and screen printing (this is what C/C++ does).
What it all boils down to is this: It doesn't matter WHICH language you use to create your OS... as long as there is a compiler that will create code that does not require libraries to run. The outcome of this language would be a VERY small key word base (if you look up the keywords for the core C language [not including those functions provided by #include lines], then you'll find that there are only a handful of keywords).
So the ultimate answer to this question is... No, it's not possible to write an OS in VB 6 because the VB6 runtime libraries are copyrighted by Microsoft, and therefore, you cannot create the proper runtime librarires in order to create your own compiler in order to write an OS with it. Also, regardless of which language you use to write the operating system, you MUST use ASM to write your boot loader, as it requires some pretty low-level stuff to make the machine useable.
I hope this helps. If you are still interested in using a BASIC style language to create an OS, then I would suggest looking into either creating your own BASIC compiler (prefereably a 32-bit compiler), or finding a copy of BASM (a BASIC to ASM translator).
•
•
Join Date: Jul 2004
Posts: 17
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by Crash
the os i am trying to create is for backing up files when windows or lunix has crash so i just boot with my os boot cd and back up nothing else so if possible rec me some cool easy language to do this very thing
www.knoppix.org
•
•
Join Date: Jul 2004
Posts: 17
Reputation:
Solved Threads: 0
That depends on what you consider "easy" and what you consider "programming". I don't think there's really a program like this out there (yet), but there is LFS (Linux from Scratch). However, LFS is FAR from "easy", since you have to compile most of it yourself, find your own packages, and compile most of them.
![]() |
Similar Threads
- Music Sequencer written in Visual Basic (VB.NET)
- Visual Basic Arabic Language (Visual Basic 4 / 5 / 6)
- Creating Web Proxy Servers in Visual Basic (IT Professionals' Lounge)
- I need suggestions for creating a Help system for a Visual Basic Program. (Visual Basic 4 / 5 / 6)
- The Move.....Visual Basic 6, Visual Basic .NET ? (VB.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: VB6 Runtime error 7 Out of memory
- Next Thread: How do I Click the Command Buttons In other Executable Programs
Views: 31210 | Replies: 33
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





