Page 2 of 4
Posted: Fri Jan 25, 2008 6:55 pm
by mathematician
bloodhound23 wrote:Before I give this a go, do you not realize that I can just disassemble this and look at the asm version?
That had occurred to me, but, since you are eschewing assembly language, that would be cheating wouldn't it?
Posted: Fri Jan 25, 2008 6:56 pm
by bewing
I am also very strongly tempted to create my own language. K&R C was quite nice. But ANSI mangled the language when they got their ugly mitts on it. What I am tempted to do is (in some sense) to recreate K&R C -- but then take it in the opposite direction of ANSI C, to its logical extreme.
The reason I think I can get away with this, is that I am probably going to be starting my own company in the fairly near future, to do manufacturing and prototyping. I will need to hire a programmer or two. And, as the boss, I can insist that my programmers work in my language. And even if all my source code gets dumped all over the web, it will still be completely proprietary, because nobody but me will have the compiler.
But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
Posted: Fri Jan 25, 2008 7:31 pm
by bloodhound23
mathematician wrote:bloodhound23 wrote:Before I give this a go, do you not realize that I can just disassemble this and look at the asm version?
That had occurred to me, but, since you are eschewing assembly language, that would be cheating wouldn't it?
mathematician: you're on, it's late at the moment though so...
Posted: Fri Jan 25, 2008 7:35 pm
by niteice
bewing wrote:But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
You get a lot in there:
- (Objective-)C
(Objective-)C++
Ada
Fortran
Java
and that's just languages. Let's not forget:
- C preprocessor
libffi
several libraries (most of which are easily reusable)
standard libraries/runtimes for all of the above languages
The C++ code itself isn't that huge.
Posted: Fri Jan 25, 2008 9:11 pm
by Brynet-Inc
bewing wrote:But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
To be fair, gcc-core-4.2.2.tar.bz2 is 18657 KB.. and that's the C compiler.. gcc-4.2.2.tar.bz2 includes the ada/fortran/C++/java and objective-C compilers. (
Plus test suites for each of those..).
GCC does stand for GNU Compiler Collection after all..
The BSD's are working on reviving the old PCC compiler, (
It was the one they used before switching to GCC...) - It's only 300 KB or so..
Posted: Sat Jan 26, 2008 5:28 am
by binutils
bewing wrote:I am also very strongly tempted to create my own language. K&R C was quite nice. But ANSI mangled the language when they got their ugly mitts on it. What I am tempted to do is (in some sense) to recreate K&R C -- but then take it in the opposite direction of ANSI C, to its logical extreme.
The reason I think I can get away with this, is that I am probably going to be starting my own company in the fairly near future, to do manufacturing and prototyping. I will need to hire a programmer or two. And, as the boss, I can insist that my programmers work in my language. And even if all my source code gets dumped all over the web, it will still be completely proprietary, because nobody but me will have the compiler.
But please, 250MB of source code for GCC? If that's what it takes to compile C++ code, then there is a serious problem with that language.
size:
http://fabrice.bellard.free.fr/tcc/
style:
http://plan9.bell-labs.com/magic/man2html/1/2c
HTH
--
PS: btw, no c++ is there.
Posted: Sat Jan 26, 2008 9:18 am
by bloodhound23
I restarted in C and asm using GRUB as my bootloader. I'll write my bootloader sometime in the future.
mathematician: your off
Posted: Sat Jan 26, 2008 9:54 am
by Jef
I miss the point....
What is that make your language spacial for creating an OS ?
btw, is there a C compiler that not uses windows libraries and outputs a native executable (like old .com files) ?
I mean like compiling with nasm assembler.
Posted: Sat Jan 26, 2008 10:06 am
by Alboin
Jef wrote:btw, is there a C compiler that not uses windows libraries and outputs a native executable (like old .com files) ?
I mean like compiling with nasm assembler.
Nwcc can produce output for various assemblers. (fasm, nasm, yasm.)
Posted: Sat Jan 26, 2008 12:45 pm
by inflater
Alboin wrote:Nwcc can produce output for various assemblers. (fasm,...)
You really think so? There is no such thing as "output" in FASM, except the final application. You can't link any object file in fasm.
Regards
inflater
Posted: Sat Jan 26, 2008 12:58 pm
by Alboin
inflater wrote:Alboin wrote:Nwcc can produce output for various assemblers. (fasm,...)
You really think so? There is no such thing as "output" in FASM, except the final application. You can't link any object file in fasm.
My bad, you're correct. There is no fasm back end. (yasm, nasm, and gas.)
Note, however, that by 'output', I meant assembly language output. So, I don't see why a fasm back end wouldn't be possible.
Posted: Sat Jan 26, 2008 1:00 pm
by bloodhound23
now just gas assembler.
Posted: Sat Jan 26, 2008 1:04 pm
by bloodhound23
fasm actually
Posted: Sat Jan 26, 2008 1:15 pm
by bloodhound23
in a custom assembler actually, I shall call it mokasm.
yeah I changed my mind a lot, but I swear this is the last time I do it. If I'm not going to create a compiler I might as well make an assembler(it's a little simpler)
Posted: Sat Jan 26, 2008 1:31 pm
by djtrickdog
better yet, you should make a C/C++/ASM based programming tool that bundles important codes together to make OS development Super fast. Example is to use one line of code say "Set_Pmode(parimeters)" would set your os into protected mode. That would all be front end but behind the scene they are actually writing the actual "long" code.
With this OS development would fly