Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old April 29th, 2007, 11:02 AM
Brackets Brackets is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 Brackets User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 38 sec
Reputation Power: 0
Stand Alone Compiler?

I'll use Windows as an example since I can guestimate more about it.

Say you make a compiler using java which runs from command line like:
java main.Main <filename>

The heirarchy is like this right?
your program is interpreted by java
java is of type .exe which is interpreted by the windows compiler/interpreter
the windows compiler/interpreter interprets to some sort of machine level code to execute the program

My question is, short of making up a new machine level code, could a programming language used for something like an OS kernel be made that is self sufficient? Would you have to make the compiler from assembly or something so that you would only need the compiler and the assembly libraries in the kernel? I cant seem to figure out how you could make your compiler/language a stand alone executable without having to have the system containing dependencies for other languages like C or Java or something.

Reply With Quote
  #2  
Old April 29th, 2007, 12:34 PM
Lux Perpetua Lux Perpetua is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: San Francisco Bay
Posts: 1,418 Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 47 m 34 sec
Reputation Power: 334
I think you have some misconceptions regarding how programs are executed and what compilers do.
Quote:
Originally Posted by Brackets
java is of type .exe which is interpreted by the windows compiler/interpreter
The program "java" is a binary executable, which means it is run directly on the hardware without an interpreter in between.

When you compile, say, a C program, the compiler creates a binary executable which runs directly on the hardware. Most of the time, the program must still rely on the operating system for certain resources. Of course, this is different for a kernel: the kernel has to access those resources directly and in turn provide an abstract interface to them for user programs.

Reply With Quote
  #3  
Old April 29th, 2007, 12:40 PM
Brackets Brackets is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 Brackets User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 38 sec
Reputation Power: 0
Definitely, I am confused. I think I confused myself more with that post than before. My question is: What is necessary (if possible) to have a basic operating system kernel built off of 1-2 languages, one that is created by the developer and I guess the other that is machine level code. I think that makes a bit more sense and is what I'm trying to ask.

**sorry for my newbie-ness

Reply With Quote
  #4  
Old April 29th, 2007, 12:54 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 1008
If what you're trying to say is 'can you develop a kernel in a high level language?', the answer is yes. There are compilers for smalltalk, scheme, haskell and many other languages that compile to kernel code with their own library functions (since you can't just link against glibc etc.)

Reply With Quote
  #5  
Old April 29th, 2007, 12:58 PM
Brackets Brackets is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 Brackets User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 38 sec
Reputation Power: 0
Alright, definitely bit off more than I can chew with this one, but I think I know what to do now. Thanks for your comments, hope to be back with some sort of coherent, useful information.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Stand Alone Compiler?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway