On Mon, Jul 24, 2000, Vadim Vygonets wrote about "Re: "C" is standartizied - In your 
dreams!":
> 
> > Register is only a recommendation to the compiler, and is a leftover from
> > the times when the optimizer wasn't smart enough to do that on its own.
> > Consider it as a finetuning to the optimizer, and feel free to ignore it.
> 
> That is correct.  Unlike "volatile", which does have a
> well-defined meaning.

Yes, "volatile" is an order to the optimizer, not a recommendation. It tells
the optimizer that this could be some "magic" variable, which must be read
and written to memory each time, without any shortcuts such as keeping the
value in a register. It is used, for example, for variables whose addresses
are some special area of memory (e.g., in old DOS you had special addresses
through which you can write text to the screen), or variables that might
be changed asynchronously by other threads or signals.

> > I've programmed in C for 15 years, and have seen it all too :)
> 
> To see it all, you don't actually have to program C as a "payed"
> professional (or, quoting another Uri's mail, FUCKING "expert").
> You only need to see _one_ C compiler that runs on Windows, some
> old pre-ansi C compiler (such as cc on SunOS), some modern enough
> compiler (like GCC) on a UNIX system, and, preferrably, several
> different UNIX systems.


Of course. Did you hear me pay that I was *payed* for 15 years of programming?
I never said that. Most of my programming was for fun :)

> > But considering what has happened in the computer world since, the changes
> > in C are not all that terrible, and I am still running several C programs I
> > wrote 10 years ago. Most of the weird checks in autoconf and the likes have
> > to do not with the C compiler per-se, but rather with libraries and UNIX
> > systems which have *really* changed a lot (just try compiling a curses program
> > from 10 years ago, and see if it works).
> 
> UNIX libraries did not change a lot.  Try to compile a Windows
> (2.x?) program from 10 years ago...

It's all relative, of course, but Unix is not free of almost-impossible-to-
port programs. For example, once I was given the job of resurecting some
15 year old program. It was written in Fortran, and I'm not sure that it was
even a Unix machine, but the prinples are similar: at that time they had a
machine with 6-bit bytes (!), and for the graphics display they had a
Tektronics 4014 (does anybody remember these?) taking 8-bit escape sequences
(so they had all kind of weird bit masking to convert between the byte sizes).
It took me over a week of slaving to port this program to a modern Unix
machine with X windows (using xterm's 4014 emulation), and it required me
to find antique manuals to find what on earth they were trying to do then.

Another example: I have a bunch of programs I wrote for the AT&T 5620 and AT&T
630 terminals. These were smart terminals - "network computer" in today's
lingo - that AT&T sold starting about 16 years ago, and had a modern CRT
and a mouse and a modem connection, and a CPU onto which you could download
programs - a vast improvment over the Tektronics 4014. These programs are
are completely useless now, but it's not hopeless if you try very hard: "Sam",
the best editor for the AT&T 5620, was converted to X Windows and now is
Plan 9's official editor.
I also wrote (again, in C) graphic programs for a AT&T System V release 3
machine using weird iocntrls to control the card.  Again, these programs are
useless now.

So programs which depend on external libraries, special hardware, and so
on generally are harder to port after 10 years. But it is possible nontheless.


-- 
Nadav Har'El                        |      Monday, Jul 24 2000, 22 Tammuz 5760
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |I want to be a human being, not a human
http://nadav.harel.org.il           |doing -- Scatman John

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to