View Single Post
Old 31 December 2015, 09:10   #77
Olaf Barthel
Registered User
Join Date: Aug 2010
Location: Lehrte, Germany
Posts: 157
Originally Posted by gilgamesh View Post
Are the different compilers and assemblers needed because of subtle stuff in the generated code or is about different language standards?
It involves both.

For example, one reason why the code for intuition.library had not been ported to a different compiler was that the Green Hills 'C' compiler generated very tight and efficient, high quality code. No Amiga compiler available at that time could accomplish the same thing.

This was relevant because (of course) intuition.library had to go into ROM. Bugs caused by code generation issues would be hard to find (intuition.library is the single largest component in ROM; going over its compiler-generated code with a fine-tooth comb to look for defects would have been really hard) and to correct, and because intuition.library was part of the operating system which had to run properly at boot time, bugs in it would have been particularly crushing.

Also, the tight, efficient code generation allowed intuition.library to fit into ROM space (which always was a serious constraint on Kickstart development work) in the first place. No other compiler generated an intuition.library quite as short as the Green Hills 'C' compiler.

Relevant, too, is how the compiler translates data structure specifications, specifically how structure packing works out. For example, the intuition.library internals and API functions deal with 2D geometry in many places, often involving the "typedef struct { WORD x,y; } Point;" data structure.

When passing this data structure between functions, the Green Hills 'C' compiler packed the "Point" into a single 32 bit word, which more often than not was used interchangeably with a 32 bit word parameter in intuition.library code. This was permissible under the K&R 'C' language rules which the Green Hills 'C' compiler followed, but different rules applied to passing structures to functions under ANSI 'C'. Making intuition.library compile with an ANSI 'C' compiler therefore required extensive changes because those "Point" parameters were used all over the place

Originally Posted by Thalion View Post
@Olaf Barthel

It is really interesting to follow your posts. Ever thought about writing a little book or Blog about your commodore works?
Well, in my opinion this stuff is not such a big deal. I'm not the kind of guy who writes a blog, I very much prefer this forum medium instead

I cannot tell a story about my involvement in this piece of Amiga history, it's just bits and pieces. To make a point, I can tell only details about what I saw, or was involved in, and even then I must consider what I can tell because some details I must not share.

There are other stories and other points of view. What I may be able to tell is therefore incomplete, probably biased and may not be accurate. Please keep this in mind.

As for Amiga history, good books have been writte about it already. I personally like Jimmy Maher's "The future was here" best.

(For the record: I never worked for Commodore, I only got involved in this AmigaOS business because I was invited to do consulting work for Amiga Technologies GmbH -- up until then I had been a paying, registered 3rd party developer with "Commodore B├╝romaschinen GmbH", the local German Commodore subsidiary in Frankfurt).

Last edited by TCD; 04 January 2016 at 10:27. Reason: Back-to-back posts merged.
Olaf Barthel is offline  
Page generated in 0.03913 seconds with 10 queries