I know it might sound a crazy request, but i have a very old book
which i like the look of ("introducing c Boris Allan") written for old
8 bit Amstrad machines ( cpc/pcw) and also very early editions of
MSDOS.
On the 8 bit side he starts with a later version of small c .
On the 16 bit side he uses microsoft c (MC compiler) .
I am interested in CP/M and the start of the home computer thing, i
cannot code in c and i am sure (after reading another post here -
"learning c from older books" ( late 80's again) that it is not very
relevant learning pre Ansi c and the like - but i am interested in it.
Compilers i have in mind are the Hitech pacific c compiler (free), and
the Mix c compiler (cheap).
I am just interested to know, but i would like to play about with
small c, whatever, it seems there are a few minimal
modern versions of c based on small c .
Anyhow thanks for any interest.
Kind Regards Mike
--
comp.lang.c.moderated - moderation address: cl...@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
It would be fine if you had one of the old machines in a museum setting, old
Cray supercomputers are still up over in Germany.
"mike7g" wrote in message news:clcm-2011...@plethora.net...
In theory, C is C.
The C language from any specific era would be consistant. What I mean
by that is that one C compiler's code would look like any other C
compiler's code for the same era. Assuming you are talking about two
different compilers for that operate on the same machine, the user
interface may appear different, but the C code would be the same.
Unlike many other languaqges, (like Basic) C does not suffer from the
standpoint of dialects. C has no dialects (perse).
> I know it might sound a crazy request, but i have a very old book
> which i like the look of ("introducing c Boris Allan") written for old
> 8 bit Amstrad machines ( cpc/pcw) and also very early editions of
> MSDOS.
>
Since early DOS compilers were command-line tools, the only real
difference would be what you typed on the command line to execute a
given compiler. Most C compilers had the standard set of C functions.
Some had additional functions that perhaps other compilers did not.
Again, assuming we are talking about a single machine.
For instance, the Mix Power-C compiler has some added C functions that
came from Unix machines. It also has some proprietary DOS functions,
not found elsewhere. Then, it has all the ANSI-C functions as well.
> On the 8 bit side he starts with a later version of small c .
> On the 16 bit side he uses microsoft c (MC compiler) .
>
Some C compilers are subsets of the C language, meaning that they are
not full featured.
>
> Compilers i have in mind are the Hitech pacific c compiler (free), and
> the Mix c compiler (cheap).
I still use the Mix Power-C compiler to this day and highly recommend
it. For $20.00 (US) it comes with what I think is the best C tutorial
and manual published, to date.
>
> I am just interested to know, but i would like to play about with
> small c, whatever, it seems there are a few minimal
> modern versions of c based on small c .
>
In theory, C code written in the past and for DOS, can be made to
compile and run on any newer OS, provided you retool the OS specific
functions and/or replace obsolete function calls.
Over the past ten years I've worked on interpreters and compilers
where I use the same code on a number of C compilers, including DOS
compilers. i.e.: where the same code compiles under DOS and Windows,
making proper allowances for the different OS's.
Steve
It suffered significantly from dialects in the 1980's, the time period
he's talking about. That was one of the key motivations for the C
standard, which didn't come out until 1989.
Note that this is the "pre-standard" era (first official standard was
ANSI C89, followed closely by ISO C90), so consistency wasn't as great
as you might think. Most Dos C compilers had extension to the C language
defined by K&R (the closest we had to a standard) like "near" and "far"
keywords. There also were a number of additions to the standard library
like console I/O.
Now, even back than Microsoft was a major player, so many of the other
compilers copied Microsoft's extensions.
In theory, theory and practice are the same. In practice, they're quite
different.
> The C language from any specific era would be consistant. What I mean
> by that is that one C compiler's code would look like any other C
> compiler's code for the same era. Assuming you are talking about two
> different compilers for that operate on the same machine, the user
> interface may appear different, but the C code would be the same.
> Unlike many other languaqges, (like Basic) C does not suffer from the
> standpoint of dialects. C has no dialects (perse).
If you go back before the 1989 ANSI C standard, there were a lot of
differences between various C compilers (see, for example, the "near"
and "far" keywords), and a lot of code was a tangled nest of #ifdefs.
The ANSI C standard was eagerly awaited and quickly adopted *because* it
helped to narrow down the dialects.
[...]
> In theory, C code written in the past and for DOS, can be made to
> compile and run on any newer OS, provided you retool the OS specific
> functions and/or replace obsolete function calls.
And deal with built-in assumptions about sizes of fundamental types, and
so forth.
> Over the past ten years I've worked on interpreters and compilers
> where I use the same code on a number of C compilers, including DOS
> compilers. i.e.: where the same code compiles under DOS and Windows,
> making proper allowances for the different OS's.
The "proper allowances" are the tricky part, yes? And DOS and Windows
are much more nearly compatible with each other (early versions of
Windows ran under DOS) than, say, Windows and Unix, or Unix and VMS,
or VMS and CMS.
--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Here are a few:
http://www.desmet-c.com/
http://www.openwatcom.org/index.php/Main_Page
The Zorland C compiler was written by Walter Bright
who can be found here:
http://www.digitalmars.com/
Thats briliant! I will have a good look at the DeSmet compiler, thats
a great story to go with it also.
Mix C looks like a great option also. I can't argue with $20 for a
compiler and a quality manual, sounds good.
Thanks Mike