C/C++ vs Assembler?
Re:C/C++ vs Assembler?
Do you know how long and hard it'd be to program a whole kernel in asm?
That's why they made UNIX in C!
That's why they made UNIX in C!
Re:C/C++ vs Assembler?
Your mad doing it in assembler, it will be much harder to do, take much longer and im betting you will get lost at points just because of the amoint of code you will have. Also i don't see why you think C/C++ is messy, in most cases it will be faster then ASM as unless your are a ASM Guru which you obviously arn't at the moment as you only know a little ASM. This is also debatable with a lot of people saying that modern c/c++ compilers do as good or even better job then an ASM guru, but that is debatable.
The one thing that is true is that a C compiler will probably produce better code then you until you learn alot more asm.
Peter
The one thing that is true is that a C compiler will probably produce better code then you until you learn alot more asm.
Peter
Re:C/C++ vs Assembler?
I use to like C/C++ until I started learning ASM . Its much easier to do some stuff in ASM, I use ASM for everything now Win32, Console, DOS Programs. Its just recently that I found out about OS Programming (6 days ago). I'm going to write my whole OS in Assembler because it creates smaller files , and you see exactly what machine instructions you gave to the computer. However I'm not using NASM, NASM bloats files up, I'm using FASM.
Re:C/C++ vs Assembler?
They made UNIX in C to keep compatibility
if you want to write a kernel in asm, you should look for
Primula in http://Robert.zizi.org
if you want to write a kernel in asm, you should look for
Primula in http://Robert.zizi.org
Re:C/C++ vs Assembler?
i'd imagen that writing the whole thing in asm would take longer and be much more mental straining. after writing this bootloader, ive also really started to like asm. i'm also desiding to write the kernel in C or asm. it is also possiable to combine the 2....... write some parts in C, other parts in asm.....that probbily what i'll end up doing.
Re:C/C++ vs Assembler?
I've decided to use assembly to. I don't care how easy c++ is, It's just never worked for me. Ive gotten text functions to work, but I tried graphics in djgpp for a while and it just didn't work. C++ is good for games, but I think in the long run asm will work best for my kernel. There seems to be fewer used assemblers for tutorials than C/C++ which is WAY less confusing to learn to do stuff with.
EDIT: Of course I am an OS n00b so if someone could help with djgpp It'd be greatly appreciated, and if I could do some in assembly and some in C/C++
EDIT: Of course I am an OS n00b so if someone could help with djgpp It'd be greatly appreciated, and if I could do some in assembly and some in C/C++
Re:C/C++ vs Assembler?
..
Last edited by Perica on Sun Dec 03, 2006 8:43 pm, edited 1 time in total.
Re:C/C++ vs Assembler?
Well then...if ASCII are numbers...and when you push 'a' how does the asm printf know that the 'a' is a number or letter? Since they can interchange...
Re:C/C++ vs Assembler?
..
Last edited by Perica on Sun Dec 03, 2006 8:43 pm, edited 1 time in total.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:C/C++ vs Assembler?
asm kernel, hu ? i had such f00l1sh 1d34 when i was about 18 ... then i learned C (i mean i *really* learned how to use it, not just the syntax of the for statement , and i realized that once your reach a certain amount of complexity (such as AVL or Btrees, memory allocation algorithms, etc.) things simply cannot be done in ASM anymore ...
Just because the code become too huge, you lose the track of what you"re doing ... you find yourself unable to correct a bug without introducing 3 new bugz ...
nah, believe someone who tried. 90% of the ASM code you write will be rewritten in higher-level language soon or late ...
Just because the code become too huge, you lose the track of what you"re doing ... you find yourself unable to correct a bug without introducing 3 new bugz ...
nah, believe someone who tried. 90% of the ASM code you write will be rewritten in higher-level language soon or late ...
Re:C/C++ vs Assembler?
..
Last edited by Perica on Sun Dec 03, 2006 8:43 pm, edited 1 time in total.
Re:C/C++ vs Assembler?
C/C++ is way too confusing when it comes to making an OS. Assembler is much easier to use for OS Developing. If you want to make an OS you'll have to learn Assembler anyway, plus anyone can make an OS in C/C++ but only a few can make an OS in pure assembler...
BTW Unix sucks.
BTW Unix sucks.