Don't know what did I just fread() but:
*C/C++ are fake assembly is real.
Assembly is fake. I use butterflies to toggle each bit in the memory and write my program.
Invalid point.
*Assembly is easier for me.
Alright, I wouldn't argue on this one, everyone is different and assembly seems easier to many people than other high level languages.
Point Noted.
*It is ugly for me to use inline assembly within C.
Please don't limit the entire C/C++ programming language to a few compilers like GCC whose inline assembler may be challenging to work with.
Under MSVC you can do this:
Code: Select all
...
int function(int arg1)
{
int number = 5;
__asm {
mov eax, number
mov ebx, arg1
}
}
How's that?
And there's a term called linker (if you didn't know about it), you can write your assembler functions in your preferred assembler and then compile it to an object format, and use "extern"s from your C code.
Hence Invalid.
*C/C++ are languages of UNIX for UNIX and I don't want any UNIX part. I don't need UNIX clone.
I'm being honest here, this was the worst one.
Many (or most) OSes that we know and have reached a stage of sufficient popularity (both UNIX and non-UNIX) are written in C or C++. Alright we have a few of assembler OSes but I don't think they'll ever (and yes I'm
sure) be as good as their HLL written counterparts. Is Windows UNIX? I don't think so.
The reason why most of us use C is that it's a language that requires very less (actually no) runtime support if you're ignoring the stack and trivial environment setup, and with that you can access memory, low level I/O and whatnot. Most of us don't like working with assembly, because we aren't comfortable with it.
Hence, Invalid.
*I use assembly due to learning machine, operating system size and speed.
Compilers today aren't just translation machines they are optimization freaks too. I feel it depends, compilers are designed to (and this is one of the major reasons for their existence) to produce better and efficient code than assembly programmers.
Citation needed.