"writing a C compiler in VB!"
"writing a C compiler in VB!"
Possible but no, not a good idea!
Summed up (I just had to get in on this conversation ;))...
No language is perfect. Every language has their ups and their downs. You choose which language suits your ups, and the downs are take-able (able to be delt with). It's not hard to see the ups and downs of Assembly. It's quick, it's efficient, the programmer has all control. And, there are the downs: it's hard to debug, hard to make use of resources and just plainly hard to read. It's hard to code. It takes long. But, as a programmer and with my "department" of programming, I choose Assembly because I think the ups outweigh the downs. Some differ, because they do different types or programming. Both C and Assembly and very noble and great languages. They are my two favorites, actually! :D
^^ great assembly size opt competition, several per year..
Thanks! I think I'll enter, maybe...
This page is interesting
>>> it is increably fast and produces small tight code.
No. It can be incredibly fast and it can produce small tight code, the results are only as good as the author. It is easier to do the same with a modern optimising compiler.
Unless you really know your hardware, writing a routine in assembler can be counter productive. One needs to consider how cacheing, instruction pipelining, etc. etc., are performed in the chip. The developers of the compilers optimising software have done this for you.
>>> the fountain of useless information commonly known as an "Old Fart".
The characteristic of an old fart is that they live in the past. Surely, by advocating the newer technology over the old, I am exhibiting the the opposite trend. However, I, of course, don't give a damn about what you think about me, why should I?
>>> but why doesnt that show in his post?
I think my post gave clear and concise opinions/answers to the questioners question. What is wrong with that?
There are very few general applications for assembler these days. Where they exist, they are in small niches. (I routinely write assembler for one particular customer - they use Fairchild F8 microprocessors - a dead chip with no reliable compiler - niche). Otherwise it is speed of development/time to market and maintenance that rule.
Learning some assembler, (maybe at the conceptual level), may give an insight to general processor operations, however, with modern chips, (and the ever growing rate of chip development), there is little real point unless you are aiming at one of the niche markets.
One last subtopic. As I mentioned, I have seen simple ASM code and for some reason, I believe ASM can be fun. Again, maybe I feel that way because I have absolutely no knowledge of ASM. Nonetheless, I find incorporating ASM into a C++ program seems fun, interesting, and even innovative.
At what point do you learn to incorporate ASM code into C/C++? For example, do ASM books teaches the procedure or it is sort of like an individual discovery type of thing?
I understand completely that to incorporate ASM into C/C++ one must understand ASM well.
yea i want to know what kind of books would show how to implement inline asm kind of stuff?
>At what point do you learn to incorporate ASM code into C/C++?
>For example, do ASM books teaches the procedure or it is sort of like an individual discovery type of thing?
I do not know exactly what you mean with incorporating ASM into C/C++. There are two ways to use ASM in combination with C/C++.
1. Using inline assembly, if available.
2. Assembling external assembly-routines and link them with your C/C++ routines.
In most books, when learning C or C++, you don't learn assembly. Only books on subjects like assembly, computer architecture or related treat using mixed assembly and C.
A lot of compiler manuals on C and C++ compilers also have some chapters on mixed code.
>yea i want to know what kind of books would show how to implement inline asm kind of stuff?
Most compilers I've used, each had its own way of implementing inline asm. So I would suggest to check out the manuals of your compiler, you could also visit their site, if there is one.
>Some differ, because they do different types or programming.<
What type of programming do you do?
>> No. It can be incredibly fast and it can produce small tight code, the results are only as good as the author. <<
This is true. A good and experienced C programmer will write a faster program than a sloppy Assembly programmer. This is a very big, if not the biggest, aspect of how the program will turn out...