cox@bentley.UUCP (MH Cox) (03/15/88)
The following is a rather lengthy description of the new features of Microsoft C 5.1. This info came from the USAF Academy (who are acting as beta testers, product evaluators, etc. for the Air Force) and, as I understand it, is directly from Microsoft product literature (so take everything written with a grain of salt :-). Also, I've added a little editorial commentary, indicated by the '>' in the first column. Microsoft C Optimizing Compiler Version 5.1 Product Information Introduction Microsoft C Optimizing Compiler Version 5.1 is Microsoft's latest enhancement to its industry-leading C compiler, targeted for personal computers running the MS OS/2 or MS-DOS operating systems. Product Features Targeted for the professional applications developer, Microsoft C 5.1 supports the creation, compilation, and debugging of both MS-DOS real-mode and MS OS/2 real mode and protected-mode applications. This broad operating system support, together with outstanding code optimization, CodeView debugging, prototyping with QuickC, and a host of utilities, make Microsoft C Optimizing Compiler 5.1 the ultimate development environment. >The OS/2 support is new... MS OS/2 Support Microsoft C 5.1 fully supports both MS OS/2 and MS-DOS. Under MS OS/2 programs can break the 640K barrier of the MS-DOS environment. Applications can use up to 16MB of RAM and 1 gigabyte of virtual memory. Microsoft C 5.1 also supports the creation of dynamic link libraries and multi-threaded applications. Included in the package are a host of OS/2 utilities such as BIND and IMPLIB. To make OS/2 multi-thread and dynamic link library (DLL) programming easier, Microsoft has added the "dataseg" pragma and "_export" and "_loadds" statements. A "_saveregs" statement has been added to support an easy way to ensure that all registers are saved before an external routine is called. Included is an OS/2 Incremental Linker, a protected-mode editor, and a protected-mode version of CodeView that supports debugging of multi-threaded applications as well as dynamic link libraries. >Debugging multi-threaded programs should be interesting. If OS/2 >CodeView is as good at debugging OS/2 programs as MS-DOS CodeView >is at debugging MS-DOS programs, we should have a really >indispensible tool here. Debugging multi-threaded programs seems >like a nightmare to me. Code Optimization The Microsoft C Optimizing Compiler 5.1 is the fastest C compiler available for personal computers. Optimizations include loop enregistering to store the most commonly used expressions in registers, induction variables that turn multiplications by the control variables into additions, and constant folding that accomplishes most constant arithmetic at compile time and replaces the result in the generated code. >Same as MSC 5.0. But the big question is: do they work! :-) In addition, for nearly 20 intrinsic functions the programmer has the option of substituting inline code instead of the runtime library call. This would include functions such as inp, memset, memcpy, and strcpy. This form of procedure embedding can have dramatic effect on programs that make very heavy use of these intrinsic functions. >According to articles on the net, this was a very buggy feature >under MSC 5.0. Speaking of bugs... Prototyping with QuickC for MS-DOS Microsoft C 5.1 includes Microsoft QuickC, which lets programmers edit, compile, debug, and execute code in an integrated environment for real-mode applications. The QuickC environment provides an editor that helps programmers write code quickly. Supporting the Windows 2.0 keyboard interface as well as WordStar keystroke combinations, QuickC also supports bracket, brace, and parenthesis matching and a hot key to allow the programmer to switch back and forth between two source files. In addition, QuickC supports both 25- and 43-line screen modes on EGA monitors. >See related posting of mine on their new programming editor. >Briefly, it is a multi-window, multi-file, keyboard macro editor >that allows you to extend it by writing your own C-code and >linking it with an editor library editor! The integrated environment in QuickC gives the programmer an efficient, intelligent way to construct programs, including automatic MAKE file creation. For multiple-module programs, a MAKE file controls what source code is compiled and linked to create the final .EXE file. The MAKE file created by QuickC is completely compatible with the standard MAKE utility provided with all Microsoft languages. When it comes to fast prototyping, the best thing about QuickC is the speed at which a programmer can go from the creation to the compile, link, and debug cycles of application development. The integrated debugger in QuickC provides a subset of the popular CodeView's functionality. The integrated debugger allows programmers to single-step, animate, or execute at full speed. In addition, the QuickC debugger supports viewing the value of variables or expressions while the program is executing. >No new features here. Hopefully, it will be minus the bugs... CodeView Debugging Microsoft CodeView, included with Microsoft C 5.1, is a window-oriented source-level debugger that gives the programmer precise control of every step of the debugging process. Now, with full OS/2 support, CodeView lets you debug very large programs -- up to 128megabytes under MS OS/2. In addition, programmers can debug multiple-thread applications--freezing or single-stepping individual threads of execution within the >This I gotta see! It's tempting just to get OS/2 to watch CodeView >stepping through a multi-thread program! program being developed. CodeView can also debug dynamic link libraries (DLL). It supports VGA. With new support for the Expanded Memory Specification, CodeView can debug bigger applications than before under MS-DOS. Microsoft CodeView features a visual interface similar to Microsoft Windows 2.0 which, along with on-line help and plain English commands, make CodeView extremely easy to learn and use. Multiple windows let the developer simultaneously view source code, variables, registers, and the stack. While the program is executing, the programmer has access to viewing and manipulating all local and global variables. For the first time, the programmer can display data structures and interactively follow linked lists and nested structures ("data browsing"). In addition, programmers can set watchpoints and tracepoints to stop the program's execution when a certain condition becomes true or changes value. Since Microsoft CodeView is the debugger supplied with all Microsoft Languages, it debugs mixed-language applications. Users of Microsoft C can link Microsoft BASIC Compiler, Macro Assembler, and FORTRAN routines to their C application, plus QuickBASIC and QuickC on MS-DOS. CodeView completely supports all these languages. ANSI C Standard Compatibility The Microsoft Optimizing C Compiler 5.1 is a full UNIX System C language. In addition, C 5.1 complies with the latest draft of the ANSI standard for the C language. Microsoft, a member of the ANSI committee, is committed to validating Microsoft C for full ANSI conformance when a standard is formally adopted. >I wonder it they will support the infamous 'noalias' syntax, or >just give it half-hearted support as it did the unary-plus operator. Extensive Math Options Microsoft C 5.1 gives the application developer the choice of three math libraries, each of which has unique benefits depending on the hardware configuration of the target machine. If an 8087/287 math coprocessor is available, C 5.1 supports a very small, fast math coprocessor library offering 80-bit precision. A floating point emulator offers the same 80-bit representation, but does not require that a coprocessor be present (it will take advantage of the math coprocessor if one is present). If the developer is sure that a math coprocessor will not be present and needs the fastest possible math, he can select the alternate math package, which is faster than the emulator package and supports 64-bit precision. >Nothing new here... Memory Model Support Microsoft C 5.1 supports five memory models to provide the application developer the best possible flexibility. In addition to supporting small, compact, medium, large, and huge, the Microsoft C product was the first C compiler to bring mixed-model programming to the personal computer. This allows the programmer to mix memory models by using the NEAR, FAR, and HUGE keywords on data declarations. >Nothing new here... Product Background Microsoft C was first introduced in 1983. In 1985, Microsoft announced the Microsoft C Compiler Version 3.0. This was an entirely new product, the retail manifestation of the product Microsoft had been using internally for several years. Version 3.0 brought mixed memory model support to personal computer C compilers for the first time. In the summer of 1986, Microsoft introduced Microsoft C Optimizing Compiler 4.0 with CodeView providing source-level debugging. Offering huge performance gains over non-optimizing compilers, this product set the standard for optimizing C compilers for the personal computer industry. In the summer of 1987, Microsoft introduced Microsoft C Optimizing Compiler 5.0 and Microsoft QuickC. C 5.0 represented another step forward in optimization technology, and QuickC represented the ideal environment to both learn the C language and prototype C applications. >... and didn't ship until Nov 87! At the same time, Microsoft introduced Microsoft C 4.5 in the Microsoft OS/2 Software Development Kit. C 5.1 represents the OS/2 support from C 4.5 and the optimization enhancements from C 5.0. -- ========================================================================== Michael H. Cox ARPA: cox@garage.nj.att.com AT&T Bell Labs UUCP: ihnp4!bentley!cox 184 Liberty Corner Road COMPU$ERVE: 76525,3703 Rm 3N-D04 Warren, NJ 07060 (I'm not sure about the ARPA address!) (201) 580-8622 ==========================================================================