Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!nuchat!moray!urchin!p6.f506.n106.z1.fidonet.org!Bob.Stout From: Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) Newsgroups: comp.lang.c Subject: Re: Turbo C 2.0 vs MSC 5.1 Message-ID: <17062.24BFD33F@urchin.fidonet.org> Date: 15 Jul 89 11:49:55 GMT Sender: ufgate@urchin.fidonet.org (newsout1.26) Organization: FidoNet node 1:106/506.6 - Fulcrum's Edge, Spring TX Lines: 70 In an article of <12 Jul 89 13:00:06 GMT>, (Fred Smith) writes: >I must admit that I have not had the opportunity to use Turbo C or >Zortech C, so I cannot offer a comparison--I just felt called upon to >correct the error stated in the previous posting. I do use all three professionally and would offer a few quick comments on the interrupt issue in particular and the three compilers in general... First of all, neither MSC nor TC give you any control over the local stack required by an ISR. The code posted showing ISR implementation in MSC was quite correct - i.e. it's not a daunting task. TC is perhaps a little easier to use, but both are comparable. Zortech provides a function `int_intercept()' which you pass a function name and a stack size. The specified function is passed all the registers in an array. The function's return value determines whether the you return immediately or if the previous ISR is chained to. There's no need for the non-standard "interrupt" keyword since any function can be an ISR, plus the programmer is in total control of the ISR's local stack. Note also that MSC does not properly support `volatile' although it does recognize it as a keyword - ZTC and TC do support it. So much for the posted code - any of the three can do the job without too much distress. ZTC's most powerful, TC's easiest, and MSC's OK, too. In general, MSC is the type of product usually described as a workhorse. It's quite good, but it's the type of product that inspires supporters rather than enthusiasts - a subtle but real distinction. MSC's manuals are the best of the lot, although you may get tired of wading through them before you find what you want. MSC's compile times are the worst of the lot. Even without optimization, MSC compiles slowly compared to the other two. MSC's optimizer works well, but is often overly aggressive, often breaking otherwise working code. The be safe, try to avoid loop optimizations or full optimization (-Ox or -Ol). MSC comes with Quick C to enable quick compiles prior to the "real" code generation pahse. Whenever the new QC 2.0 is shipped with MSC, it will make the whole package more appealing. Finally, if you're working with MS Windows or OS/2, it's probably the best way to go for now. The CodeView debugger was revolutionary when introduced, but has been passed by now. TC offers the fastest compile times of the three. A non-optimizing compiler, TC still has an excellent code generator and often produces the tightest .EXE files. Tyros and ex-Turbo Pascal programmers particularly are fond of its integrated environment, although impartial observers might prefer QC 2.0's. In general, TC is a good, competent all-around package with many rabid followers. On the negative side, everything in the TC package has a voracious appetite for memory. The integrated environment is almost useless for any large source files and the integrated editor neither supports windows nor source files over 64K (yeah, I know, but in the real world we sometimes have to deal with such beasts even if someone else wrote them!) If you're a pro, you'll likely use the command-line version of the compiler, your own editor and their excellent (but still memory-hungry) Turbo Debugger, sold separately or combined in the Professional Pack. But remember, watch out for your TSR's and carefully husband your memory - even the command-line compiler plus the librarian and linker eat memory like it's going out of style! Finally, Zortech - my personal favorite (your mileage may vary). Without optimization, it compiles almost as fast as TC. With full optimization, it slows down to MSC territory, but never breaks working code. It's .EXE sizes are often lower than TC and consistently better than MSC. Code quality is excellent and I/O speed is outstanding. The separate debugger is also excellent and can compete with TD. Originally marketed as Datalight Optimum-C, Walter Bright's compiler had an excellent reputation and cult following particularly among embedded systems programmers. ZTC continues to be an excellent compiler for embedded applications, though Zortech's marketing and support efforts are all directed at the C++ market. The compiler is modular, the only difference between the C and C++ compilers being the first pass parser/preprocessor - when you buy ZTC++, you get ZTC for free. Zortech has thrown in a few extras the mass market expects - pseudo-integrated editor, etc. - and they're generally quite good as well, but not up to the compiler's standards. One standout here is their resident help facility which may be used from within anybody's editor and includes library references. Fast, tight, and powerful - I use MSC and TC for clients, but for my own products, it's ZTC.