albertlee Posted May 19, 2004 Posted May 19, 2004 Can any body tell me how is C language different than Basic? I know quite about C language, but not Basic, tell me more about the main genuine principle of Basic..... And secondly, how do both of them play the role in OS (windows)? Albert
Dave Posted May 19, 2004 Posted May 19, 2004 They're two different programming languages, it's just that C is a lot more complex than Basic from the point of view of the programmer (i.e. syntaxically). Windows is mainly built from C/C++ I believe (either that or something like assembly for the most hardware intensive bits). Basic is used mainly by people who are just coming into the world of programming because it's an easier language to start from.
albertlee Posted May 19, 2004 Author Posted May 19, 2004 What is the purpose of Windows to include Visual Basic?then. Nearly every Windows has one..... Why?
Dave Posted May 19, 2004 Posted May 19, 2004 Windows doesn't include VB by default. You have to buy it from Microsoft, either seperately or as part of one of their Visual Studio packages. VB is used because it's an easy way to make programs with a graphical interface - doing the same thing in C/C++ is quite a bit harder.
albertlee Posted May 19, 2004 Author Posted May 19, 2004 no, Dave, I have VB in my Mircrosoft Office 2000............
Dave Posted May 19, 2004 Posted May 19, 2004 Yes, but it's not the full version of VB. That smaller version allows you to create small applications that you can embed into Word and help to alter the document. I've not seen it used a lot tbh. The full version of VB allows you to interact a lot more with various bits and pieces and build full applications.
albertlee Posted May 19, 2004 Author Posted May 19, 2004 how about Vbscript, can I make a program from that?
Dave Posted May 19, 2004 Posted May 19, 2004 No, that's a scripting language for things like HTML pages, and there's a few programs I know of that use it.
albertlee Posted May 19, 2004 Author Posted May 19, 2004 just for self wondering,.... In what circustances do Microsoft programmers use C lnaguage to program OS like Windows?
Dave Posted May 19, 2004 Posted May 19, 2004 I guess they'd use C to code most parts of the OS, at a guess. It seems like a fairly logical choice to me.
albertlee Posted May 20, 2004 Author Posted May 20, 2004 dave, I mean in what circumstances, like Do they programme a new OS under what other Operating System? using what compiler? Albert
Dave Posted May 20, 2004 Posted May 20, 2004 If you want to create a new operating system from scratch, it's rather a hard process. If you already have an existing version of the os, then it's pretty easy just to update your source code using the compiler tools/etc that you've already got.
admiral_ju00 Posted May 20, 2004 Posted May 20, 2004 What is the purpose of Windows to include Visual Basic?then. Nearly every Windows has one..... Why? VB is slightly easier to develop windows only applications because for many of the functions you get to use pre-defined code, such as for Buttons, Menu, etc. all you do is take these given tools, drop them on a form and then link them(make them functional) with the appropriate source code. Doing so purely in C/C++ would mean that every little thing has to be rewritten. But then again, that's why there's Borlands C++ Builder which is pretty much VB, same functions(drag & drop items), feel and look, but it uses C/C++ code. plus with VB it's easier to communicate with say SQL server. dave, I mean in what circumstances, like Do they programme a new OS under what other Operating System? using what compiler? in most cases or one of the ways, to start making a new OS from scratch, is to 1st design a new compiler, then using that compiler say it'll use ABLERTLEE code design an os. then use an assembly language to link the hardware with the software
albertlee Posted May 20, 2004 Author Posted May 20, 2004 in most cases or one of the ways' date=' to start making a new OS from scratch, is to 1st design a new compiler, then using that compiler say it'll use ABLERTLEE code design an os. then use an assembly language to link the hardware with the software[/quote'] Well, admiral, why do we need to design a new compiler, does'nt all C language use ANSI standard compiler for same CPU? Secondly, if we "have" the compiler, how do we actually program if there is no OS? or do we need to program an OS under another OS? Apreciate for responds Albert
admiral_ju00 Posted May 21, 2004 Posted May 21, 2004 Well, admiral, why do we need to design a new compiler, does'nt all C language use ANSI standard compiler for same CPU? i know a few highly experienced programmers who've done that either because their os isn't meant for the same architecture and or just cause they could do it. one of my friends recently was the head engeneer for pioneer and his task was to design an os that'll work on the pioneer digi boxes and he had to create a new compiler to do so. why, i don't know, but i'll try to catch him(kind of hard as he's still in the silicon valley) and ask. the time before that he was working with some high end printers(can't say which co. he worked for though for legal reasons) and had to do a very similar thing. some of the toys he has at least from the last time i saw him are: 3 sparks, 3 sgi's, 1 mac os X, a high-end midi mixer-something don't really remember...... and a host of other godly stuff Secondly, if we "have" the compiler, how do we actually program if there is no OS? or do we need to program an OS under another OS? it'll be programed under the os of your choise. since he's a hard-core c++ designer, the code can be made under windows, linux, unix, etc then it has to be ported to the system in question and recompiled. i haven't done c++ in a few years myself, but with c++, your ability to do things is only limited by your imagination(and skill ofcourse) which is something that everyother language lacks.
albertlee Posted May 21, 2004 Author Posted May 21, 2004 oh........admiral, if the OS is not on the computer, but for other devices, I am sure he needs to make a new compiler, because I believe no one has made a compiler yet for that device's CPU......... Secondly, if you want to program an 32 bit OS, can you still porgram that OS under 16 bit OS like Dos? thirdly, I cant understand why Dos cant be 32 bits if the computer "is" 32 bits........? Albert
albertlee Posted May 21, 2004 Author Posted May 21, 2004 it'll be programed under the os of your choise. since he's a hard-core c++ designer' date=' the code can be made under windows, linux, unix, etc then it has to be ported to the system in question and recompiled. [/quote'] Sorry, I forgot to ask....... if we program the code and ported to the system in question, how can people do compiling if there is no OS in that system? or is there any comiler which can work under CPU's without any OS? Albert
Sayonara Posted May 22, 2004 Posted May 22, 2004 Albert: Please be more patient waiting for replies. Coming online every 4 hours to post "anybody?" is getting quite irritating.
admiral_ju00 Posted May 23, 2004 Posted May 23, 2004 Sorry' date=' I forgot to ask.......if [b']we program the code and ported to the system in question, how can people do compiling if there is no OS in that system? or is there any comiler which can work under CPU's without any OS?[/b] Albert you do that through the use of MIPS Cards, ROM Chips and a Serial connection. i'm a little rusty on the details, but this is the general process: New OS is designed on an existing os, such as windows or unix. the code can be in C/C++ or whatever else is suitable for the task, maybe even Basic. MIPS cards is what will be used to compile the new OS on the new chip/cpu. It is the device that will translate the Code to asembly language (x86 Asembly won't work). Then on a ROM chip, you create some code that'll more or less function as a batch file which will get the stuff from the MIPS card, use the Serial Connection to the CPU and compile the OS on the chip. oh yeah, to port an OS unto a brand new CPU, say one for your Toaster, you MUST have the detailed specs and parameters from the CPU's manufacturer, otherwise you'll have no idea how to make the new os working on that cpu. and to get such a manual on the CPU at hand, you must obtain it from it's company and you must have a damn good reason for needing such a doc.
admiral_ju00 Posted May 23, 2004 Posted May 23, 2004 oh........admiral, if the OS is not on the computer, but for other devices, I am sure he needs to make a new compiler, because I believe no one has made a compiler yet for that device's CPU......... you can create a new compiler, but like i said in an earlier post, it would be very hard and a long project itself, and use it. but you can also use C Secondly, if you want to program an 32 bit OS, can you still porgram that OS under 16 bit OS like Dos? possibly, but how are you going to test it? it'll probably won't compile. computers, especially software are Backwards Compatible NOT Forward Compatible. So while working under a 32bit OS you can create stuff for both 32bit and 16 bit, same for 64bit > 32 > 16 > 8 > 4. The reverse is not true. so you can't develop something for 16bit and expect it to work on 32bit or 64bit meaning that the stuff written for a 8bit os might still run on 32bit, but a 32bit application will never run under an 8bit os. thirdly, I cant understand why Dos cant be 32 bits if the computer "is" 32 bits........? why? ms-dos is old, and dead. well, unless you want to rewrite ms-dos(16bit) to yoru own version of ms-dos(32bit) then do it. but still, why?!? command prompt under win2k or winxp is 32bit, i believe
albertlee Posted May 23, 2004 Author Posted May 23, 2004 Admiral, is'nt MIPS a CPU which is used to test how fast another CPU runs? And is'nt ROM is unchangeable, where BIOS is installed? Any way, my most question is...How do you compile the C code of an OS, like Unix? Is the compiler a software, or a device? To me, I think the best way to develop a new OS which is UNix kernel.... Apreciate for responds Albert
admiral_ju00 Posted May 23, 2004 Posted May 23, 2004 Admiral, is'nt MIPS a CPU which is used to test how fast another CPU runs? Yes, but they can do other things And is'nt ROM is unchangeable, where BIOS is installed? But you can still store information in ROM - Read Only Memmory So the OS does not nor can it write to the ROM, then this is accomplished through the MIPS Cards Any way, my most question is...How do you compile the C code of an OS, like Unix? Is the compiler a software, or a device? compiler is a software. To me, I think the best way to develop a new OS which is Unix kernel.... Not really understand that, perhaps you can elaborate on that for me. But, Linux/Unix kernel does compile/debug or link source code. Linux/Unix is just an operating system like Windows is. Linux Kernel or Unix Kernel or even Windows Kernel simly means it's the CORE operating system, the foundation of the OS if you will. What is slightly different between the 2, is that in Windows, a compiler does not come standard, well, maybe QBasic on older computers, so one must purchase one such as the case of Microsoft C++ for example. In Linux/Unix, it comes standard with the GNU libriaries as well as many different programming languages, examples of things found naturally in Linux are: Perl, Python, Java, C/C++ (Not Visual) and a host of others.
albertlee Posted May 23, 2004 Author Posted May 23, 2004 First of all, do we really need MIPS card to compile C code? is'nt there any software that can do it? Secondly, making an OS founded on UNix kernel is easier to do, because since unix kernel is open code, you can build the functions on unix kernel.... APreciate for the responds Albert
admiral_ju00 Posted May 23, 2004 Posted May 23, 2004 First of all, [b']do we really need MIPS card to compile C code? is'nt there any software that can do it?[/b] Only if you're going to port the code to a brand cpu chip one that does not have an OS. PC's don't need that for the most part, it's when you make other NEW equipments such as Cisco Routers, Digital Cable boxes, TiVO's, etc. Secondly, making an OS founded on UNix kernel is easier to do, because since unix kernel is open code, you can build the functions on unix kernel.... You're making this far too complicated than it should be. You can create a brand new OS from Scratch on ANY OS. Windows, Unix/Linux, BeOS, Mac, whatever, it does NOT matter.
albertlee Posted May 23, 2004 Author Posted May 23, 2004 Admiral, Do you think what I mean is that it is easier to build a new OS on unix? As you have said before, we can program the code on any OS..yes thats true, but that is not what I mean....... What I mean is we could make a new OS which has same kernel as Unix...Will it be possible? Secondly ,Can we simply use visual c++ to compile the code a new OS? Apreciate for furthur responds... Albert
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now