[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

1282.0. "Pure C" by PRNSYS::LOMICKAJ (Jeffrey A. Lomicka) Thu Apr 30 1992 21:35

Pure C is the latest version of Turbo C Professional, a C compiler,
linker, assembler, debugger, text editor, and code development
environment.  This is a variant of Borland's Turbo C, from Borland
Germany.

Gribnif Software is distributing the system in the U.S.  For a price of
$275, you get the Purce C software as it is distributed in Germany,
plus another disk that contains document that describes how to use most
of the features that aren't "obvious" and a program that helps in
converting C programs from K&R to Ansi.  (It mergers the parameter list
declarations in to the function prototype headers.)  The entire program
user interface is in English, but both the help system and the manuals
are in German.  Also, the comments in the provided sources (such as the
startup modules) are in German.

My observations after two days of use:

Having the documentation is German has not, yet, been a drawback for
me.  I don't read a word of German, but I tend not to read manuals
anyway, and dive right in and see what I can do without them.  The
summary document that Gribnif provides is a great help, and following
the PURE C thread in GEnie will help further.  I can still look up
things in the index and look at the "picture" (examples) to figure out
any obscure syntax.  All the system functions are in the help system, so
you can observe the parameter lists.  However, I usually just open the
.H file and look at the function prototypes.

The package is very complete, and runs great on both the Stacy and the
TT.  Support exists to optimize for 68030 instructions (or any 68000
family architecture), and code for hardware floating point can be
generated as well as the software floating point that is required for
normal ST's.

The "Project Manager" is a GEM application that integrates the text
editor, "MAKE" facility (which is not compatible with Unix "make"), and
the comiler/linker into a uniform environment.  You can also launch
your application and debugger from here.  You can call all the tools
from a CLI (such as NEO-CLI) as well, but I chose to get away from that.

The text editor is okay for fixing your syntax errors and stuff (you
double-click on an error message and it takes you straight to the
error), but it's not Emacs, and not nearly as powerful.

The debugger is AWESOME AS ALL GET OUT, and makes Mark Williams CSD
look like total crap (although making CSD look bad is not a
particularly challenging task).  I can't wait to start writing code with
bugs in it so that I can exercise this thing.  It's fast, and it loads
your screen with useful information.

The compiler is much, much, much, much faster than any I have ever used.

I'm in the process of converting all the Whack sources.  I do not yet
know how much faster or smaller the generated code will be.  I have to
convert many of the references to GEM, LineA, and TOS functions to use
the correct data structures and names, some of which are different from
Pure C than they were in MWC.  This will take a few days.  (I still get
a bizillion warnings because I don't have any function prototypes, but
the code will run.)

Bottom line:  If you have MWC and use actually use it a lot, junk it
and switch to Pure C, you won't be unhappy.  It's $275 well spent.  If
you haven't used C before, and can't guess what the commands and options
are from previous experience, and you don't read German, then you might
want to try Lattice instead.  (I've never tried Lattice.  I never did
learn to eat my vegetables.  (oh, that's Lettuce, never mind:-)).
T.RTitleUserPersonal
Name
DateLines
1282.1MIDIOT::POWERSBill Powers (Or a Facsimili thereof)Fri May 01 1992 12:159
Jeff,

     Does the assembler which comes with pure C use standard Motorolla
68000 notation?  That aggravates me when these compiler people don't
use the standard syntax.  MWC doesn't use it, neither does GNU.  Also
does the assembler have any support for macros and stuff, or is it a
bare bones assembler?  

Bill Powers
1282.2It's quite real - real instructions, real macrosPRNSYS::LOMICKAJJeffrey A. LomickaSun May 03 1992 02:5728
>     Does the assembler which comes with pure C use standard Motorolla
>68000 notation?

Yes!  Like 	"doit:	addq.w	#8,sp", it's all pretty normal.  You can
even get - I hope you are sitting down - A LISTING FILE!  (What is the
official NOTES icon for applying sarcastic intonation to written text?)

>does the assembler have any support for macros and stuff, or is it a
>bare bones assembler?  

Yes!  The macros can even accomodate data types of different sizes.  You
can say:

	MACRO Push.size parameter
		move.size parameter,-(sp)
	ENDM

to create

	Push.l	D0

or

	Push.b	char1

It get's more complicated but the book is in German.  I never did much
assembler work (unless you count all the DECbridge 90 firmware, but
since when did real work count :-), and when I do, it's not with macros.
1282.3Getting better all the timePRNSYS::LOMICKAJJeffrey A. LomickaWed May 06 1992 03:4024
The editor and environment is better than I thought.  Today I started
to work on some stuff in MicroEMACS, and switched to Pure C's built-in
editor.

What makes it more interesting:

- Put the cursor on any standard C library routine, and press HELP key,
and get help on the function.  (Of course, the help is in German, but
you get to look at the parameter list, which is what you want.)

But wait!  There's more!

- Put cursor on any AES, VDI, XBIOS, BIOS, or GEMDOS routine...same
thing.

and as if that wren't enough -

- Put the cursor on the name of any routine that you wrote, and is in
your system.  Press HELP key.  PC will open the file that contains the
definition of that routine (in another window), and drop your cursor on it.

Can you imagine a function called "visit-file-containing-function" in
your emacs environment?  Pure-C, being and integrated environment,
actually KNOWS where your functions are!
1282.4Tastes great! Less filling!PRNSYS::LOMICKAJJeffrey A. LomickaWed May 06 1992 03:4814
Whack (the multi-port version I'm working on now) is now running in
Pure-C.  It took a couple of days to Ansify all the libraries and
stuff.  There are still a few loose ends, but here's two numbers:

	Whack built with Mark Williams C 3.0.5, all debugging symbols removed:
		140651 bytes
	Same version of Whack built with Pure C, all debugging symbols removed:
		105952 bytes

A savings of 34699 bytes, or a savings of 24.67%!  Approximatey 1 in 4
instructions generated by Mark Williams C is not needed.

It generates this code from scratch in about the same time MWC takes to
just link the image.
1282.5No time to snackPRNSYS::LOMICKAJJeffrey A. LomickaSun May 10 1992 03:0617
Here's some more numbers that compare Mark Williams C to Pure C:

	Time to build Whack from sources in Mark Williams C, with RAM
	disk loaded, on TOS 1.4 (Stacy).
		32 Minutes and 38 seconds.

	Same version of Whack built with Pure C on the TT: (No FastRAM)
		3 minutes 0 seconds.

My development environment is now over 10 times faster than it used to
be.  Some might say that comparing the Stacy to the TT is unfair, so
here's one more figure:

	Whack built using Pure C on the Stacy:
		6 minutes 43 seconds

Okay, so it's really only about 4.8 times faster.  That's still quire a bit.