Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Source based OS
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Anti Vigilante  
View profile   Translate to Translated (View Original)
 More options 4 Nov, 00:33
Newsgroups: alt.os.development
From: Anti Vigilante <antivigila...@pyrabang.com>
Date: Tue, 03 Nov 2009 17:33:15 -0700
Local: Wed 4 Nov 2009 00:33
Subject: Source based OS
I'm interested in the development of a source based Operating System.
Such is already possible in color Forth, but I get headaches when doing
postfix somersaults.

The idea is that after boot all software is either in source form in
folders on the filesystem or in binary form in a cache area which is
transparently accessed from disk or ram.

What it needs is three layers:
Editable area
- This is where source is loaded and manipulated
Workspace area
- The operating stack of editors, interpreters, and compilers as well as
scratch space is allocated here
Executable area
- This is where binaries ready for use are located

There are libraries of code but not in the traditional sense since
everything is compiled or reused as needed.

I'm also looking for the color Forth source code to model my work after.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 4 Nov, 07:24
Newsgroups: alt.os.development, comp.lang.forth
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Wed, 4 Nov 2009 02:24:17 -0500
Local: Wed 4 Nov 2009 07:24
Subject: Re: Source based OS
"Anti Vigilante" <antivigila...@pyrabang.com> wrote in message

news:1257294794.22260.32.camel@4k.amiga.home...

> [snip of OS development ideas]
> ...
> I'm also looking for the color Forth source code to model my work after.

Have you asked in comp.lang.forth? (added)

Rod Pemberton


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 03:03
Newsgroups: alt.os.development, comp.lang.forth
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Wed, 4 Nov 2009 22:03:56 -0500
Local: Thurs 5 Nov 2009 03:03
Subject: Re: Source based OS
"Anti Vigilante" <antivigila...@pyrabang.com> wrote in message

news:1257294794.22260.32.camel@4k.amiga.home...

> I'm interested in the development of a source based Operating System.
> Such is already possible in color Forth, but I get headaches when doing
> postfix somersaults.

FORTH is about the closest thing to a source based OS.  Most of the FORTH
system (OS and language) is in FORTH.  The reason is that most FORTH "words"
(subroutines or procedures) are written in FORTH.  There is only a small
subset of "words" (sometimes called "primitives") that are coded in assembly
(or C).  It's not likely that going to find that as a feature of other OSes.

>  ... but I get headaches when doing postfix somersaults.

Well, these might help:

http://forpost.sourceforge.net/forthwiz.html
http://www.cs.bgu.ac.il/~vassilii/forth-opt/

The second one *had* a working online Javascript page, but I can't seem to
locate it...  It has source as forth-opt.zip.  It was more complete.

The first one's source will have to be "grabbed" from the webpage.  It's
easy to modify.

> The idea is that after boot all software is either in source form in
> folders on the filesystem or in binary form in a cache area which is
> transparently accessed from disk or ram.

The binfmtc project allow one to treat C, C++, assembly code as shell
"scripts" by adding a comment:

Binfmtc
http://www.netfort.gr.jp/~dancer/software/binfmtc.html

> What it needs is three layers:
> Editable area
> - This is where source is loaded and manipulated
> Workspace area
> - The operating stack of editors, interpreters, and compilers as well as
> scratch space is allocated here
> Executable area
> - This is where binaries ready for use are located

It's your OS... (up to you).

> There are libraries of code but not in the traditional sense since
> everything is compiled or reused as needed.

...

> I'm also looking for the color Forth source code to model my work after.

My reply post made it to comp.lang.forth.  I'm not sure why nobody replied.

HTH,

Rod Pemberton


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 03:35
Newsgroups: alt.os.development
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Wed, 4 Nov 2009 22:35:28 -0500
Local: Thurs 5 Nov 2009 03:35
Subject: Re: Source based OS
"Rod Pemberton" <do_not_h...@nohavenot.cmm> wrote in message

news:hctfeh$8at$1@aioe.org...

> "Anti Vigilante" <antivigila...@pyrabang.com> wrote in message
> news:1257294794.22260.32.camel@4k.amiga.home...

> > I'm interested in the development of a source based Operating System.
> > Such is already possible in color Forth, but I get headaches when doing
> > postfix somersaults.

...
> The binfmtc project allow one to treat C, C++, assembly code as shell
> "scripts" by adding a comment:

> Binfmtc
> http://www.netfort.gr.jp/~dancer/software/binfmtc.html

It sounds like REXX might be of interest to programmers who don't like much
syntax:
http://www.freesoftwaremagazine.com/articles/fast_programming_with_rexx

Rod Pemberton
(dropped unresponsive comp.lang.forth)


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Passaniti  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:26
Newsgroups: alt.os.development, comp.lang.forth
From: John Passaniti <john.passan...@gmail.com>
Date: Thu, 5 Nov 2009 01:26:56 -0800 (PST)
Local: Thurs 5 Nov 2009 09:26
Subject: Re: Source based OS

> "Anti Vigilante" <antivigila...@pyrabang.com> wrote in message
> news:1257294794.22260.32.camel@4k.amiga.home...
> > I'm interested in the development of a source based Operating System.
> > Such is already possible in color Forth, but I get headaches when doing
> > postfix somersaults.

One such operating system is... Linux.  It's from four years ago:

http://bellard.org/tcc/tccboot.html

It's more a proof-of-concept toy than something useful, but I found it
amusing.  They started with a C compiler that fits in 100k of object
code and generates native code.  Then, they took a full Linux kernel
(2.4.26) with minor modifications to the code.  Finally, they added a
bit of code to aggregate all of the source files.  On my machine
running under VirtualBox, it compiles Linux from sources in about six
seconds.

And again, I'm not suggesting this is anything more than a toy.  But
it serves several useful purposes:

1.  It's a beautiful hack.
2.  It demonstrates a C compiler that is smaller than some Forth
implementations.
3.  It's wicked-fast, considering what it has to do.
4.  It shows that one could build an operating system that is
dynamically compiled from sources.
5.  It serves as a reminder to the Forth community that we're not
living in 1980 anymore.

Incidentally, elsewhere the C compiler (tcc) is being used in an
interesting way-- using C as a scripting language.  Building the
compiler into an application, one can extend that application in C,
issue code interactively and test it, and other tricks like using the
compiler as a library for dynamic code generation from within an
application.

So yes, the idea of an fully general-purpose operating system
dynamically built from sources can be done-- and has been done.  And
while tccboot was really just a non-trivial demo of the tcc C
compiler, one can easily imagine a more serious attempt.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexei A. Frounze  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:56
Newsgroups: alt.os.development, comp.lang.forth
From: "Alexei A. Frounze" <alexfrun...@gmail.com>
Date: Thu, 5 Nov 2009 01:56:35 -0800 (PST)
Local: Thurs 5 Nov 2009 09:56
Subject: Re: Source based OS
On Nov 5, 1:26 am, John Passaniti <john.passan...@gmail.com> wrote:

Oh, how I want that. And not just from the application, but from the
application under the debugger, including applications w/o source
code, just symbols or none at all. :)

> So yes, the idea of an fully general-purpose operating system
> dynamically built from sources can be done-- and has been done.  And
> while tccboot was really just a non-trivial demo of the tcc C
> compiler, one can easily imagine a more serious attempt.

Alex

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 10:18
Newsgroups: alt.os.development, comp.lang.forth
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Thu, 5 Nov 2009 05:18:04 -0500
Local: Thurs 5 Nov 2009 10:18
Subject: Re: Source based OS
"John Passaniti" <john.passan...@gmail.com> wrote in message

news:970abf57-7f0b-4536-9286-6a157c1aa61d@o10g2000yqa.googlegroups.com...

> > "Anti Vigilante" <antivigila...@pyrabang.com> wrote in message
> > news:1257294794.22260.32.camel@4k.amiga.home...
> > > I'm interested in the development of a source based Operating System.
> > > Such is already possible in color Forth, but I get headaches when
doing
> > > postfix somersaults.

> One such operating system is... Linux.  It's from four years ago:

> http://bellard.org/tcc/tccboot.html

Good call!

I was aware of tcc and tccboot.  But, I was interested in the C
compiler/compilation techniques and was uninterested in Linux being compiled
from sources.

> It's more a proof-of-concept toy than something useful, but I found it
> amusing.  They started with a C compiler that fits in 100k of object
> code and generates native code.  Then, they took a full Linux kernel
> (2.4.26) with minor modifications to the code.  Finally, they added a
> bit of code to aggregate all of the source files.  On my machine
> running under VirtualBox, it compiles Linux from sources in about six
> seconds.

Is there more info on what "minor modification" and "added a bit of code"
means?  And, did they do too much for anyone to recreate on a 2.6.x kernel?

A while back, I casually looked at porting tcc to DOS (via DJGPP).  It
seemed to be dependent on a number of advanced Linux C library calls.

> And again, I'm not suggesting this is anything more than a toy.  But
> it serves several useful purposes:

> 1.  It's a beautiful hack.
> 2.  It demonstrates a C compiler that is smaller than some Forth
> implementations.
> 3.  It's wicked-fast, considering what it has to do.
> 4.  It shows that one could build an operating system that is
> dynamically compiled from sources.
> 5.  It serves as a reminder to the Forth community that we're not
> living in 1980 anymore.

Nice summary.

> And while tccboot was really just a non-trivial demo of the tcc C
> compiler, one can easily imagine a more serious attempt.

For a non-Linux, simple OS, coded in C, I suspect one wouldn't need a C
compiler even as powerful as tcc/tccboot.  Tcc/tccboot could probably be
reduced substantially in terms of functionality and be sufficient to boot an
OS.  IMO, Ron Cain's ancient and very limited Small-C C compiler can compile
what's needed for an OS in C.  It only compiles a subset of C and is missing
some niceties like struct's, logical operators, floats, etc.  The x86
versions produce unbelievably horrid code, but the binaries execute.  Even
though it only uses two registers and the stack, the code doesn't execute as
slowly as one would expect.

Rod Pemberton


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
peekay  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 15:43
Newsgroups: alt.os.development, comp.lang.forth
From: peekay <pksharmakolk...@gmail.com>
Date: Thu, 5 Nov 2009 07:43:43 -0800 (PST)
Local: Thurs 5 Nov 2009 15:43
Subject: Re: Source based OS

> "Anti Vigilante" <antivigila...@pyrabang.com> wrote in message
> > I'm also looking for the color Forth source code to model my work after.

maybe following Ray's present attempts to explain
in text and movie formats will be able to give the
needed insight into colorForth source codes

another member (jmdrake) has also uploaded a
remarkable writeup

www.groups.google.com/group/Color-Forth
(look in *pages* and also *files* sections)


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Passaniti  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 21:13
Newsgroups: alt.os.development, comp.lang.forth
From: John Passaniti <john.passan...@gmail.com>
Date: Thu, 5 Nov 2009 13:13:35 -0800 (PST)
Local: Thurs 5 Nov 2009 21:13
Subject: Re: Source based OS
On Nov 5, 5:18 am, "Rod Pemberton" <do_not_h...@nohavenot.cmm> wrote:

> Is there more info on what "minor modification" and "added a bit of code"
> means?  And, did they do too much for anyone to recreate on a 2.6.x kernel?

The README that comes with tccboot describes the changes and the
archive has the 15k diff file to apply to the Linux sources.  I don't
see why this technique couldn't be applied to any version of Linux,
*BSD Unix, or any other operating system written in C.  But it would
be silly to do so.  tcc is not an optimizing compiler, so the code it
generates is far from optimal.  But that again isn't the point.  The
author wanted to show that tcc was complete enough to compile
something non-trivial (like Linux).

> A while back, I casually looked at porting tcc to DOS (via DJGPP).  It
> seemed to be dependent on a number of advanced Linux C library calls.

I haven't looked at the code for tcc recently, but can't imagine that
to be the case.  The core of tcc are routines that don't require any
library support at all.  Now, the version of tcc that you build into
applications probably has dependencies on libraries to read object
file symbol tables and other operating system specific stuff.  But you
would expect that given what it does.

Regardless, I brought up tccboot here because it shows what is
possible, not that one would actually want to do it with tcc and
Linux.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anti Vigilante  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 21:50
Newsgroups: alt.os.development
From: Anti Vigilante <antivigila...@pyrabang.com>
Date: Thu, 05 Nov 2009 14:50:41 -0700
Local: Thurs 5 Nov 2009 21:50
Subject: Re: Source based OS

Binfmtc seems like a good way to at least experiment with the ideas.

I'm going to finish my own little language shortly and then start diving
in.

I removed comp.lang.forth as I won't be needing it until I add it as an
interface to the different layers.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aleksej Saushev  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 22:35
Newsgroups: alt.os.development, comp.lang.forth
From: Aleksej Saushev <a...@inbox.ru>
Date: Fri, 06 Nov 2009 01:35:18 +0300
Local: Thurs 5 Nov 2009 22:35
Subject: Re: Source based OS

John Passaniti <john.passan...@gmail.com> writes:
> On Nov 5, 5:18šam, "Rod Pemberton" <do_not_h...@nohavenot.cmm> wrote:
>> Is there more info on what "minor modification" and "added a bit of code"
>> means? šAnd, did they do too much for anyone to recreate on a 2.6.x kernel?

> The README that comes with tccboot describes the changes and the
> archive has the 15k diff file to apply to the Linux sources.  I don't
> see why this technique couldn't be applied to any version of Linux,
> *BSD Unix, or any other operating system written in C.  But it would
> be silly to do so.  tcc is not an optimizing compiler, so the code it
> generates is far from optimal.  But that again isn't the point.  The
> author wanted to show that tcc was complete enough to compile
> something non-trivial (like Linux).

NetBSD kernel may be built with pcc, which is another small C compiler,
AFAIR changes were pretty minimal.

--
HE CE3OH...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rod Pemberton  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 22:57
Newsgroups: alt.os.development, comp.lang.forth
From: "Rod Pemberton" <do_not_h...@nohavenot.cmm>
Date: Thu, 5 Nov 2009 17:57:41 -0500
Local: Thurs 5 Nov 2009 22:57
Subject: Re: Source based OS
"John Passaniti" <john.passan...@gmail.com> wrote in message

news:abce87c8-cbdb-483e-a26a-91fab42b3ba8@t18g2000vbj.googlegroups.com...

> The core of tcc are routines that don't require any
> library support at all.

Ok.

> Now, the version of tcc that you build into
> applications probably has dependencies on libraries to read object
> file symbol tables and other operating system specific stuff.

Ah, yes, that's what I ran into.  Thanks.

> Regardless, I brought up tccboot here because it shows what is
> possible, not that one would actually want to do it with tcc and
> Linux.

Yes, but as a.o.d. is on the other side of this conversation (with at least
me on both...  ).  :-)

It's an interesting idea to use a compiler (or interpreter) for OS startup,
instead of precompiled binaries to start an OS.  Not only is the compiler
(or interpreter) being used to bootstrap the OS, but it's doing so in
realtime.  Except for FORTH, I'm not sure that's something we would've seen
done years ago, especially with compilation.

While it's not optimal in terms of speed, using a compiler or interpreter to
execute an OS can reduce complexity and allow rapid development of an OS.
Rapid development is important to OS development.  Typically, you've got one
man to do untold numbers man hours of work.  The OS could be compiled to
optimized binaries after the development work is done.

Rapid development is one of the reasons I chose C over assembly for my OS,
and why I chose DOS over Linux or Windows as the host OS.  Many intricacies
of coding in assembly are solved by the C compiler and DOS imposes few
limitations on execution of non-DOS code.

With my own in progress OS, I plan to wean it off of it's current C
compilers (and C library usage...) and rewrite it to use very minimal or a
subset of C or a language similar to a small subset of C.  I've already done
this for many personal applications.  So, examples of using tcc or Small-C
or pcc, or a de-obfuscated IOCCC C compiler entry is of interest.

Rod Pemberton


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
octavio  
View profile   Translate to Translated (View Original)
 More options 13 Nov, 12:05
Newsgroups: alt.os.development
From: octavio <octavio.vega.fernan...@gmail.com>
Date: Fri, 13 Nov 2009 04:05:28 -0800 (PST)
Local: Fri 13 Nov 2009 12:05
Subject: Re: Source based OS
On 4 nov, 01:33, Anti Vigilante <antivigila...@pyrabang.com> wrote:
> I'm interested in the development of a source based Operating System.
> Such is already possible in color Forth, but I get headaches when doing
> postfix somersaults.

http://sites.google.com/site/octaviovegafernandez/octaos
Boot loaders and kernel are in binary format ,everything else is
sourcecode (octasm,fasm) or object files if the source language is not
supported.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google