TweetFollow Us on Twitter

CodeWarrior
Volume Number:10
Issue Number:1
Column Tag:Tools of the Trade

CodeWarrior from Metrowerks

A glimpse at a whole new development environment that goes head-to-head with Symantec.

By Dennis R. Cohen, Claris Corporation

Macintosh programmers started hearing rumors about Macintosh with PowerPC systems about a year before this writing and encountered sessions concerning these new models at Apple’s WorldWide Developer Conference six months ago. Native development tools were, to say the least, surrounded more by mystery than fact and the cross-development tools and environments presented received a less than enthusiastic reception. Unannounced at the WWDC and known to very few of the attendees, Metrowerks (a Canadian company which had previously focused on the academic market with Modula-2 and Pascal compilers) had decided to go “mainstream” with C, C++, and Pascal for both the 680x0 Macintoshes and M60x Macintoshes (PowerPCs). CodeWarrior is a choice of CD-ROMs containing up to nine compilers, two debuggers, PowerPlant (an object-oriented application framework and PowerPlant Constructor, the Application Builder), and Apple’s ToolServer and Source Server with all of the standard (non-compiler/assembler) MPW tools. Pricing was not finalized at the time of this writing but Greg Galanos, Metrowerks President and CEO, says, “ street price will be between $200 and $400, depending on the version.” There will be update and subscription programs available as well, à la ETO and Jasik’s Debugger; however, pricing of these programs has yet to be determined. See the section on Pricing and Availability at the end of the article.

Starting from the premise that their offering had to be available at or before release of the PowerPC, Metrowerks put more restrictions around their product. They decided that it should be at least as easy to use, fast, and as powerful as the very popular Symantec offerings; provide an application framework (written in C++) which facilitated application development and was competitive with (or superior to) THINK Class Library, MacApp, and Bedrock; and that, through testing with things like the Plum-Hall suites for ANSI C and C++ compatibility and use in development by a focused group of key Macintosh developers, it wouldbe “industrial-strength” at introduction.

Figure 1 “Muscle” being debugged in Metrowerks C++

At this time, it looks as though Metrowerks has succeeded in meeting its goals with CodeWarrior’s parts. The environment and compilers are written with Metrowerks C, and the application framework with Metrowerks C++ (just a switch setting in the preferences). Similarly, the debugger is written in C++ using PowerPlant (the application framework) as its basis.

Users familiar with Symantec’s THINK C or Borland’s MS Windows offerings will find the Metrowerks environment very comfortable. Development uses a “project-centric” approach and the projects can be used with either the 68K-targeted compiler or the PowerPC-targeted compiler. The debugger employs an interface similar to THINK’s debugger and SourceBug. The editor, like those beloved to so many Windows developers, employs optional colorization of comments and keywords and doesn’t require a project to be open to edit a file; otherwise, it is typical of other Macintosh programming editors. The ToolServer link is through a “ToolServer Worksheet” window, allowing some of the flexibility of MPW’s Worksheet. Below, you will see a screen dump off a 16” monitor that has the debugger running on a sample project that accompanies PowerPlant (Figure 1). Please be aware that some controls may change position slightly between now and the release. The project window is also bound to change slightly to incorporate features in the shipping release.

Editor

As I’ve mentioned above, the Metrowerks editor is fairly typical of professional Macintosh programming editors with a few nice additions. One is the above-mentioned optional color-coding of keywords and comments (which is carried over into the debugger source windows). As in the Finder, you can -click on the window name and get the full path in a popup. You can enable or disable “dynamic scrolling,” where the text scrolls as you move the thumb rather than after you’ve finished moving it. There is a status area at the bottom of the window telling what line you’re on, that if you click in it gets you a “Go To Line” dialog box. There are also two small popups at the bottom left of the window, one which displays a list of both system and application header files included in the window as well as selections to “touch” (mark for compilation) and toggle SYM-file generation and one which lists all the functions in the file (option clicking it displays them in alphabetic order). Selecting a function from the function list popup moves that function into view without moving the cursor. Selecting a header from the header list popup will open that header file. This popup is duplicated in the Project window for each file in the project.

The short answer to the obvious question for you BBEdit/ObjectMaster fans is, “No, there is no plug-in editor capability in this release,” but that may not be true of v1.0.

Compilers & Linker

Here the Metrowerks product really shines. The compilers are industrial-strength with good code-generation and optimization and even faster performance than the THINK C Compiler/Linker, often held up as the “turn-around” standard. While I am a cynic who believes that no product of any consequence ships without some bugs, I have encountered none in this release of the code generator, even after exercising it with some of the pathological cases reported on the Internet that trip up Symantec C++ 6.0.1. Since Templates will not show up before the 1.0 release, I cannot report on them here. For those MacApp programmers among you, the C++ compiler will also allow you to build MacApp 3.1 - the new pointer based version of MacApp that uses universal headers and support the 68K Macintosh and Macintosh with PowerPC systems. To accomplish this, all of the 68K based compilers support function-level segmentation (#pragma segment in C/C++, $SEGMENT in Pascal) if “Fast Link” is selected, which it should always be unless there is not enough memory to link your application.

The Toolbar, in addition to giving you a customizable push-button panel of menu equivalents, is also the location of the status information during compiles and builds (Figure 2). Since this is a floating window which obeys the Human Interface guidelines for such things, it disappears when you put the environment in the background during a build. Frankly, the things I have built have all been less than 50,000 lines so far and never took more than about a minute to build from scratch on a IIfx and incremental builds are just a few seconds. Due to non-disclosure agreements concerning prototype PowerPC hardware, I can’t say how fast the compiler is there (but I was very happy with it).

Figure 2 A build captured in progress.
Note the status information in the Toolbar.

As this is being written, we are dealing with pre-release materials and the Pascal compiler is the least mature of the compilers. Nevertheless, it appears to be (I only had it for a few days before this article’s deadline) a useful and usable compiler that implements MPW Pascal minus the object extensions. In other words, you have all the type-casting extensions and other non-object syntactic extensions to the Pascal language. Additionally, you get something which C programmers have held over Pascal programmers’ heads up until now, inline assembly support.

Inline assembly language support is present in both the C and Pascal compilers; however, it is at the function level only. You can declare a function as:

long asm foo()
{
  
}

and code it in assembler; however, you cannot inline blocks within a function.

During a compile with any of the compilers, error messages accumulate in a Message window. Selecting an error message and double clicking, option clicking or pressing Enter will bring the editor window forward positioned to the error line.

As implied above, the Linker is fast (a shade faster than the one in THINK C 6.0) and is as efficient as the MPW Linker in removing unreferenced functions.

Debugger

The debugger is reminiscent of SourceBug, MacBrowse, and the THINK Debugger. You click in the border area to set and clear breakpoints on a line of code. You have panes which show global and local variables and the calling chain. None of this is exactly new ground, but it is a well-done blend of the better source debugger features in a comfortable and consistent interface. The debugger on the 68K-based machines will debug only applications; however, the debugger on the PowerPC will debug both applications and shared libraries (Code Fragment Manager).

One nice feature is the “File Browser” window. This window lets you browse through all the files in the project and set breakpoints in files not being displayed in the Program Browser window. As in the main environment, you have a Toolbar available if you wish.

For those who desire more power in their debugging, such as those writing standalone code resources, Jasik Designs’ “The Debugger” works quite well with the optional SYM files generated by the Metrowerks compilers as does Voodoo Monkey. Obviously, Macsbug and TMON Pro can also handle assembly level interaction.

Documentation

Metrowerks documentation, if the prerelease manuals have been at all indicative, is going to set a new standard for comparison. They have a combination of the best features of the tutorial approach employed in their academic market Pascal compiler with some of the reference-material coverage common to the THINK and MPW manuals. It will be interesting to see, at least in the developer release, how documentation exclusively on disk (Apple’s DocViewer) will go over with the developer community as the only printed materials will be a Quick Reference Card and a 36-page “Getting Started” booklet. I have mixed emotions - I really like the idea of not having to make more shelf space for manuals and the convenience of electronic searching; however, I don’t normally read manuals at the computer (as opposed to looking things up).

One especially nice touch is the collection of “Tech Notes” written by people working on or with the developing software. These cover topics that don’t really fit in anywhere else, such as “Calling MPW C” or “Working with ToolServer”.

Other Pieces

ToolServer support is very nicely done, at least to my tastes. PowerPlant is a clean, easily-learned framework and the PowerPlant Constructor is a straightforward view/pane editor. SourceServer support is minimal, consisting of CheckIn, CheckOut, and honoring ckid resources in the editor. The environment includes a hook to THINK Reference 2.0, for those of you who have it and MPW’s 411 is available through ToolServer.

Pricing & Availability

The Developer release is scheduled for January, 1994 in the three flavors described below:

• Bronze (680x0 host and target): Pascal, C, C++, PowerPlant, PowerPlant Constructor (ViewEditor), ToolServer, SourceServer, all the standard MPW tools except compilers and asm, documentation on line (DocViewer), 68K debugger, ResEdit & Macsbug on a CD with a 36pg booklet. Street price is to be $199.

• Silver (PowerPC host and target): Pascal, C, C++, PowerPlant, PowerPlant Constructor (ViewEditor), ToolServer, SourceServer, all the standard MPW tools except compilers and asm, documentation on line (DocViewer), PowerPC debugger, ResEdit with an street price of $299. [This will only be shipped on introduction of the PowerPC. Bronze and Gold ship at Macworld. - Ed.]

• Gold: All the contents of Bronze and Silver with the addition of 680x0-based cross-compilers to the PowerPC for an street price of $399.

Purchasers of any Developer release offering will get a free upgrade to the equivalent 1.0 release. You may also apply the cost of a developer release version to obtain a more costly 1.0 release for the differential in average street price between the two.

Greg Galanos said that academic packages (unbundling of compilers) will be available as well; however, those policies have not been established as we go to press.

You will notice that the one thing that seems to be missing at this point is a PowerPC-based compiler that generates 68K code. For that, at least for the time being, we’ll get to use the 680x0 compilers in emulation.

While the compiler for the 68K family will generate code that runs under System 6 and/or on a 68000-based Mac, development requires at least a 68020 processor and System 7.

Metrowerks contact information:

In the US

Metrowerks Inc.

The Trimex Building, Route 11

Mooers, NY, 12958 USA

Canada & International

Metrowerks Inc.

1500 du Collège

Suite 300

St-Laurent, QC, H4L 5G6 Canada.

Phone: (514) 747-5999

FAX: (514) 747-2822

AppleLink: metrowerks, AOL: metrowerks

Internet: metro@info.uqam.ca

[Metrowerks won’t be selling this product directly, but we have arranged it so that you can order it through the MacTech Magazine Mail Order Store. - Ed.]

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Whitethorn Games combines two completely...
If you have ever gone fishing then you know that it is a lesson in patience, sitting around waiting for a bite that may never come. Well, that's because you have been doing it wrong, since as Whitehorn Games now demonstrates in new release Skate... | Read more »
Call of Duty Warzone is a Waiting Simula...
It's always fun when a splashy multiplayer game comes to mobile because they are few and far between, so I was excited to see the notification about Call of Duty: Warzone Mobile (finally) launching last week and wanted to try it out. As someone who... | Read more »
Albion Online introduces some massive ne...
Sandbox Interactive has announced an upcoming update to its flagship MMORPG Albion Online, containing massive updates to its existing guild Vs guild systems. Someone clearly rewatched the Helms Deep battle in Lord of the Rings and spent the next... | Read more »
Chucklefish announces launch date of the...
Chucklefish, the indie London-based team we probably all know from developing Terraria or their stint publishing Stardew Valley, has revealed the mobile release date for roguelike deck-builder Wildfrost. Developed by Gaziter and Deadpan Games, the... | Read more »
Netmarble opens pre-registration for act...
It has been close to three years since Netmarble announced they would be adapting the smash series Solo Leveling into a video game, and at last, they have announced the opening of pre-orders for Solo Leveling: Arise. [Read more] | Read more »
PUBG Mobile celebrates sixth anniversary...
For the past six years, PUBG Mobile has been one of the most popular shooters you can play in the palm of your hand, and Krafton is celebrating this milestone and many years of ups by teaming up with hit music man JVKE to create a special song for... | Read more »
ASTRA: Knights of Veda refuse to pump th...
In perhaps the most recent example of being incredibly eager, ASTRA: Knights of Veda has dropped its second collaboration with South Korean boyband Seventeen, named so as it consists of exactly thirteen members and a video collaboration with Lee... | Read more »
Collect all your cats and caterpillars a...
If you are growing tired of trying to build a town with your phone by using it as a tiny, ineffectual shover then fear no longer, as Independent Arts Software has announced the upcoming release of Construction Simulator 4, from the critically... | Read more »
Backbone complete its lineup of 2nd Gene...
With all the ports of big AAA games that have been coming to mobile, it is becoming more convenient than ever to own a good controller, and to help with this Backbone has announced the completion of their 2nd generation product lineup with their... | Read more »
Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »

Price Scanner via MacPrices.net

B&H has Apple’s 13-inch M2 MacBook Airs o...
B&H Photo has 13″ MacBook Airs with M2 CPUs and 256GB of storage in stock and on sale for up to $150 off Apple’s new MSRP, starting at only $849. Free 1-2 day delivery is available to most US... Read more
M2 Mac minis on sale for $100-$200 off MSRP,...
B&H Photo has Apple’s M2-powered Mac minis back in stock and on sale today for $100-$200 off MSRP. Free 1-2 day shipping is available for most US addresses: – Mac mini M2/256GB SSD: $499, save $... Read more
Mac Studios with M2 Max and M2 Ultra CPUs on...
B&H Photo has standard-configuration Mac Studios with Apple’s M2 Max & Ultra CPUs in stock today and on Easter sale for $200 off MSRP. Their prices are the lowest available for these models... Read more
Deal Alert! B&H Photo has Apple’s 14-inch...
B&H Photo has new Gray and Black 14″ M3, M3 Pro, and M3 Max MacBook Pros on sale for $200-$300 off MSRP, starting at only $1399. B&H offers free 1-2 day delivery to most US addresses: – 14″ 8... Read more
Department Of Justice Sets Sights On Apple In...
NEWS – The ball has finally dropped on the big Apple. The ball (metaphorically speaking) — an antitrust lawsuit filed in the U.S. on March 21 by the Department of Justice (DOJ) — came down following... Read more
New 13-inch M3 MacBook Air on sale for $999,...
Amazon has Apple’s new 13″ M3 MacBook Air on sale for $100 off MSRP for the first time, now just $999 shipped. Shipping is free: – 13″ MacBook Air (8GB RAM/256GB SSD/Space Gray): $999 $100 off MSRP... Read more
Amazon has Apple’s 9th-generation WiFi iPads...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Discounted 14-inch M3 MacBook Pros with 16GB...
Apple retailer Expercom has 14″ MacBook Pros with M3 CPUs and 16GB of standard memory discounted by up to $120 off Apple’s MSRP: – 14″ M3 MacBook Pro (16GB RAM/256GB SSD): $1691.06 $108 off MSRP – 14... Read more
Clearance 15-inch M2 MacBook Airs on sale for...
B&H Photo has Apple’s 15″ MacBook Airs with M2 CPUs (8GB RAM/256GB SSD) in stock today and on clearance sale for $999 in all four colors. Free 1-2 delivery is available to most US addresses.... Read more
Clearance 13-inch M1 MacBook Airs drop to onl...
B&H has Apple’s base 13″ M1 MacBook Air (Space Gray, Silver, & Gold) in stock and on clearance sale today for $300 off MSRP, only $699. Free 1-2 day shipping is available to most addresses in... Read more

Jobs Board

Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Business Analyst | *Apple* Pay - Banco Popu...
Business Analyst | Apple PayApply now " Apply now + Apply Now + Start applying with LinkedIn Start + Please wait Date:Mar 19, 2024 Location: San Juan-Cupey, PR Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.